Home Unreal Engine

Normal Map Mirroring & Overlapping woes in UDK....SOLVED!?

polycounter lvl 9
Offline / Send Message
tristamus polycounter lvl 9
I'm posting this because I know there are many people out there who have no idea how to fix this problem, or have been searching tirelessly like I was recently. As far as I know and as far as I've seen and read, I have not seen anyone actually come up with a clear solution for this problem.

What's the problem when using overlapping UV's for your normal map and modular pieces in UDK?

wIQo2.jpg

As you can see, the shading is obviously very different. For this model in particular, one quarter of it was modeled only. The UV's were then laid out, and then that quarter piece was duplicated 3 times and placed appropriately to make the rest of the bridge. The texture is not square either, so that adds to the complexity of the issue. The texture is 2048 x 1024. This is important to remember for reasons later on.

tpdpA.jpg

So, how do we fix this issue with what we have going on here?

For people using square textures, and people using rectangular 2:1 ratio textures, there is only 1 difference. That difference is where you place your overlapping UV's!

See here, for this particular model, I moved my UV's over by every other tile, using UV Deluxe (get it,makes things easier)...

rZzcC.jpg

But as stated in the image, I would assume someone using a 1:1 square texture would only have to move it over left or right by 1 tile.

I will also assume here, that it does not matter whether you place your extra overlapped UV's to the right, or to the left. As long as they are in the Positive (+) V space. Meaning, anywhere U direction. I could possibly be wrong about this point, though.

Anyways, once you've placed your UV's appropriately and re-export as FBX, UDK is happy!...

JCNRD.jpg

I also want to make note, that if you are still getting that shading problem, turn OFF your "Tangents and Binormals" option whilst exporting as an FBX!

I really hope this helps people, because for some reason I was not able to find a source to clear this issue up. When I finally figured this out, I wanted to scream with joy lol...

Replies

  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    I juts did a quick test with a baked and mirrored sphere. Your UV trick doesn't have any effect at all on the problem on my side. However, disabling the tangent and binormals at the export (from Maya) did the trick. But it's a bit a problem to be obliged to disable that option. :shifty:

    1351894936-mirror_udk_01.jpg

    1351894940-mirror_udk_02.jpg

    Even if mentioned in the FBX documentation, the triangulation has no effect (whatever method I use to do it).



    (Tested with FBX 2013.2 (using exporter set on 2011 file version) and UDK January 2012.)
  • tristamus
    Options
    Offline / Send Message
    tristamus polycounter lvl 9
    Hmm, I see! It truly is strange that Tangents & Binormals MUST be off for you in this case.

    There is another point that I failed to mention in my previous post, and it is that when you import your normal map texture into UDK, you should set the "Address X" mode to "Mirror", and make sure your "Unpack Min" settings for (0), (1), and (2) are "-1." This is actually very important and I don't know how I missed it lol! Let me know if that changes anything for you Froyok!
  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    The Address X parameter has no effect when the UVs are spaced like in your examples above and it brings errors if I just move the mirrored part from only 1 UV space.

    I will give a try to the last version of the UDK, since it load correctly the Tangent/Binormals (related to the xNormal workflow).

    [EDIT] I just tested with a skeletal mesh : when the Binormals are disabled the mirror works fine.
Sign In or Register to comment.