Terrain Detail

Hello everyone!

I was wondering if anyone can help me understand what is happening on these pictures.



I am using the terrain details tool, and I noticed that at random some of these details are incorrectly lit/rendered. This bug/my lack of knowledge has been with me since Unity 2022.

Thank you for your time!

2 ideas:

  • It’s a non static asset that has not been baked with the rest of the environment. So you need to make it static and rebuild your light or adjust the Intensity Multiplier setting of the Environment Lighting.
  • This is an asset with a different material shader (in Unlit mode for example).

I am using Real Time lights only, because i have a Day & Night cycle and I dont know if I should bake anything.

All the foliage I use is GPU instanced via Terrain Tools. Cant change it to static.

Here is a picture of the terrain detail under direct sunlight.

In a shadow of a tree

Each new stroke with a brush fixes one detail that is like this, but makes another one just like this one.

Your foliage uses prefabs with materials and therefore shaders. Even though everything is done in real time, shaders do not react in the same way to light. Ensure all your folliage prefabs have the same parameters, otherwise they will react differently to light.

  • On all your foliage prefabs: Look for the static parameter and make sure each option is disabled. Look for the Mesh Renderer → Lighting parameters and make sure it’s all set as you intended (also Probes if you use them).

  • On all your foliage materials: Make sure they have similar shaders, if not you might want to dig into it. Also check the material parameters for Workflow Mode/Receive Shadows option/Metallic value, smoothness and Source/Advanced Options (Specular Highlights & Environnement Reflections), they must be the same on all your foliages.

I made sure that every single prefab looks like this.

And about the shaders, i mean they are similar… all of them have smoothness, metallic, Ambient Occlusion, normal etc, except not all of them are from the same manufacturer/asset. I hope you didn’t mean they have to be from the same asset.

I can’t guarantee this but different shaders may indeed act differently. Check if there is a specific shader that has this lighting problem. If so, try not to use this specfic shader.

Tested it on all of my shaders, only those added to the details in the terrain tools get affected.