Problem with Light on TerrainGrid

I have the Problem that only in the first chunk the Light update correct.
At some random time there is a big lag and all Light is correct.
Is there a way to update the Light manual.

I hope you can help me

I use the standard TerrainLighting Material

No

1 Like

I marked the spam as spam for you :slight_smile:

I watched the video but I’m not quite sure what it’s demonstrating? Is your material only being set on one section of the terrain or something?

No the Material is on all Terrains
The only Problem is that the Light is only update on the first.

And no the Light/Shadow is also everywhere.

At a random Time the hole TerrainGrid update the Light in a big Lagg but why not dynamik

EDIT:

sorry for my english

Seen a similar effect to this myself when using TerrainLighting, for me the effect was off for anything within the square of about 256 world-units around the origin, after that the shadows were ok… here you seem to have the exact opposite… which is odd…
I think personally TerrinLighting shader has some issues but never was able to prove it and have nfi on shaders myself to know why.

Even since the “Shader-Node” system was released I wished for a re-make of TerrainLighting on that to see if it was any better… not sure if anyone has though.

I had pics of the issues I had but not sure where I backed them up to now…
quick check though- set the material to use the Normal shader to double check the normals themselves are correct, if they are then I’d agree its a shader issue.

Edit: just check my old code, and remembered I only had the issue when I had a normal-map applied to the textures… when I used plain Diffuse and no normal-map it was fine, but with a diffuse and normal-map pair I had issues. just for reference…

I haven’t looked into the code yet but it looks like the normals aren’t recalculated when editing the terrain. The moment of lag is probably when the terrain runs the recalculation of the normals, that can take a little while.
So I think that this is by design, it is not a problem with the shader but with when the vertex normals are being calculated.

Thank you all
Now it works fine.

What did you do to fix it?