- Home /
2 UVs set and need lightmap UV slot
Hi, I want to know how can I do to put a lightmap on one of my material which has a shader using already 2 UV slot ?
If someone got some tips with that ?
Thanks.
Answer by Paulius-Liekis · Aug 29, 2012 at 01:08 PM
At the moment you can not have more than two UV sets in Unity. So solution is either to use first UV1 for what you're using UV1&UV2 (i.e. they have to be the same), or simply do not regenerate UV2 and use it for lightmaps (in this case UV2 has to be 0-1 bounds and has to be non-overlapping)
Unity can generate UV2 for lightmaps or you can import UV2. So I was suggesting that you can try reusing UV2 for your effect and lightmaps as long as it suitable for lightmapping.
Please do not post comments as answers. Welcome to Unity Answers!
Edit with previous answer : Unfortunately, our 2 UV1 & UV2 don't have the same tilling/offset so your first solution is impossible. Then the second I don't really understand what you mean ?
Ok. I understood but my texture in UV2 need tilling and offset. And my lightmap got her own tilling/offset (in prefab information) so I think not I can do this solution too :/. This problem really stuck me é_è
Another solution could be packing one of your UVs into Tangent or Color channel (assu$$anonymous$$g that you're not using it for something else).
Normal$$anonymous$$ap using tangent if I don't misunderstand me. SO maybe color channel can be used. I never do something like that, did you have some example to quickly show me the idea ?
Your answer
Follow this Question
Related Questions
Fixing UV for Lightmap Help me please please please 2 Answers
Using second UV as Lightmap. Slow? 0 Answers
Blend between 2 lightmaps 0 Answers
Assigning differents textures to two differents Uv sets on one object. 3 Answers
Apply an affine transformation 2 Answers