Home Unreal Engine

UDK Multiple UV problem!

TnT
TnT
Hi Everyone,

I am having an issue in UDK with using multiple UV's. I am trying to make it so my normals are on a separate UV than the Diffuse/spec. My issue comes in when I separated the 2.

Break down:

I am using the exact same model with exact same UV's for normal map.

Model with Error:

UV channel 1 in Max is my Diffuse
UV channel 2 in Max is my Light map
UV channel 3 in Max is my Normal

Model which works fine:

UV channel 1 in Max is my Normal
UV channel 2 in Max is my Light map
UV channel 3 in Max is my Normal

My material has the node for TextureCoordinates set to UV channel 2 (or 3 in max)


This is where my mind is blown. When I apply the same material to the different models. The one with my normal map in channel 1 and 3 looks find, but the one with Normals only in channel 3 and diffuse in 1 it makes the following errors.

bmRPf.jpg


As you can see the right hand side is having a weird lighting/normal error on the leftmost bumper in the front.


This is my Material I made for it


lhaaN.jpg

It is using COordinate Index 2 (UV channel 3 in Max)


My question is why would maving my normal map unwrap in UV channel 1 make a difference when the actual normal map is, or should only be referencing the 3rd UV channel?

I am very confused, if you are confused by my question, please do not hesitate to ask. I am really hoping to figure this out.

Replies

  • pricej
    Options
    Offline / Send Message
    It looks like the light map coordinate index is not set in the right-hand screen, and in the left hand screen it's 2 (isn't it typically 1?) Not sure if that would cause the normal errors though.
  • Oniram
    Options
    Offline / Send Message
    Oniram polycounter lvl 17
    im not really confused by the question.. so much as the method. why separate you diffuse and normal from different UV channels? are the UV layouts different?
  • ²Digitalgames
    If the normalmap and the diffuse map shares the same UV than you do not need to have to make different UV Layers for it. I guess you thought that UVmaps=Texture slots.

    What is possible is that you use one UV layout for your main diffuse, normalmap and so on and than another UV layout for dirt effekts and so one. There are some nice things you can do with it.
    In Ut3, Epic games used a extra UVlayer to get the "rezz in " effekt on Weapons and Vehicles. Really nice ! :)
    So i hope the answers from me and the others will help you for now :)
  • TnT
    Options
    Offline / Send Message
    TnT
    Hi everyone,

    Thank you for the replies. As for the method I was using for this, it is by no means my final idea. I watched a tutorial from 3d motive and saw his method for baking normals required a break in UV shells at every 90 degree angle. It works a charm but destroys (my) texturing technique. The reason my spec and normal are on different UVs is because I wanted to test out this new method I saw with something I knew was able to be done in Unreal.

    I am still tying to nail down my game pipeline and don't know if this is the best way to go about it. For anyone who may have a better idea would you mind telling me what you do when you need a 90 degree corner to show smooth in the normals? I really love this technique because it makes baking normals a breeze, but if this is a terrible pipeline choice I am by no means a slave to it.

    @pricej : I tried changing the lightmap channel but it didn't do anything unfortunately. I think in the static mesh viewer its dynamic lighting anyway.

    @Oniram : As above, they are different. It gave me the ability to make somethings which need more normal detail and less diffuse detail as well as bake perfect normal maps. That being said, I do not know if this is the best choice as it does add a little bit of time to the unwrapping process.

    @DigitalGames : They were meant to be different. Judging by everyone reaction, this is not a normal pipeline choice haha.
  • DeadlyFreeze
    Options
    Offline / Send Message
    DeadlyFreeze polycounter lvl 17
    We had another thread here about trying to fix lightmass specular which was suggested to switch the lightmap channel 2 for 1. The problem is that UDK seems to store the meshes tangent data with the UV's you use in channel 1. So switching in any other UV's gets you broken normals.

    Switching the diffuse and the normal channels from the way you have it now might make it work. So normals in channel 1 and diffuse in channel 3.
  • TnT
    Options
    Offline / Send Message
    TnT
    @DeadlyFreeze : That was it, Thank you for the explanation as to why it was happening as well as the solution!
  • King Mango
    Options
    Offline / Send Message
    King Mango polycounter lvl 10
    Every UV channel you add also adds to the vertex count for rendering which is something to keep in mind for optimization should it become an issue.
  • TnT
    Options
    Offline / Send Message
    TnT
    Interesting, I did not know it adds to vertex count. Does it double for each additional UV channel or how does it scale?
  • King Mango
    Options
    Offline / Send Message
    King Mango polycounter lvl 10
    I'm not sure now. I just did a test with an existing asset that already has two UV channels and used the generate unique uvs to add a third channel and the vertex count stayed at 570.
    I also tested a mesh with a single uv channel and the addition did not seem to change the vert count.
    I'm using the October build and I was told this by an industry pro over a year ago so maybe something has changed or maybe his in-house version of the engine handled it differently. But I also remember noticing this myself personally a while ago. Maybe July build. I fell kind of dumb now... Sorry folks.

    [EDIT]The first mesh with 570 verts in UDK has only 508 verts in Maya. I wonder if that's how I recall noticing this myself on some other mesh.
Sign In or Register to comment.