- Home /
Where does unity store the generated lightmap UVs?
Hi there!
We're having problems synchronizing our Beast light maps with external version control. Even if we synchronize the asset files (the actual geometry) and the meta files, the generated light map UVs are not updated. So we figure that the actual UVs have to be stored elsewhere. Does anyone know where that is?
Thank you!
Context: If you want to use Beast light maps, you (usually) have to let Unity generate a set of light map UVs. (See manual)
Answer by Paulius-Liekis · May 25, 2011 at 09:33 AM
You basically can't do that (or you shouldn't). The idea is that "Secondary UV" is generated on first import, which means if you put FBX file in your source control system then SecondaryUV will be generated on each users machine. To answer your question: they are stored somewhere in a Library folder, but you shouldn't put that on source control.
Why do you want it on source control? I know one reason to do it: it might generate different UVS on Mac and Win in some cases, but besides that you should be fine by generating them on each computer.
Hey there! I guess I missed your answer while they were switching system - sorry! We were using GIT to synchronize our project and frequently ended up with different UVs on every system - which meant the Lightmaps would only work properly on some computers, you had to be careful where to publish and so on. I wanted to analyze the problem and therefore was interested in the location of the UVs. Recently though, we switched back to the asset server and the problem kind of solved itself.
And another question: I got the impression that Unity kind of randomly creates the light maps UVs on every import - sometimes they would look different if I simply re-imported the FBX files (without any changes to the geometry). If that is the case however, importing the UVs on different computers would never work, because it would always give different results, and never fit the light maps...? What am I missing here?
In theory UV calculation should be stable and as much as we tried it is stable (as long as you run it on same computer). It seems that we removed differences between different versions of windows or macs, but there are know issues with differences between macs and windows. If you experience any issues with that - we recommend submitting a bug.
I see. Thanks a lot for the clarification! We are using Windows PCs and OSX $$anonymous$$acs (and $$anonymous$$acs running Windows ;)) in our $$anonymous$$m. But recently, the light maps have been working flawlessly.
@andresp well...it copies imported model (i.e. gameobjects, meshes and so on) into new prefab, which can be stored in source control after that.
Your answer
Follow this Question
Related Questions
Lightmap UV problem with external version control 1 Answer
Lightmapping UV problem 3 Answers
Unreal lightmaps VS Unity lightmaps 0 Answers
Weird lightmapping issue 1 Answer
generate lightmap uvs? 1 Answer