Home Technical Talk

How to fix Tangents when using modular geometry

polycounter lvl 14
Offline / Send Message
fade1 polycounter lvl 14
when using normal maps with modular assets, i get seams on the borderedges of the 3d tile.
this comes from different facing tangents(not vertex normal!) on the seams, as they are calculated from the uv position of the corresponding vertex. is there a way to fix this, as i have no tool to edit this manually in maya? my only solution would be that the engine needs to bake everything an recalculate all tangents, but of course our engineer that this is not practicable. Maybe somebody who worked on modular assets has an idea or approach for this.

Replies

  • Mark Dygert
    One trick that some people do is to weld copies of the mesh on each tile edge and then push the UV's for those pieces outside of the renderable 0-1 area. I'm not so sure that actually works because when you delete the copies the normals change and that will probably give you a seam.

    I use 3dsmax and I edit the normals by hand (and through script) so they match and tile correctly then bake. but if you can't do that then it gets pretty dicey...
  • rube
    Offline / Send Message
    rube polycounter lvl 17
    In maya if you duplicate your geometry so that you have each tiling edge tiled (eg, in a 3x3 grid if it was a tiling floor piece) you can just select the verts around the edge of your original and do Normals>Average, then it'll smooth the normal even across objects. Hope that made sense.
  • passerby
    Offline / Send Message
    passerby polycounter lvl 12
    make sure the normal vectors for all the verts where meshes meet are pointing in the exact same direction. this helps a little.


    best option in my opinions is to use panels and pillars and other assets to cover said areas.
  • fade1
    Offline / Send Message
    fade1 polycounter lvl 14
    thanks for the help. probably i didn't explain right. The normals are fine. It's tangents on the esdges that cause the trouble. but you can't edit tangents, as they are calculated on the vertex normals AND the uv position. the uv position is something i can't alter as i use tiling textures.
  • Harbinger
    Offline / Send Message
    Harbinger polycounter lvl 8
    Can you post a screenshot of the problem in-engine? Also, what tech are you using?
  • fade1
    Offline / Send Message
    fade1 polycounter lvl 14
    of course. we use our own engine. but it works like maya. if i would use blinn, you would see the same error.
    i understand why this happens. i don't get why calculating the tangents from the uv vertices has any reason or benefit, but this is how normalmapping seems to be designed. i need a way to work around this problem.
  • Farfarer
    Offline / Send Message
    Farfarer polycounter lvl 17
    Calculating the tangents fron the UVs is the only way to do it. Wouldn't be tangent space if you didn't.

    If it's a tiled, instanced, modular mesh, have you considered just sticking to object space?
  • fade1
    Offline / Send Message
    fade1 polycounter lvl 14
    @Farfarer
    that does not work, as i wrap textures around different types of meshes. never used udk, but if you tile a floor or use a tiling rockwall, don't you get the same seams there...
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    Does the same stuff for me (never thought it did either).
  • fade1
    Offline / Send Message
    fade1 polycounter lvl 14
    mmh. i tried to simplify even more. the mesh got welded vertices and i just did a uv split. this destroys the unified tangents. if there is now way to fix this, you basically can never get clean tiling stuff, when surfaces are not straight. sounds unreal to me...
  • Pola
    Offline / Send Message
    Pola polycounter lvl 6
    Aren't the UV shells overlapping? Or additional copies offset by 1 in UV space? Binormals shouldn't affect the visuals. From memory they are just a representation of the 3D to 2D of UVs. Vertex and face normals are the ones that you want to make sure are right. If the issue is only visible in UDK perhaps try some other engines/renderers. I think I remember someone saying UDK can mess with the tangents/rendering though I think that was for normal maps only.

    Also are you editing the mesh/uv's after a normal map bake? That might be causing your problem too?
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    I did this on a flat plane, with a normal map applied, and the tangents will diverge even on continuous sections if you split the UVs. I was using Maya 2013, but installed 2014 a few days ago (don't know if that would do anything).

    The following image shows a sort of specular seam (You can see it on say a lambert but it harder to notice) between the 2 meshes, and the 3rd mesh has its UVs split in the middle, which shows the seam also.
    65F520M.png

    I have done modular stuff before, and didn't run into this issue or Maybe I was using Maya 2012 or was just paying attention to the vert normal to make sure there wasn't a seam.
Sign In or Register to comment.