Alpha shadows test

Hello, community.

It seems that shadows produced by alpha textures have strange appearence. Please look at the images attached.
When i use ZTransp off i have correct shadows but wrong tree-rendering.

And vice-versa when i use ZTransp shadows have some strange light areas.

You can download this test-scene from here:

Can someone give any advice of how can i overcome this?
Thank you for any feedback.

Have you tried with Ray Transp?

Be well

Yes, tried it, got even more weird result.

Thanks for reply.

I think you have to set settings, not on the tree, but on the wall the shadows are cast on.

here’s a tutorial on transparancy that may be useful.

yogyog: thanks for reply, i know this tut, but it has nothing which could help me here i think.
It seems that problem lies in the well-known alpha-bug, when there is crossed alpha-mapped planes in one single mesh. It’s so called “alpha faces render in the correct order in a single object”
Here is another post about the problem i found:

I think it’s fairly easy to correct this bug in blender. Or this is not a bug?
Should i open thread in forum in bug section?
Thanks for any comments.

it looks definitly like a bug.
i’ve dloaded your file and changed the txture to a simpler one and… also on the tree itself it’s wrong!

here is the file:

and here is the ugly render:

jazzroy: thank you for confirming the problem, now i know that im not along ;).

Well will post into bug-forum then.

Any more comments/advices?

Thank you in advanced

I suggest actually modelling the tree, or at least creating a 2d cut-out, until the bug is fixed.

Or you could put each alha-mapped leaf plane in a seperate object. Or use some compositing nodes to combine your innisial two renders.

Okay I know what you need! You need to make one map for materials and one exactly the same except make everything you don’t want to be invisible COMPLETELY white. That will be your alpha map. That should work perfectly!

Hope this helps!


Thank you all for advices.

Arr Matey!!: i did try to use gen, and it’s L-system, but trees made with all details in full 3D are so huge… Vertex/tris number is growing too fast.

yogyog: yeah, separating alpha planes into several meshes will help i know, but i wish i could use imported trees from tree[d] (gile[s] addon for tree modeling). And separation by hand in Blender is still not my hard point…

magiciandude: sry, what did you mean with word “map” here? Double all 3D-geometry?

Eh…sorry for not explaining better. What I meant is something like this. Have two materials for the object. One will be solid black and white(not tints of grey or anything) that will become a mask, as in the white will show up, the black wont. This will just be set to “Alpha”

Then have the color version just set to “color”.

Heres an example

“Color” texture

“Alpha” texture

This way if you set the alpha one to only alpha, the black will not show. And since the color one is the exact same shape, it will also apply the correct color to the correct spots.

Your problem was that some of the areas in your image were darker, so they had a lower opacity when set to “Alpha”.

Hope this clarified things!


Aha, i think i got it. Thanks magiciandude, will try your tip.
Ok, just have tried it - didnt help.
For test i simply used black-and-white texture - with your logic it should be fine, but as you see from ss its not:

Yes, but did you just convert it to black and white or did you actually make each leaf solid white?

magiciandude: what the difference? I used simple black-and-white texture (only 2 colors, no greyscale). With your logic:

Your problem was that some of the areas in your image were darker, so they had a lower opacity when set to “Alpha”.

it must be ok with simple 2 color black-and-white texture.
Or am i missed something? Can you make simple test and show me result?

Thank you in advanced.

Could you post YOUR file and TEXTURE so I can show you with your file? It would be easier that way…hopefully I can get it to work.

Okay, I figured out a solution. Theres something weird about the Z-Transparency option to where the faces are cancelling out each other and making the shadows weird…its a problem with the complexity of the mesh combined with the z-transp method of alpha. SO what I did was create two objects. One with a material that only casts shadows(this uses the normal ALPHA option) and one that ONLY shows up(Using z-transp). I attached my result…and here is the link to the blend file! I put the two meshes on seperate layers so you could look at the materials settings. You can join( CTRL+J if you didn’t know) the meshes if you want to and it will work just the same…I just left them apart for educational purpose. If you have any questions…just ask!

Also, what did you use to make your tree? That is very cool. I would die(okay maybe too dramatic there…but you get the point) to be able to make trees like that!

Hope this helped!



magiciandude: you save my life, dude! Thank you so much! I also thought about separating objects to make shadows work but didn’t get any luck with it.
Concerning tree modeling - i already wrote that i use tree[d] (gile[s] addon for tree modeling - - it’s freeware but created files could be opened only in gile[s]. Then i save it to obj file and reopen in blender.