Tuesday, April 21, 2009

Opacity Bug II - Material Blending

It is possible to fake material blending using opacity maps on separate meshes to some extend. This technique comes handy if you would like to blend materials with different reflection, bump or specular highlight properties.




As you can see in the 3Dpdf you can download here, the opacity is pretty kinky when it comes to overlaying semi transparent layers (backside). I have no general solution, because the circumstances under which the opacity begins to bug may vary, and I did not fully understand its behaviour yet.
So here a few tips how you could bypass this problem:

- flip the normals of the top layer (requires double sided rendering, no specular highlight is possible)
- detach surfaces (with different directions) to separate objects
- attach surfaces that don't work well, despite flipping or detaching, to a newly created object and delete the element of the object you attached the surface to (this also works if your specular highlights don't work, but your normals are showing in the desired direction)

Your solution might be one, some or all of these points, but it requires sometimes some trial and error.


I used this method to create window frames in my TGV Lyon Scene (Filesize 10mb / 256mb video memory).

The bandwidth is kindly offered by: active-servers


Edit:
If you wish to combine transparancy, bump map and reflection map you cannot use tiff with alpha channel, instead of that use separate jpg's (don't forget to uncheck ICC Profile in Photoshop).