Re: Java3D screen Rasterisation related questions.
Posted by philjord on Feb 04, 2019; 7:44am
URL: https://forum.jogamp.org/Java3D-screen-Rasterisation-related-questions-tp4039345p4039467.html
Yes there is default back face culling.
This can be controlled by the PolygonAttributes that can be set on any Appearance applied to Shape3D
* The default values are as follows:
* cull face : CULL_BACK
* back face normal flip : false
* polygon mode : POLYGON_FILL
* polygon offset : 0.0
* polygon offset factor : 0.0
cullFace polygon culling mode; one of CULL_NONE, CULL_BACK, or CULL_FRONT
CULL_FRONT is fairly unused, but CULL_NONE is very handy for 2D particle sprites that aren't view oriented
There is only view frustum occlusion, which is a major part of the function of the scenegraph. Every branch of the scene has it's bounds known at each level of the graph up to the root. The bounds default to auto calculate and tend to be the sum of the bounds below, down to the bounds of node geometries at the lowest level (though they can be set at any level to any value if needed).
With this bounds knowledge Java3D only requests rendering on the GPU for those elements that are in view on each frame.
Obviously this has a major impact on performance, or to put it another way without this the GPU would be overloaded with pointless culling work.
But geometries between themselves don't get any culling and rendering is back to front like usual.