We are about to switch to a new forum software. Until then we have removed the registration on this forum.
It looks like that lines and borders of 3dshapes aren't visible inside transparent 3dShapes. Is there any solution for this? I would like to see line inside the sphere. I used fill with alpha to make sphere transparent.
Answers
To enforce this you can draw a 3D shape with fill and no stroke, then call hint(DISABLE_DEPTH_TEST), then draw the same shape will noFill and stroke, then enable depth test again for further drawing in 3D.
It's quite useful, but what about line starts inside a 3D shape. For example:
I'm trying to get line which starts in the box and ends outside. Without deep_test the line is drew in front of (or behind) the box and you couldn't see that it starts inside the box. With deep_test a part inside the box is removed.
Actually nothing is removed. Just draw a longer line if you want it to continue...
Deep_test is enabled during drawing second line (right box). According to the code line starts in the middle of the box, but it's not visible.
Yes, of course. That was the original question. Hence the provided solution. Indeed, if you don't use the solution, it won't work.
Perhaps we should broaden the discussion a bit, so maybe it becomes clearer if you understand why this happens. Because actually this is a common problem related to opengl not processing. The problem is related to things like z-depth, transparency, depth sorting. Check out this link for an explanation and possible solutions: http://www.sjbaker.org/steve/omniv/alpha_sorting.html