- Home /
When is Lightmapping bad for performance?
Looking to up my performance, I'm exploring lightmapping. The manual says basically it's a good thing because dynamic lights on objects will slow things down. Ok, but adding lightmaps also increases the texture usage. I'm a bit worried, esp on iPhone and Android, that the resulting lightmaps will blow my memory out.
What do you recommend?
Also, I assume that after a lightbake, I remove or deactivate the lights involved in baking, right? Or is that automatic? Any advice on point vs directional vs ambient?
I have never tried baking in unity but if you bake the textures at the res they are at already then surely there will be absolutely no difference in performance usage from the textures?
@Will: lightmaps add an additional texture on top of the textures you're already using. Otherwise you couldn't use tiling for regular textures, and that's why they use a second UV set.
$$anonymous$$y recommendation is to model your shadows whenever possible. I HATE low-res lightmaps; looks like splatters of garbage. And not in a good way. :-P
See Graphicalgeek's post.
http://forum.unity3d.com/threads/35160-Share-your-thoughts-on-vertex-colors-vs.-texture-maps
Will, as I understand it, the more 'live' lights (not static, that is) you have, the more calculations need to be done, so lightmaps improve performance by eli$$anonymous$$ating actual lights.
Jessy, you mean make polygonal models of shadows using darker colors etc.?
Answer by Eric5h5 · Oct 27, 2010 at 02:24 AM
Use as low resolution for the lightmap as you can get away with. Typically texel size for lightmaps is far larger than you'd use for regular textures, but since the lightmaps are just shadows and general lighting information rather than detail, you can get away with it. The built-in lightmapping in Unity will tell you the texture size and VRAM usage; you can always resize the generated lightmaps later (or rebake at a lower resolution).
Your answer
![](https://koobas.hobune.stream/wayback/20220613080951im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Why would Baked GI decrease my performance? 0 Answers
How do off-camera gameobjects affect performance? 1 Answer
2d or 3d for better perform on mobile devices? 1 Answer
many prefabs. application Performance 1 Answer
Efficient way of having 1 draw call but allowing for debris physics [Mobile] 1 Answer