LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D Picture Control - Blending / Overlay

Hi everybody,

 

I brought a little question to you - I struggle to tune my 3D Picture Control in such a way, that it shows me only the front face of the model when I rotate it.

 

More details: I have a program (attached), that shows a polygonal model built from the point cloud. I wanted to visualise it the same way like it's typically done for the STL models in CAD software - namely using contoured triangle polygons. In the program, I build surface and contours separately and overlay them. I decided to use Blending for the contours to avoid the following effect - when zoomed out polygons become unrecognisable. I used two sets of objects instead of two single objects to visualise the process of model creation.

 

And now the problem I am struggling with: When I look from the front all looks just perfect and as desired - pic. 1. When I rotate the scene (along the Z axis) - the wall of the model that was previously hidden starts to appear like at some point the walls become transparent - pic.2. If I continue rotating the scene - I see that my wall becomes fully transparent - pic. 3.

 

I tried to tune the Blending but after many attempts could not find any setting that influence this.

 

Would be grateful for any help or ideas!

Download All
0 Kudos
Message 1 of 13
(1,713 Views)

Any ideas plz

0 Kudos
Message 2 of 13
(1,656 Views)

I haven't used the 3d Picture in a while....

There's a scene property called culling or something, I can't recall. It basically sets the limit to drawing distance along a given axis, and if you don't set this to include the full range you require, the picture control will clip away some of your model.

 

It may also be a camera property as opposed to a scene property. I'll have a look and see if I can refresh my memory.

 

I think this is it, my memory is very rusty. This method has a "Near clipping plane" and "Far clipping plane" setting

 

Intaris_0-1650640475725.png

 

0 Kudos
Message 3 of 13
(1,636 Views)

If you're rendering a wire frame, there will be no culling. The triangles aren't filled, so they won't occlude anything.

 

I'm afraid that if you want to render triangles with lines showing, you need to texture them. Of course that would give you all kinds of aliasing artifacts.

 

in 'real' OpenGL, you probably have to render twice as well (1st white polygons, 2nd the wireframe), but you'd have offset options (not sure of the exact term anymore) that makes the 2nd be rendered over the 1st.

 

I'm not sure LV's scene graph can do this (easily).

0 Kudos
Message 4 of 13
(1,626 Views)

Thanks for the reply. I have played with clipping settings for some time - no result. I also doubt that the problem is related to clipping since the effect appears when I rotate, not zoom the model. In the first hemisphere the back side of the model does not appear regardless clipping settings or zooming, in the second hemisphere clipping as well as zooming do not prevent the back side from appearing.

It seems basically like looking from 1st hemisphere the walls are not transparent, looking from another hemisphere - all of them become transparent.

0 Kudos
Message 5 of 13
(1,567 Views)

You should be looking at culling, not clipping.

 

Face culling prevents faces of polygons to be rendered. Back face or front face (or both) faces can be culled.

 

What is the back or front of a polygon depends 100% on the order of vertices of each polygon. It might not correlate with your idea of what is back and front... For 3 points, polygon 0, 1, 2 will have the same front as polygon 1, 2, 0, but polygon 2, 1, 0 will be flipped.

0 Kudos
Message 6 of 13
(1,560 Views)

Texturing and offset both do not affect the described effect, unfortunately. In case I apply them correctly, which I hope I do.

0 Kudos
Message 7 of 13
(1,558 Views)

The thing is that I do want back sides to be rendered, but they should not be visible when I look at them through another wall for example -like it already works for half of the sphere basically - so back sides are rendered and visible when I look at them directly, but invisible when they are covered by another surface, that closer to me

 

EDIT: The undesirable transparency of the surface looking from second hemisphere lets both front and back surfaces to appear behind the surface I look through

0 Kudos
Message 8 of 13
(1,556 Views)

@Mephiengineer wrote:

The thing is that I do want back sides to be rendered, but they should not be visible when I look at them through another wall for example -like it already works for half of the sphere basically - so back sides are rendered and visible when I look at them directly, but invisible when they are covered by another surface, that closer to me

 

EDIT: The undesirable transparency of the surface looking from second hemisphere lets both front and back surfaces to appear behind the surface I look through


With transparency, you are responsible for the rendering order.

 

The graphic card only has 1 Z value per pixel, and simply renders things closer over things further away. If the closer pixel is transparent, it works, but the rendered won't render a solid pixel behind a transparent one.

 

So if you want transparency, the only ways are a 2 pass rendering, or rendering in order. 

0 Kudos
Message 9 of 13
(1,549 Views)

In contrast, I want to avoid this transparency and I do not really get it why the transparency appears and disappears for the same surfaces when I rotate the view

0 Kudos
Message 10 of 13
(1,547 Views)