Scott Herod (herod++at++aspen.evt.com)
Thu, 25 Feb 1999 10:21:15 -0700
We're having a problem with rendering partially transparent
objects and I was hoping for some suggestions of a way to fix
the problem. ( I apologize that this is rather long. )
First let me explain the problem. We allow a user to create
textures and place them on rectangular GeoSets then fly them
around by changing a DCS parent of the Geode. The textures
almost invariably have alpha in the image. If we have two
textured geosets both with their normals pointing in the -y
direction (essentially towards the camera) (normal condition
is not important), and pass one through the other by translating
in y, we correctly see the image pass through when the geodes
pass through each other. However, occasionally the partially
transparent backgrounds of the closer image blend with the
background and not with the now further image until the closer
image is pulled some small distance closer to the camera. This
is what I am calling "Alpha Cut-Through".
Here is what I think is happening. Clearly Performer depth
sorts GeoSets before drawing. Presumably they are sorted by
the center of the bounding sphere (but how is not really relevant). If
two rectangles are parallel and very close
to each other, but the back one (from the camera's viewpoint)
is closer because its center is closer (for example if it is
wider and the geometry is near the edge of the viewing frustum),
performer sorts the back one in front of the forward one. Then
at the drawing pass, the alpha in the front texture is blended
with any back ground. The back textured geoset is drawn next
but z-buffering ignores pixels behind the already drawn and
blended front textured geosets. As the front geoset pulls
further forward, it passes in front on the back geoset (according
the the depth sorting of performer) and every thing is drawn
correctly.
Possible fixes:
(1) Make the geometry of the panels consist of a lot of geosets.
The problem is that textures would have to be tiled and mip-mapped
filtering would show seams if the panels were spun to force the
min-filter to reduce a lot. Lower quality min-filters introduce
"fuzziness".
(2) Do our own depth sorting, but this would probably kill
performance.
I do have one question still. I tried switching the camera
to orthograpic but it didn't make any difference. Is
performer's depth sorting the same for perspective and
orthographic cameras?
Thank you,
Scott Herod
scott++at++evt.com
This archive was generated by hypermail 2.0b2 on Thu Feb 25 1999 - 09:21:22 PST