Possible to get proper alpha transparency in bake result?

Hi. I have a branch filled with leaves that I want to bake onto a low-poly surface for game use (think projecting the branch onto a plane, except the surface I’m using is more complicated than a plane, so just rendering an ortho view won’t cut it). The leaves are planes with an alpha mask. The problem is that baking doesn’t seem to handle transparency, seems like the bake rays stop at the first surface they encounter even if it’s transparent. The attached image shows the problem. You can see how some of the leaf-planes mask out the ones below them.

I know how to bake transparency. The problem is how the rays stop at the first surface they hit. I’ve tried different material and render settings, but nothing has helped. I can think of one workaround - manually split the leaves into non-overlapping layers, bake them separately, and composite them. But hopefully it won’t come to that (there are a ton of leaves). Thanks for any help.

It would be very helpful if you could post a .blend file…

Checked max transparency settings? :-\

Changing the max transparency didn’t help. I think this is actually expected behavior, because in most cases you would want the ray to stop at the first surface it encounters. So what I did is re-model the leaves to use actual geometry for the edges, which is what I should have thought of in the first place.

No way, the max transparency is there so that you ‘can’ have lots of levels of leaves, but you are right in that you may need far to many transp rays to accomodate a whole tree or forest.