- Home /
Is it possible to bake lightmap for procedurally generated mesh?
Hi,
I asked this in forums, but I got no reply. I thought I try here...
For a mobile targeted game, I plan to create a tilemap which I estimate will be up to 50k triangles. In order to optimize it, I decided to use very few textures.To further optimize it, I also want to bake the lightmap. However, I'm not sure if it is possible to do on a procedurally generated tilemap.
Because as far as I know, usually to bake the scene, they import all models and lights, mark them as static and then bake them. The problem is, I won't have my map in the editor, it will be generated when the Awake() function is called. So I started to wonder if this is possible at all...
Many thanks in advance for your support.
It's not possible at runtime, but you can change your code to generate the mesh in edit mode, bake the lightmap, delete the mesh, and use that lightmap for the mesh which gets generated at runtime. In theory, at least.
Answer by tanoshimi · Oct 12, 2015 at 09:35 PM
No. Baking a lightmap is a (resource-intensive) activity that must be done in the editor prior to compilation, so there's no way to do it for.procedural meshes generated at runtime.
Your answer
Follow this Question
Related Questions
Adding Lightning Effect 1 Answer
progressive lightmapper not reach 100% CPU 0 Answers
Weird dark spots when baking light 1 Answer