Hello everyone,
I am new in Unity and I need some clarification on how lightmaps work. I am creating a game with Realtime lights and shadows only, nothing is baked. And my game is running smoothly and everything is good, but i want to decrease my game size. So, for this I am removing some unimportant objects from lightmap by setting 0 in “Scale in Lightmap”. So my questions are:
What will happen if I don’t add an object in lightmap?
is that object will look bad
What is the Pros and Cons of lightmapping an object?
Is not lightmapping will increase memory usage or GPU/CPU load?
or anything else you think I should know, then please explain that too.
Thanks.
If you are using only realtime lights and no baking at all there is no point in removing objects by using a 0 scale in lightmap as you don’t have any lightmaps anyway.
No that object will not look bad since you are not using baking.
Regarding 3), you can have a look at Unity - Manual: Lightmapping There is a pretty good amount of knowledge in there that can help you.
Thank you so much for reply. But what texture things are appearing in Realtime Lightmaps? Like index: 0, index: 1 etc in
Window>Rendering>Lighting Settings>Realtime Lightmaps.
When I am removing objects from Lightmap these index files are decreasing. Like previously I have 30 index files and after removing some objects index decreased to 18.
I do not fully understand the actual problem. So you do not want the Realtime lightmaps at all?
If that is the case: Realtime lightmaps are only used by Enlighten (Realtime GI). If you do not want this feature, simply disable “Realtime GI” under the Lighting tab in your scene. You can also strip the Realtime Lightmap Mode shaders from your build.
If you do not want some of your game objects have realtime lightmaps, then untick their “Contribute Global Illumination” setting in Mesh Renderer component.
If you do not want any lighting precomputed at all, so neither Realtime GI or Baked, then just untick “Realtime GI” plus “Mixed Lighting”.
But if you already have Realtime lightmaps, I assume this was not computed by accident and you want this feature?
Yes, I was talking about these things in my question.
You are using Built In Pipeline? Because these things don’t appear in URP. I switch to URP and these things gone. If you want to decrease build size then you should try URP. With URP build size decreased a lot.
So why should I use real-time lightmaps…
Progressive Lightmapper also creates real-time lightmaps when checking real-time GI.
Can someone please explain in one sentence?
Searching the internet, I can’t find any documentation.