when looking at he built lightmaps these contain both the lighting informations and normals for the directional lightmaps to look better with normalmapping. Looking at the compiled shaders in mobile preview the lightmap is just sampled once so I would assume the normals are not sampled at all.
Is there a way to not generate these and just have the light information in them? We could either save a lot of space for our app or increase the light quality in general.
The lightmap is generated in LightMap.cpp.
thanks for your answer.
I know that the lightmap is actually generated there, but it would have been nice to get the line of code where the normals are generated or added to the texture.
Looking at the lightmap.cpp I cant find anything regarding normals.
I’ve not actually tried this out, but it looks like the coefficients are added in FLightMapPendingTexture::StartEncoding()
to avoid adding the bottom part of the texture atlas you could try changing the texture size and omitting the code that adds that data.
// remove the *2
Texture->Source.Init2DWithMipChain(GetSizeX(), GetSizeY() * 2, TSF_BGRA8); // Top/bottom atlased
// and then disable code related to filling in data to the lower half of the texture:
int32 StartBottom = GetSizeX() * GetSizeY();
starting from Texture->Source.Init2DWithMipChain(GetSizeX(), GetSizeY() * 2, TSF_BGRA8); I was actually able to trace back through the code and succesfully removed the normals from the lightmaptextures. Now our levels are half as big as before
Excellent ;), it does sound like it could be useful…