Home Unreal Engine

Multiple UV channels using texture coordinate node?

Hey dudes,

Attempting to learn this formidable program right now (Still a noob) and I was wondering if anyone could help me out. I want to add an emissive map to my model in UDK, and from what I have read emissive maps are most efficient when using an alternate set of UVs that emphasize what will be emitting light, and scaled down to save memory. In my case, I'm using 2048x2048 diff/spec/normal, and a 256x256 emissive (which gives me about a 1:1 texel density ratio since only a small part of the texture is emitting light).

snD0O.jpg

I read that UDK can interpret multiple UV channels, and so in Maya before I exported there were three UV channels on my model- Standard UVs (UDK channel 0), Light map UVs (UDK channel 1), and Emissive UVs (UDK channel 2). When I create a material for the model in UDK, I have diff, spec, and normal all plugged in normally, and for the emissive I have a Texture Coordinate node plugged in with a Coordinate Index of 2, which SHOULD be my emissive UVs. Like so:

uSrSU.jpg

However, when I apply the material to the model, even after building lightmass, the emissive texture is generally all over the place, and does not appear to be functioning (It looks like it's just overlaid on the diffuse):

GHqfH.jpg

It seems the emissive texture isn't using the correct UV set after all. So I was wondering whether someone knew whether I'm setting up the UV channels right? Am I misunderstanding the texture coordinate node? Or maybe I'm just going about the entire thing the wrong way, and I shouldn't be trying to mix 2048s with 256s in the first place? *shrug* Any input would be greatly appreciated.

Thanks, guys!

Replies

  • ParoXum
    Options
    Offline / Send Message
    ParoXum polycounter lvl 9
    If you set your second UV channel to 2 in max you must set the parameter 1 in UDK because it starts to count from 0. Might solve your problem
  • Chandler
    Options
    Offline / Send Message
    Yeah, it should work the same with Maya, right? UDK channel 1 is already in use for my secondary lightmap UVs, so UDK channel 2 is my 3rd channel in Maya, which has the emissive UVs. :( Although I haven't set any parameters in Maya, I just assumed it would take the first, second, and 3rd UV channels on the model and assign them values automatically... maybe there's an extra step I have to take? ActorX should automatically export all UV channels on the model with the ase files, right?
  • ParoXum
    Options
    Offline / Send Message
    ParoXum polycounter lvl 9
    Yeah sorry, I read through your post too fast and didn't pay attention to the real problem.
  • Dan!
    Options
    Offline / Send Message
    Dan! polycounter lvl 6
    i dont believe the way you're going about this will work. I would either

    a: use the UVs from channel one- and use either a lower resolution texture for the emissive or embed the emissive map into the alpha channel of one of your textures.

    b: assign 2 materials to your object- one for the building, one for lights. The lights can now use the UV layout intended for UV channel 3 without interfearing with the building UVs.
  • Chandler
    Options
    Offline / Send Message
    Thanks Dan! I had considered option a, it just seemed like a waste to use such a large map for such a small detail. Though I hadn't thought about making the lights a separate texture... I may go ahead and do that.
  • tharle
    Options
    Offline / Send Message
    tharle polycounter lvl 9
    two materials on the same object is quite an expensive option. you could make them a seperate mesh but then if you wanted to say copy things around then you'd have to make sure things lined up everywhere etc.

    could just do it like you said though - have you tried importing as an fbx rather than using actor x? i just tried to do the same thing on a very simple cube and it doesnt look like actor x imports the 3rd uv channel. fbx works fine though. the actor x docs says it supports multi-uvs but tbh 2 is multi so it might just not support 3!

    also if you want to use 0 and 1 for textures you can change the lightmap uvs in the mesh properties if that makes things easier to think about.
  • Chandler
    Options
    Offline / Send Message
    tharle, you magnificent bastard! Using FBX worked like a charm! I guess ase's can only handle 2 uv channels, I'll definitely keep that in mind for the future... in any case, thanks a bunch man! :D
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    making the building as one huge static mesh like that is a bit of a waste of memory...

    other advantages of making the lamps as a single object is that you can use them to emit light. And you could put them in physics or animate them blowing using matinee.
Sign In or Register to comment.