I have a question about using OrderedGroups and Z-Buffers.

I'm trying to write a space-sim where I have 3 layers of 3D objects:

1) Very distant objects like stars, galaxies, and nebulae,
2) Near distant planets,
3) Up close objects, like ships and space stations.

I know that I can arrange the objects inside three individual groups under
an OrderedGroup, and the resulting picture has the stars behind the
planets and the planets behind the spaceships, and this forced scaling
gives me the added benefit of using a different scale for each set of
objects. For example, stars could be spaced at 1 unit = 1 light year, and
planets can be scaled at 1 unit = 1000 Km, and ships can be scaled at 1
unit = 10 meters.

The problem I'm running into is using a depth buffer for these groups. I
need to use a Z-buffer for the spaceships group, and I'd also like to use
a Z-buffer for the planets group. But when I turn on Z-buffers then I run
into the problem where I'm using the same Z-Buffer for each layer. The
ships can be obscured by the planets that are supposed to be behind them.

Is there a way to seperate the Z-buffers between different groups inside
an
OrderedGroup? Or is there a way to clear and reinitialize the Z-Buffer
between rendering different children in the OrderedGroup? Or is there
another approach I can use?

Thomas Foote
www.BricksInMotion.com - LEGO Stop-Motion Animation
www.DroidQuest.com     - Robot Odyssey



__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to