Transparency Sorting inside GeometryArray
I am currently writing an application for plotting landscapes from bio-chemical activity data. It is a basic scientific visualization with some interactions for the researchers using it.
I stumbled across a problem, which I did not manage to solve. Whatever approach I use I solve one problem but get another instead.
I use a GeometryArray (i.g. a IndexedQuadArray) to draw the landscape. For that I calculate a regular grid and the z-values are my function values (nothing fancy). I use color alpha values with the colors4f of the array to make parts of the landscape invisible. This is essential for me, because some parts of my landscape don't have data or less data and need to be less visible.
Ok, here is my problem:
When I rotate my scene only in one half of the whole rotation the transparency for the geometry is calculated correctly (thus I can see through it and see other parts of the landscape). On the other "side" of the rotation I can't see the other parts of the landscape behind it, only other geometries that are behind my landscape.
Here is a screenshot of one of the landscapes that displays the problem: http://dl.dropbox.com/u/9477369/example.jpg
I wrote a small sample application so that you can actually see what I tried to describe. Just rotate it a bit. The problem is best seen when the landscape is turned bottom up and then rotated.
Funny thing is, if I change
The see-through problem changes, but it even gets worse :-/
I'm working on Mac OSX, but I hope this does not make a difference here. Java3D Version is 1.5.2.
I hope you have a hint what to change, because it is really annoying if the users are limited to view the landscapes only from one direction to see it correctly.