- Home /
No baked shadows from trees (Terrain)
Hello!
I'm trying to create a lightmap for my terrain with trees on it. All settings are set to default. Terrain and lightsource (directional) are static. While objects (including the terrain it self) cast shadows as usually, all trees on the terrain do not. Also the light probes appear to be not applyed on the trees in oposite to realtime-mode.
I'm using Unity 5 and standart assets only. Any ideas?
This was finally fixed (tested and confirmed here) in the latest 2017.2 patch with the new progressive lightmapper. Two years and eight months after it was broken.
Answer by rmalecki · Sep 11, 2015 at 04:57 PM
For the time being, I have made this quick workaround: https://gist.github.com/rmalecki/5fe4092b6b739209061b
Turn OFF drawing Trees & Details in the settings tab of the Terrain object
Run the editor script. It creates real instances of the tree prefabs with the exact same Transforms as the internal tree instances of the Terrain. This can be a LOT of meshes!
Bake the lightmap. Grab a coffee.
Finally, throw away the generated geometry and turn Trees & Details drawing back ON in the Terrain settings.
Answer by mBakr · Apr 24, 2017 at 02:11 PM
And a year later, in v5.6, this remains broken...
I've been testing the new distance shadowmaps and the work beautifully! But, seriously, we still can't bake shadows with terrain instanced trees?
Dear Unity, please stop developing new features and finish those on which we depend. Thx.
Answer by fffMalzbier · Mar 13, 2015 at 08:42 AM
Currently in Unity5 you can not bake the shadow of Terrain trees onto the light-map. Its a currently missing feature that Unity Technologies is trying to make it available as fast as possible.
Answer by getyour411 · Sep 12, 2015 at 09:58 PM
I can't speak to the validity of the Mar 13 answer, but as of 5.2 I placed some terrain trees, let my GI jobs run and I have shadows.
I'm using 5.2 and still not getting any shadows. How did you managed to get them @getyour411
@jpv1234 Please don't create a comment or follow-up as an Answer. I converted this one for you but mostly just reject those out of the mod queue as otherwise mods would spend far too much time converting.
$$anonymous$$ake sure your directional light has some hard or soft shadows selected If you have prevously baked lightmap, might need to rebake.
I'm not getting baked shadows in 5.2 either. I've got Soft Shadows set on the Directional Light (which is static). But no shadows after building lightmaps manually.
Answer by angeliapayne · Apr 14, 2016 at 04:42 PM
Bump on this issue. I cannot get shadows from trees to bake on ANY terrain in Unity 5.3.2p3. Has anyone been successful in Unity 5???
Unfortunately, there is no trick to it. It's not supported any more since they moved from Beast to Enlighten.
Why wouldn't they want you to bake shadows from vegetation on the terrain? It seems like any other alternative is too costly particularly with large terrains??
Your answer
![](https://koobas.hobune.stream/wayback/20220613185949im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Terrain trees not casting shadow 1 Answer
Instantiate trees on terrain with perfect height. 2 Answers
Do all trees sway the same? And do bushes for that matter? 1 Answer
Unity Tree Brush tool is not placing my tree models 1 Answer
Dense foliage on Android seen from above, performance, can it be done? 1 Answer