Skip to main content

Java 3d Depth Test Function

2 replies [Last post]
abeygc
Offline
Joined: 2005-02-02

Hi,
I would like an 3d Object in java3d to be draw on top of all other objects. Thinking of a navigational tool in a 3d Environment. I would like to draw a simple sphere that could be seen any where in the world. I've played around with the depth function settings in render attributes but to no avail. Any ideas ?

Abey Campbell

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
lamer77
Offline
Joined: 2006-12-22

Disable z read on the sphere and render it last by enabeling blending and setting transparency to 0. If you got other transparent objects in your scene you may also need to use TransparencySortController to force the sphere to be rendered last of the transparent objects.

You can also use OrderedGroup at the root of you scenegraph. But transparent objects are not rendered after opaque objects inside an OrdredGroup.

abeygc
Offline
Joined: 2005-02-02

Thanks , worked perfectly . I have lots of transparent objects and no conflicts for now at least.

Abey Campbell