Home Technical Talk

UDK normalmap seams

Electro
polycounter lvl 18
Offline / Send Message
Electro polycounter lvl 18
Ok, this is driving me nuts.
I'll try and be as short and to the point as possible, while still hopefully giving enough info.

I'm attempting to use a normalmap generated using xnormal in photoshop off a simple hand painted heightmap.
The idea is to keep things modular, use 1 texture for a heap of details, cut and chop geometry, mirror polygons, rotate others etc. Whatever it takes to recycle things as much as possible.

Here's a simple panel in the max viewport:

max_persp_01.jpg

same, with wires:

max_persp_02.jpg


For UVs, I have the lightmap UV coordinates in the first channel, and the actual modular parts for visual details, in the second channel. This is wired up accordingly in the UDK material.

uv channel 1:

max_uv_01.jpg

uv channel 2:

max_uv_02.jpg

Exported using FBX with smoothing groups (1 smoothing group, it's a flat plane) and tangents/binormals.
Imported into UDK using the July 2012 build (seams were the same with previous build) with Import Tangents and Explicit Normals.
The normalmap texture is brought in as TC_NormalMapUncompressed, to eliminate compressed as any kind of contributing factor.

The following are the results, firstly with diffuse/spec:

udk_seams_01.jpg

And now with lighting only:

udk_seams_02.jpg

Ignore the other panels above and below, those are a separate test and are not usable how I want to recycle this texture as much as possible.

As you can see, the seams are the main feature, obviously trying to figure out a way to rid of them.

No doubt I missed some info that I'll be able to give in a follow-up post.

Any and all help is appreciated, cheers.

Replies

  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    Have you put uv channel 1 back into 0, and put 0 back into 1 and tried doing it the normal way? Is there any seam issue that way?
  • DeadlyFreeze
    Options
    Offline / Send Message
    DeadlyFreeze polycounter lvl 17
    The problem is your rotating your normals when you flip/rotate your uv shells around, so each uv shell is reading the normals differently.

    One shell is reading the normals as red/green, and another shell is reading it green/red and between them you end up with a seam.
  • Electro
    Options
    Offline / Send Message
    Electro polycounter lvl 18
    Quack!: still weird seams doing that, different results, but broken anyway.

    DeadlyFreeze: Sounds logical (and dumb) that they're getting swizzled, guess they're not being recalculated properly. Any suggested workarounds? I made the other sections by mostly rotating the geometry sections and then welding.
  • DeadlyFreeze
    Options
    Offline / Send Message
    DeadlyFreeze polycounter lvl 17
    Not to my knowledge, it will basically come down to bringing in an additional map with green/red flipped. People have tried to do the flip in UDK but I never saw anyone get it to work.

    Rotating UV shells in UDK is just a big no no when you need to have seamless textures/meshes. You will also be dealing with the lightmap specular issue I explained in this thread.
  • Electro
    Options
    Offline / Send Message
    Electro polycounter lvl 18
    Yeah I've gone through your thread when looking for info on how to fix seams. I guess if there's just no way around it, I'm going to have to make much more inefficient textures where I don't need to flip/rotate anything. Pretty big shame.
  • Snefer
    Options
    Offline / Send Message
    Snefer polycounter lvl 16
    Well, first of all using the UVs like you do now cancels out the lighmass seam error, so that is fine, this looks like you have a standard normal confusion. Try separating your UVs and move the sections outside of the 0-1 area so they are not overlapping and see if that works. If you have UVs mirrored like that and they are on top of eachother the merge of UV-coords at the shared edges can mess up the normalmap shading : ))
  • Electro
    Options
    Offline / Send Message
    Electro polycounter lvl 18
    Thanks Snefer, that did the trick!
    Additionally for future reference of anyone viewing this thread...

    Go into the "Static Mesh Editor".
    Turn on, "Use Full Precision UVs"

    Otherwise any of the offset UVs to fix seam issues, will have imprecisions and end up creating seams anyway as a result.

    Here's the fixed mesh with offset UVs (none of the mirror/rotated UVs are overlapping, each of the 4 corners is offset by 1 full UV coord.

    DeadlyFreeze, I'm sure you will be happy to see these results :)

    udk_seams_03.jpg
  • DeadlyFreeze
    Options
    Offline / Send Message
    DeadlyFreeze polycounter lvl 17
    Wow this looks great.

    You have peaked my curiosity so I'll throw a question in here. Since the normals are getting mirror'ed in all directions doesn't this basically 'average' the lighting across the surface? It dosen't look like it's happening on yours.

    like such:
    left is mirrored norm's, right unmirrored(just to show what correct lighting)

    sG94v.jpg
  • Electro
    Options
    Offline / Send Message
    Electro polycounter lvl 18
    Weird, not sure what I'm looking at with the left one.

    Is it divided right down the middle? So it's mirrored horizontally? On the mirrored section, offset it by 1 full UV coord.

    To re-iterate:
    UV Channel 1: single flat lightmap UV (no overlapping or mirroring etc.)
    UV Channel 2: any overlapping UV's, offset

    Export with:
    smoothing groups (should only be 1 of them in this case)
    tangents/binormals

    Wire in the texcoord nodes in the material so that it knows the UVs are in the 2nd channel.

    Need to see more pics from you to try see what went wrong.
  • DeadlyFreeze
    Options
    Offline / Send Message
    DeadlyFreeze polycounter lvl 17
    Assuming I set it up like yours, like such...


    hIuFT.jpg

    but that means you always end up with inverted norms, they are in the correct red/green space but pointing 'inside out'.
  • Electro
    Options
    Offline / Send Message
    Electro polycounter lvl 18
    Don't have the normals on your geometry flipped. Just have them all pointing out from the surface like a regular plane. Weld all the verts together.
    UVs are a different story though, none can overlap in UV channel 2 (visual UVs) So anything that is flipped there, needs to be detached and offset.
  • DeadlyFreeze
    Options
    Offline / Send Message
    DeadlyFreeze polycounter lvl 17
    The plane is a single element, none of the verts are broken. Only the UV's are rotated/flipped to tile the normal. Isn't this what your doing also?

    If so how do you not flip them using only a normal map section to tile them?

    All my overlaps are offset.
  • Electro
    Options
    Offline / Send Message
    Electro polycounter lvl 18
    Sounds correct. Do you have lightmap UVs (should be single uv element for this plane) in uv channel 1?) and visual UVs in channel 2?

    Double check the vert normals are pointing up towards the camera? Definitely something weird going on there... hmm

    Maybe upload the max file?
Sign In or Register to comment.