All,

[apologies for a long post]

I have come up against a very strange rendering problem using QuadArrays. I hope I've 
just missed something, but I've beaten my head against this for a few hours now and 
can't make head nor tail of it.

I have run into problems writing an example for my forthcoming book "Java 3D 
Programming". The example uses SimpleUniverse and defines 3 Viewers. The first 
(default) Viewer is a top down view of a space within which the other two Viewers can 
move ("Dan" and "Jim"). The space is created by defining "walls" using ColorCubes 
"tiled" around the edge of the space and a floor using tiled 2 x 2 QuadArrays. I.e. we 
end up with a square space with walls that are 2 units high, and has a floor 
positioned at -1.

Both the "Jim" and "Dan" Viewers have PlatformGeometry and a ViewerAvatar assigned so 
that as they are moved around (using a KeyNavigator) they can see and identify each 
other. The KeyNavigators modify one of the TransformGroups in the ViewingPlatforms 
MultiTransformGroup in order to move the Viewers. The first view is therefore a 
top-down view of the overall space, the second is "Dan's" view and the third is 
"Jim's" view.

Again, everything *almost* works... tantalizingly so. The problem appears to be that 
when either "Jim" or "Dan" do not have the center of the square space (0,0) within 
their field of view *ALL* of the tiled QuadArrays that compose the floor of the space 
disappear (in their view). They will reappear as soon as the Viewer is rotated again 
such that the center of the space is again their view.

I initially thought it was a clipping problem and fiddled with the clipping planes, 
but no luck. Then I though it was a Normal problem on the QuadArray, so I ran 
everything through the NormalGenerator, again no luck.

Then it dawned on me that *only* the tiled QuadArrays disappear, not all the walls. So 
I replaced the tiled QuadArrays with tiled ColorCubes for the floor also, and sure 
enough the ColorCubes stay put, even when (0,0) is not in view.

Is there a rational explanation for this behavior?

I now have the example with the tiled QuadArrays (which are textured incidentally) 
slightly above the tiled ColorCubes for the floor. As soon as the center of the space 
is no longer in view (for a viewer) the textured tiles disappear to reveal the 
(shocking pink!) underlying ColorCubes!

Any and all advice gratefully accepted. I really don't want *another* of my examples 
to turn into a lesson in: "this is how you would do this if it weren't for this bug in 
Java 3D"...

Incidentally, it occurred to me that this might be related to Bob Gray's problems of 
last week (Transparency Problems (Still!)).

Sincerely,

Daniel Selman

[EMAIL PROTECTED]
http://www.tornadolabs.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