If you figure out shadows from trees, you’ll have a winner. That’s the one thing that is missing from almost all the lightmapper scripts that have been posted over the years.
The screenshots look great, but i’m having a few problems getting the scripts to work. When i Generate the lightmap unity gives me a few errors in the PixelLightMapper script:
Array size must be at least width*height
UnityEngine.Texture2D:SetPixels(Int32, Int32, Int32, Int32, Color[], Int32)
on the 2 lines that say
lightmap2.SetPixels (pixels);
and then an error about calling GUI functions in the wrong place (this could just be a knock-on error from the previous problem)
Its no longer needed. Unity 3.3 has global lightmapping that just works, terrain lightmapping as such no longer exists in U3. open the lightmapping from windows to see it
it bakes the shadows too.
But its pretty tricky to set up lightmapping while not overdoing the VRAM waste.
You need a very high lightmap size or a correspondingly small terrain cause it gets stretched over the surface logically.
Realtime shadows compensate for that in the form that you just don’t try to get somewhere correct lightmap replicas of the trees but something more or less diffuse and leave it to the realtime shadows to make the detailed tree shadows as you get closer