Home Technical Talk

Unity and center seams

polycounter lvl 15
Offline / Send Message
JohnnyRaptor polycounter lvl 15
Hi guys,

just a quick post to ask if anyone knows if Unity supports normalmaps with UV seams along the center line?

UDK for example does not support this and for example, you cant have a 100% mirrored torso on a character etc. You need to be a certain amount past the centerline before you can mirror a normalmap without getting a seam in the engine.

if anyone knows this, i would appreciate any info,

Replies

  • Gerotoi
    Options
    Offline / Send Message
    You can, though you have to bake the normals with an extra loop of poly's around the seam on the low poly. Pic hopefully explains it a bit better.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    Nooo, you don't bake half a model, you offset one side uvs and bake the entire model.

    Extending the loop won't produce a correct result.
    Normal map generation is dependent of your mesh normals so they have to stand the same between generation and final model.
    I guess you coud bake half a model if you keep the middle edge hard on the final mesh, but what about the projection cage and stuff. This would be unnecessary painful.

    I don't see why any engine couldn't handle it, mirroring a normal map is just a shader issue.
  • Farfarer
    Options
    Offline / Send Message
    If you let Unity calculate the mesh tangents, I've not had issues with this.

    However, importing tangents has seemed to screw this up for me.
  • JohnnyRaptor
    Options
    Offline / Send Message
    JohnnyRaptor polycounter lvl 15
    looks like i wasnt clear enough about what i meant.

    Im not talking about the mesh or how to bake the normalmap.

    Either way, from the sound of things, Unity, like UDK, does not support mirrored normalmaps along the centerline, and just like UDK, you will have to mirror from slightly across the centerline for it not to have any seams.

    Quote from Unity,
    All of Unity's built-in shaders and all surface shaders support mirrored tangent space using homogeneous tangent vectors. This means that if your modelling program outputs tangents with the correct W component (1 for normal, -1 for mirrored), then normal maps will look fine even if the UVs are mirrored. Here is an explanation: http://forum.unity3d.com/threads/65859-Symmetric-models-with-mirrored-normal-maps-Shader-Fix?p=420888&viewfull=1#post420888


    The one place where your modelling program probably won't help you is on the UV seams that transition from normal to mirrored. For these places, you have to make sure that your normal map is continuous when mirrored. Here is a good explanation of how to do this: http://www.polycount.com/forum/showthread.php?t=51088


    edit, thanks for the trying to help tho!:)
  • Gerotoi
    Options
    Offline / Send Message
    Noors wrote: »
    Nooo, you don't bake half a model, you offset one side uvs and bake the entire model.

    Huh, that sounds much easier... I never thought of that. cheers
Sign In or Register to comment.