Custom mesh not affected by light


I’m generating terrain by chunk and the first chunk generated is never affected by light. For example, I just put the Sky Light value to 0 and this is what I get :

This is what I get with normal lighting :

Somebody has an idea ? I don’t change anything related to light in my code (even if I remove the Material, I have this issue). Why is the engine not taking into account the first generated AActor ? This code is called like so : in level blueprint I spawn an Actor (ChunkManager) and this Actor creates overtime multiple Chunk in AChunkManager::Tick. Chunk setTriangles for its mesh in AChunk::generateMesh (called by AChunkManager).

Thank you!

I did some test and it looks like a bug. There is a range from (0,0,0) where meshes in it don’t get light from the scene (around 444 units). If I move the starting chunk at (-444, -444, 0) you can see that there is a zone where light is not calculated :

Maybe this is a problem with Custom Mesh : A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

I will continue to dig deeper.


Light is calculated but not correctly. If I put the sky light to red, every chunk will be red except the first (will be purple).

Probably some wrong settings with the light? (No experience with sky lights myself) Might read through this: Sky Light | Unreal Engine Documentation

Do other lights work? as you have removed the default one.

I have the exact same problem with the tutorial. If I put the object in the center, it stays red, If I put it farther, I will be completly dark.

Here is the post