Java3D screen Rasterisation related questions.

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

Java3D screen Rasterisation related questions.

ZacharyABCD
Merry Christmas and a Happy New Year.

I have the following two questions about the Java3D 1.6 library.

In the simple context of two 3D objects in a lit 3D Universe,
with one camera pointing to view those two objects,

-Is there default backface culling elimination that goes on
by default before objects are sent to screen, in Java3D?

-Are there any default occluding calculations that
go on with multiple relative 3D objects in a Java3D Universe
before things are sent to screen?  Is this calculating, at default,
entirely ignored, or partly ignored?

Happy New Year!
Reply | Threaded
Open this post in threaded view
|

Re: Java3D screen Rasterisation related questions.

philjord
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.
Reply | Threaded
Open this post in threaded view
|

Re: Java3D screen Rasterisation related questions.

ThomasR
philjord wrote
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
CULL_NONE seems the most practical in general as surfaces may be porous and/or have concavities, there's also transparency to consider. This may not matter as much in first person shooter scenarios.