Monday, January 5, 2009

Opacity Bug Workaround

The bad news is, there is no way to avoid the Opacity Bug. But because the Opacity Bug only appears on the frontside of a polygon, you can try to reduce the ammount of appearence, by flipping the polygons backwards the statisticly most seen viewing angles. Examples to study on how the Opacity Bug behaves, are my first vegetation attempts Vegetation Test (2.3mb)* and Island (4.8mb)*.


Additionally you can reduce the effect by avoiding semi transparent pixels, and using a higher resolution than absolutely neccessary to some extend. You also can try to receive better results by splitting large amounts of opacity planes into several objects, because exporting/importing the normals behaves more stable on smaller objects (.ase). If you want to use opacity maps in combination with Diffuse Color, Bump and Reflection maps, for example for water, you have to import the opacity map as separate greyscale image, not as .tiff with alpha channel you normally prefer. My best results for simulation of vegetation inside 3Dpdf so far, can be seen in the
Guggenheim New York Scene (5.0mb)*.

For scattering the image planes I used Gugila Groundwiz with a streched Sphere as scatterobject, and turned the normals so they show inwards the tree. Not topic related but important to mention, that the sky map which is used in this scene comes from CGTextures.com, and most of the building textures from Google Earth Street View.

*The bandwidth is kindly offered by: active-servers

Update:
Keep in mind that you have to set the render mode to double sided in the 3D settings.
To make sure the document renders double sided regardless the local machine configuration, attach the following line to your Javaskript:

scene.renderDoubleSided=1;

1 comment: