Lightmap on trees

syedhs

05-06-2007 06:41:51

Hi,

This maybe a naive question, but I cant seem to figure this out. Normally a tree will consist of several billboards with transparency around them. So how do you perform a lightmap on them as it will result in several boxy shadows on the ground (box is coming from the billboard). Obviously, the shape of the shadow should look like a bunch of leaves, not boxes. 8)

Paulov

05-06-2007 12:11:38

hello.

I had this problem with my project. I made some tests, and with MAX when placing an spot or direct light, when rendering you can obtain sharp leaf shadow by selecting in the spot parameters in the shadows tag the "ray traced shadows" option.

But I was not able to bake this to a lightmap. but may be there is a lightmap pluggin that can bake these. I did not spend much time on this because I was busy and the ressult was cool enough for me.

But if it can be done in the render window, sur that it can be baked.

syedhs

06-06-2007 03:19:33

Thanks Paulov.

Yeah obviously I need to bake the shadow into the materials, so if anyone has got a solution, I am all ears for that :)

Paulov

06-06-2007 10:13:22

hey

Well, I actually gave you the solution in my first post.

I told you that when setting ray traced shadows on you get that kind of detailed shadows....

I´ve made a test and when you bak them, you get pretty detailled shadows. Youll need a high resolution to get the details in your lightmap, but it works.

www.ikernor.com/download/ogre-forum/ofu ... -trees.jpg

bye

Paulov

06-06-2007 10:18:10

Another posibility could be to have a plane (a mesh) with the ressulting texture of a lightmap. And place this textured plane for each tree. This way you could get a nice aproximation without having a too big lightmap.

But all the shadows would be the same...
You should also in this case tur the depht bias to something higher to 0.

syedhs

06-06-2007 12:36:52

hey

Well, I actually gave you the solution in my first post.

I told you that when setting ray traced shadows on you get that kind of detailed shadows....


I thought you were saying it should be feasible, but not the solution. I will forward this to my artist, looks like he has a lot to learn :wink: