Ambient Occlusion and shadows from texture alpha

User-contributed CVS development builds. Please test and give feedback!

Moderators: jesterKing, stiv

Post Reply
scast
Posts: 0
Joined: Sat Jun 14, 2008 11:54 pm

Ambient Occlusion and shadows from texture alpha

Post by scast » Sun Jun 15, 2008 12:27 am

I am using a lot of texture baking, generating shadow maps for projct I am working on.

Problem is when I want to create, for example, wire fence. I create a plane, map texture with alpha channel, create material and turn on tansShadow for all objects that I want to receive the shadow. It works fine, the wire texture creates the shadow on the ground... as it should.

...but when I enable Ambient Occlusion, is seems that transparent parts of wire fence plane are not taken into account. The AO is generated as if the plane was completely solid (creating very dark shadow).

I am not making any mistake, since this problem is known and repeated by other Blender users. If possible, it would be great to make alpha channel affect the AO, even if just for totally transparent 0 and totally solid 255 pixels.

Other links:
http://blenderartists.org/forum/showthread.php?t=109474
the Ivy Generator - in PDF file. They have the same issue when AO is enabled and textured leaves with alpha drop the shadow.
http://www.blender3dclub.com/index.php? ... cle&sid=36

If possible, please try to correct/tweak/change this, it is a very important issue for game dev (when rendering shadows from tree tops, fences, grass... etc).

....
Also, Apricot version has phenomenal align functionality. Please try to merge it with blender, it is a great time saver! (edit: it is now in blender :) )

And by the way, I find Blender truly amazing! Thank you.
Last edited by scast on Tue Oct 21, 2008 4:31 pm, edited 3 times in total.

scast
Posts: 0
Joined: Sat Jun 14, 2008 11:54 pm

Post by scast » Mon Oct 20, 2008 11:00 pm

Just to post solution/workaround... you can skip using AO.

The similar effect can be created with raytraced soft shadows. You need to create light sphere (many lights around the scene), set to low light intensity and with soft shadows... the scene then will be drawn properly when alpha billboards are used (since everything is raytraced), and object will have smooth shading similar to AO because light sphere will make less visible parts more in shadow (less sphere "ambient" light will get there, thus shadow will be darker), and since soft shadows are used, there will be no sharp edges from different light sources.

Baking works excellent with this setup. Only issue is somewhat slower rendering speed when compared to the AO. You can also tweak shadow colors this way etc. It is a great approach for outdoor scenes.

EDIT: As a user that switched from 3D Studio Max to Blender, I can say that Blender is really incredible 3D app. I am surprised how many things can be done more efficiently and easier than in Max, plus new features are constantly coming! Also it is very intuitive, and as I learn/know more, it is easier to create and build incredible scenes (and user interface, once you learn the shortcuts, is incredible, it makes modeling, UV and texturing at least 10x faster than in Max).

Thank you Blender developers for working on and supporting this incredible app!!! :D

Post Reply