Is it possible to bake lights onto a speedtree then duplicate the same baked tree instead of baking an entire environment?

To get speed trees to look good without baking light using realtime directional light & sun,
the key thing to use for this is the new per object shadow depth texture?

For example I notice trees don’t look that good when you drop them in with a realtime directional light without baking, but improved “unlit textures” and depth textures / baked shadows on 1 tree then duplicating it could solve this, no ?

I like how the trees look in world of warcraft and hand painted games, I dont think they run a huge bake on the whole environment on many trees at once, they just use shadow baking and unlit texturing tricks on 1 tree then duplicate it alot right? Is that how I should work? Since I have huge outdoor environments that would take forever to bake at once

Just thinking out loud… If you really wanted to get rid of regular lighting on a tree and just fake it for instanced foliage, make the material unlit and do the lighting yourself. Dot the world space vertex normal with a vector representing the “light direction”. Then scale and bias that into 0-1. Then multiply with the vertex color (which is the speedtree per-vertex ambient occlusion value) to get some more realistic darkening of the interior. That is now your “light amount” that you can use a variety of ways in your material, simplest of which is just multiplying the base color. It would take some tweaking here and there to match your scene better, but it could probably do what you want for trees that aren’t close to the camera.

Thanks so much, sounds pretty interesting (and complicated lol)
Could you perhaps whip up an example if you happen to have time sometime? I could post it on the forum as well, I think it would benefit many people, but if not, I will have a go at it maybe it sounds more complex than it really is

I just meant something like this material. You’re dumping PBR rendering in the trash, and it would take a lot of tweaking to match your scene. But if you absolutely, positively had to render a ton of stuff without baking the lighting, this would do the trick. It’s basically just Lambert shading with the SpeedTree AO included. No specular, though you could add that. You could also add the normal map back in if you wanted. Etc.

Yes I would do something like that to get a fake ‘direct lighting component’. The per-object depth-shadow-map is indeed designed to compliment a technique like this! It is more ideal for when the light is “noonish” if you plan to randomly rotate the trees since the depth texture will rotate with them in that case. If your trees are roughly radially symmetrical, you can possibly get away with decoupling the rotation to be able to rotate trees with sharp sun angles and keep the shadow at the same orientation.

You could also simply extract the baked lightmass lighting result from one tree (also using the render to texture baking tools) and reference that as a texture inside the material that multiplies on top of the diffuse texture. That approach would also use an emissive material like Greg’s example. Documentation has been written for the Render to texture stuff and it should be up on the website in a few days. Sorry about that.