- Home /
How to set up Blender model for Unity lightmapping?
I try to lightmap my scenes for almost one week and just can't get it to work! I went through various tutorials and docs including the unity lightmap guide but it still won't work out for me. I tried different types of materials, texture import settings and mesh settings. But I get the same result over and over: Everytime I bake my scene everything turns dark and unity tells me that both primary and secondary uv maps are missing. I have no idea why, because I checked "Generate lightmap uvs" in the mesh import settings. Maybe I missed something when I modelled my objects in Blender (I only know the basics of modelling in Blender).
I hope you can help me out with this because I'm really desperate now. :(
EDIT: After further experimenting Unity says "Primary UV set on Cylinder_MeshPart0 is incorrect and the secondary UV set is missing. Lightmapper needs UVs inside the [0,1]x[0,1] range. Skipping this mesh... Choose the 'Generate Lightmap UVs' option in the Mesh Import Settings or provide proper UVs for lightmapping from your 3D modelling app. UnityEditor.DockArea:OnGUI()" But I still have the "Generate lightmap uvs" checked... So now I'm pretty sure the problem arises of my Blender modelling skills :D
Does anybody know how to fix this problem?
=> I think the main problem is to prepare my blender models for lightmapping in unity. I have no idea what has to be done in blender so beast can bake my scene in unity.
You probably have UVs outside the UV map if you know what I mean. The UVs have to be inside their little square.
Thanks for your response. But could please explain how to make the uvs to be inside their square?
Yeah, you have to do it inside of Blender. I don't remember how to do it exactly, but I think if you just go to your UV/Image view in Blender you should be able to move your UVs around...something like that.
All uvs are placed in the square but I still get the same result with a slightly different error message: Secondary UV set on Cylinder_$$anonymous$$eshPart0 is incorrect. Lightmapper needs UVs inside the [0,1]x[0,1] range. Skipping this mesh... Choose the 'Generate Lightmap UVs' option in the $$anonymous$$esh Import Settings or provide proper UVs for lightmapping from your 3D modelling app. UnityEditor.DockArea:OnGUI()
At least the primary uv set seems to be correct this time...
Well maybe your UVs are overlapping, did you check that?
Answer by jpatinop80 · May 12, 2015 at 09:48 AM
Well. I had your same problem, and I really don´t know why this happened but only happens when I compress the mesh, no matter if is high medium, low, you have to TURN OFF the mesh compression and all those errors will go!! it works for me!!! I hope this could help anybody!!!
Your answer
Follow this Question
Related Questions
Lights not baking to blender room properly 0 Answers
Acces Beast uv data 0 Answers
No lightmap on FBX models 1 Answer
Beast Lightmapping issue 1 Answer
U3: Beast Lightmapping + Nature / Soft Occlusion Shader 1 Answer