- Home /
How do you use combine children and lightmaps at the same time?
Before doing this in my current scene, I reverted back to one of my old scenes that used lightmapping, and put 2 dumpsters in the same parent, and applied the script to them. With Static checked, they disappear. With static unchecked, the lightmap goes away, and they use real lights(or no lighting since I disabled them the lights in the scene). I have read that it's possible to do both, but it seems that a lot of people have the same problem, and they never get their solution. I tried taking a look at some of the unity tutorial projects, and none of them use both. This is really important. How can I get this to work?
I created a simple test scene made of default cubes to see if I could do both. Every time I check the combine children script, the lightmaping turns off. I tried by making the parent static, and unstatic. Then
Just a note. I created 1 set of UVs, but in the FBX Importer, I selected "Generate Lightmap UVs"
Has anybody found some solution to the combine + lightmap issue?
I solved this, as I combine in the editor, by calling Unwrapping.GenerateSecondaryUVSet().
Our game is tile based, but we can bake the game geometry into less discrete blocks, but this breaks the UV mapping. We do have some issues with light bleeding from the lightmap in odd places, but it isn't terrible and we can fix it we hope, manually if necessary.
Could you explain this Bovine? I am no Coder..so where and how do i do this like you did? Thanks for any help
Hmm, I had a different problem with lightmapping and combineChildren, that UV unwrapping solved. Whenever I would combine more children of same type, lets say 10 wooden barrels, they would all receive the same lightmapping. Even if some were completely in the shadow and some completely in the light. The UV modification in CombineChildren solved this for me. Currently, I firstly combine children in Editor, and then apply lighmapping in editor. The modified script is here: https://dl.dropbox.com/u/14789218/CombineChildren.cs
Your answer