apparent cull face problem with highly-curved geometry

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

apparent cull face problem with highly-curved geometry

mcneillk
The JOGL bindings have a problem with highly-curved geometry. The front faces don't render correctly on the screenshots of a torus shape below, seen from the front I have put a perspective view to show the actual shape. When the viewing angle is in a certain range, the rendering is broken. The same type of problem happens with other shapes, like a hemisphere, but only when you CULL_FACE is set to NONE (in order to see the concave face).

OGL
OGL bindings (incorrect)

JOGL (grid removed for clarity)
JOGL bindings (incorrect)

Reply | Threaded
Open this post in threaded view
|

Re: apparent cull face problem with highly-curved geometry

gouessej
Administrator
Hi

I'm not sure that JOGL is to blame as OpenGL can't draw concave polygons unlike its ancestor IrisGL.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: apparent cull face problem with highly-curved geometry

mcneillk
I'm not quite sure I follow, since the torus shown in the screenshot is convex.

In addition, the "old" native bindings are also OpenGL, and they work fine for all concave shapes I've seen (e.g. inside of a hemisphere).

As you know, OpenGL uses GL_FRONT​, GL_BACK​, or GL_FRONT_AND_BACK​ to select which faces to draw. It looks like the geometry might not be passed correctly to the new JOGL layer. I say this because even if I set CULL_FACE to GL_FRONT_AND_BACK in Java 3D, the rendering is still broken.

Thanks for your involvement in this project!
Reply | Threaded
Open this post in threaded view
|

Re: apparent cull face problem with highly-curved geometry

gouessej
Administrator
You talked about "the concave face".

Anyway, provide a short test case, there is probably something obviously broken in the JOGL pipeline of Java3D.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: apparent cull face problem with highly-curved geometry

Manu
Maybe you set a front clip distance that is too far...
Emmanuel Puybaret
Reply | Threaded
Open this post in threaded view
|

Re: apparent cull face problem with highly-curved geometry

hharrison
Now that I think back, this is exactly the same problem the vZome guys were seeing as well.

This is a problem with the jogl backend, it must be doing something different than the old OpenGL backend as that's all that is changing in these two tests.

Harvey
Ken
Reply | Threaded
Open this post in threaded view
|

Re: apparent cull face problem with highly-curved geometry

Ken
Yes, exactly. I will try to spend some more time on it in the coming days...

Ken