I am working on a demo with realtime shadows, and i don’t want to render them when they are out of the walls,
Is posible to define a clipping polygon/rectangle in a plane (Stencil Buffer in OpenGL) for rendering??
Rafael
I am working on a demo with realtime shadows, and i don’t want to render them when they are out of the walls,
Is posible to define a clipping polygon/rectangle in a plane (Stencil Buffer in OpenGL) for rendering??
Rafael
Is this what BoundingSphere type objects are for? I never quite got them but in my imaginary world that is the kind of thing they would be ideal for.
You can try using a BoundingPolytope that is defined as a very thin box. You would need to define 6 planes, so think of it as a “clipping wall”, with two of the planes almost the same (a very thin wall)
Java3D does not support Stencil buffers in the current versions.
There is however a ModelClip node in J3D that you might be able to get working to clip that shadow geometry.
ModelClip worked excelent!!
Thanks