Home Unity

UV Set's Effect on Lightmapping for Environment Assets?

polycounter lvl 5
Offline / Send Message
Amank679 polycounter lvl 5
Hi Everyone & Happy Holidays!

I've heard that creating an extra UV Set (In Maya) for Pipeshoved combined objects eliminates potential lightmapping issues in Unity.

I've been trying to find an answer for whether this is true for some time but haven't come across anything.

For those of you that Pipeshove and use UV sets for Unity, have you come across any issues with baking lights? 

Thanks In advance!

Replies

  • Lt_Commander
    Options
    Offline / Send Message
    Lt_Commander polycounter lvl 10
    I'm not sure what pipeshove is, but it sounds like a mesh combiner. That aside, here's a quick rundown on how unity process UV's for lightmapping static objects:

    If you're using baked lighting, Unity explicitly uses the second UV channel for lightmaps. If you didn't author a second UV channel, Unity allows you to generate one using an internal unwrapper as part of the import settings dialogue, or it will attempt to use your first UV set. If you have mirroring or overlapping UV's you'll get lighting artifacts. Although the internal UV mapper generates serviceable UV's, ideally you'll want to author your own. Also remember that generating lightmap UVs on a mesh that already has them will overwrite the imported UVs in the second channel.

    Unity's realtime GI solution is a bit more archaic. When baking, it will re-unwrap all UV's and re-atlas them per scene, overwriting any data in UV channel 3. The quality of these generated UV's depends indirectly on your input UV's. Best results will come from user authored lightmap UV's in channel 2, and the worst results will come from objects without lightmap UV's and poor primary UV's (several faces unwrapped to a color swatch, heavy use of mirroring and overlapping, out of bounds UV data, excessive use of islands). That said, it's generally not possible to explicitly define UVs to be used by the realtime lightmapper.

    Mesh combine utilities usually have the option to atlas or regenerate lightmap UV's, and how it handles input UV's depends on the tool. You'll probably want to look at the manual for more, if available.
  • Amank679
    Options
    Offline / Send Message
    Amank679 polycounter lvl 5
     Lt_Commander Thanks for the reply! For my current project, we aren't creating a massive open world scene, It's completely an interior environment. We'd be baking most of our lightmaps. That said, thanks for the info! I'm fairly new to Unity and Unreal. I'll definitely look deeper into Unity's Internal UVwrapper and the other info you mentioned.
Sign In or Register to comment.