Game Development Community

Multi UV channels example

by Yuri Dobronravin · in Artist Corner · 08/05/2013 (12:12 pm) · 7 replies

Hi guys!

We're trying to create a simple mesh that should have several UV channels mapping for the single object.
AFAIK it possible with T3D and Collada.

Actually we need a aircraft runway with tiles of concrete and marking.

We're aiming for something like this
img96.imageshack.us/img96/8291/9b6a.jpg

I would appreciate very much if someone would share 3dsmax example of the model with working 2 UV channels that works in Toque or tell how exactly materials should be configured.

#1
08/05/2013 (3:33 pm)
Here you go:
s14.directupload.net/images/130806/47yqyltx.jpg
#2
08/06/2013 (1:03 am)
Thanks, Duion. I tried layers, but the problem is that Layer 1 uses the same UV mapping that Layer 0. If I manage to assign different UV to Layer 1 my problem will be solved.
#3
08/06/2013 (1:48 am)
That is getting more complicated, but what you showed in the picture can be done with one UV-channel.
Sure you might want to have the floor tiles in a smaller UV-map, but this can be done if you expand the "Advanced Texture Maps", there you can give it a detail texture map, you can tile this down so it will appear more often.
Sure multiple UV-channels would be handy in some cases, but in your case this can be solved otherwise, I for example would just build new models for every kind of piece you have there, or straight in one piece with detail texture, or just paint decals over it, there are many ways.
#4
08/06/2013 (4:20 am)
@Yuri,
If you setup UV channel 1 and 2 on any object and export it as DAE you will end up with an object with properly setup two UV channels. The problem here is what to be the way you wish Torque 3D to handle these two channels.
Why don't you merge these two textures in one and use only one UV channel?

Anyway for an example of how to use two UV channels you can take a look at the T3D's material system where, channel 1 is used for diffuse and channel 2 for lightmap:

diffuseMap[0] = "texture_for_channel_1.jpg";	
toneMap[0]    = "texture_for_channel_2.jpg";
#5
08/07/2013 (4:21 am)
@Lyubomir,

I can't merge those texture to one diffuse because one supposed to be tiled.
Anyhow I managed to do this via Overlay Texture and model with two UV channels. Probably toneMap[0] is also use second UV channel so will work as well.
#6
08/07/2013 (1:02 pm)
Edit: some correction to the steps 1-6 below

@Yuri,
if you pass texture to toneMap[0] and your model has an already setup UV channel 2 for that particular texture it will work. But this texture will not appear the way you want, because toneMap[0] is used for making tone mapping, not diffuse, i.e. you will see this texture mapped properly on the model but it will add shades on the model instead of pure diffuse color.

I understand clearly what you are trying to do. Believe me using a second UV channel for a thing like this is redundant. It is possible to be made via additional code and/or modification to the game engine, but it is redundant. I would act for a case like yours this way:
1.Merge texture 1 and texture 2 into one texture.
2.Merge texture 1 and 3 (the walkway) as separate texture.
3.Use Multi-sub material with 2 IDs - 1st ID for texture 1+2 and the 2nd ID for texture1+3(the walkway).
4.Adjust all the faces which of the 2 material IDs to use.
5.Unwrap the shape using these two textures on the first UV channel only.
6.Export.
#7
08/08/2013 (4:13 am)
Thanks Lyubomir!

Currenlty we're using overlayMap[0] texture and it works as planned.
We will give a try with multi-sub material because currenlty we only undestood how to do it with overlay and second UV channel.