Home Technical Talk

Winding and Normal Maps

polycounter lvl 14
Offline / Send Message
fade1 polycounter lvl 14
i have a problem regarding the winding of uv's, when mirroring normal maps. usually the reversed winding(=flipped uv's) is fixed by the shader in the engine, so the normal maps render right on both sides of the model.
the hardware i'm working on does not support this. is there a way to fix this? the only solution i have in mind is baking the normalmap to a uvset without overlapping uv's, so no flipping is needed? maybe someone had a problem like this before and knows a workaround.

Replies

  • almighty_gir
    Offline / Send Message
    almighty_gir ngon master
    have you tried offsetting one side of the mesh's uvws?
  • Bal
    Offline / Send Message
    Bal polycounter lvl 17
    I'm pretty sure this should be software specific, not hardware, just have to find the right programmer to bother until he fixes it in the engine you're using. :)
  • fade1
    Offline / Send Message
    fade1 polycounter lvl 14
    @Bal
    the problem can't be solved with the shader. it's the hardware we are working on.(a console...) the manual stats that uv winding order needs to be clockwise. if not the normals will render upside down.
    i just have no clue how i could use mirrored uv's then, as the winding order will always be wrong.
  • Bal
    Offline / Send Message
    Bal polycounter lvl 17
    Strange limitation, what console is it? New PSP or 3DS or something?
    Even if it's a hardware limitation, it still feels more like a programming problem than a 3d artist one, if there is a solution it's most likely a hack in the code I'd think, have you talked about it with the engineers where you work?
  • Quasar
    Offline / Send Message
    Quasar polycounter lvl 19
    Might be a dumb question, but did you mirror your geometry after projecting your normal map? That would definitely cause this problem.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    We just went through this exact same issue, I think it was the export step that needed to be fixed not the shader, ie the pipeline was not forcing the correct winding order when the mesh was exported out of maya. In the attribute editor of the mesh you have a rollout called tangent space in there you can turn on left handed and ignor and that should fix the issue in the maya viewport. That's how we figured out it was mesh formatting issue and were able to fix it in the pipeline export step.
  • fade1
    Offline / Send Message
    fade1 polycounter lvl 14
    We've had some research on the whole problem and to close this thread here are the results:
    The gpu of the console(a new handheld) we're working on, can't handle winding problems.(The problem is that the gpu does not store the pointing direction of the vector, as far as i understood). There is no solution in maya(or any other software) to fix this.
    Code could fix this for unskinned vertices and even then the performance would drop more as by using a twice as big normalmap. For skinned meshes there is no workaround.
    So thanks for the feedback.
  • Numerator
    The other alternative is to double the vertex count and to specify the tangent space explicitly.
Sign In or Register to comment.