Search Unity

How to use one mesh, but have two seperate textures in 3DS Max and then to Unity?

Discussion in 'Editor & General Support' started by DigitalAdam, Sep 9, 2011.

  1. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,204
    Could someone who's familiar with 3DS Max please give me some pointers on how to use 2 texture on one mesh, and then bring that into Unity? I have a character model, and I would like one texture for the head and one for the body. Right now the UV are laid out on one texture sheet. I'm new to Max so I'm unfamiliar with how to set that up and export it out as a FBX file.

    Thanks!
     
  2. vortex69

    vortex69

    Joined:
    Feb 4, 2010
    Posts:
    92
    I might be wrong, but if I remember correctly, you just have to assign a different material to each part of the model (i.e. one for the head, one for the body) each with a different texture. Not completely sure, as I have not touched 3dsMax in over a year.
    You then export to FBX and - hopefully - Unity will import the two different materials.
     
  3. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,204
    You're probably right, but the question is HOW do you do that? :)
     
  4. vortex69

    vortex69

    Joined:
    Feb 4, 2010
    Posts:
    92
    Again, I might be wrong, but I think you have to use a "multi/sub-object" material (in this case with 2 sub materials) and then you assign Material IDs to the mesh by selecting the part of the mesh you want to have a specific material and then on "Material" -> "Set ID" you put the number ID of the one that is the material you want to assign to that part of the mesh. (I'm terrible at explaining things, this is at least 10x easier to do than it is to explain)
    I'm almost 100% sure it's done this way or that at least this is one of the possible ways to do it, although I'm not quite sure how UVs will "react" to this. So, before you try anything, backup your work :)
     
  5. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,204
    I dont have Max in front of me, but I do remember seeing a Material ID Channel with a few numbered buttons to select. I'll play around with that when I get home and see if it works. Thanks!

    If someone else has a link to a tutorial or a walk-thru on how to, I would be most appreciative. :)
     
  6. larvantholos

    larvantholos

    Joined:
    Oct 29, 2009
    Posts:
    668
    Depends on the scenario. Multi sub object is for using multiple tileable (usually) textures and materials. However, if say your doing a character and want to maximize the texture space, you can also use two uv texture maps. uv 1 and uv 2 - you just map the model seperately for the seperate area, and unity will import that (supports a max of 2 texture channels) - now keep in mind, for static objects this is not often useful, unless your baking your AO into the model, and don't require the use of beast in unity. Unity's beast will use the second uv channel to store its lightmapping info, and then assign that into its atlas, so keep in mind what type of asset your making, and where it needs to be used, to decide if this is useful.

    On another note, its better to bake your textures, as having to many materials even shared, will slow things down, and you get better results with good baked textures more often.
     
  7. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,204
    This isn't for static objects, just for a skinned character mesh in which I'd like a separate texture for the head for added detail. How do you go about mapping the body and head separately? Right now I have the entire character unwrapped in one UV sheet. Is there a way I can copy or cut the UV's for the head and assign them a separate UV sheet/texture?
     
  8. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,204
    I got the multi/sub-object material working. The character is fully UV'ed already. Whats the easiest way to take the "head" UV's and have it be separate from the body UV?
     
  9. Phil.A

    Phil.A

    Joined:
    Nov 27, 2012
    Posts:
    1

    Hey, wondering if this was answered, i know that setting material IDs for 2 different things is the way to go, but i've already unwrapped my model, and due to the nature of the character, has a large number of islands, would rather not unwrap again.

    So is there a way to take this unwrapped model and split it into 2 unwraps?
     
  10. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,204
    What are you trying to accomplish?
     
  11. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,204
    If you're trying to use 2 separate textures for one mesh, just assign a material to the mesh, select the polygons that you'd like to use a different texture on (in edit poly mode, choose polygon), then select a different Material ID Channel (#2 for example). That should allow for 2 textures to be assigned when importing into Unity, and it will use your original UV's that you have set up.
     
    Last edited: Jan 10, 2014
  12. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,204
    I had a character mesh that I wanted a separate normal and diffuse map for both the head and body, so 4 textures in total. I needed the head UV's separate that way I can scale those UV's to the max texture size, allowing me to paint more detail instead of having the head UV share the same texture space with the body.

    I started by editing the UVs so the body was scaled to use the maximum texture space, and did the same for the head, thus having the UV's overlap. Then I exported the mesh into Unity after I assigned my two Material ID's like I explained above.

    I imported my high res mesh that's textured into the same scene as my low res mesh, and scaled it so the size of each matched. I selected the low poly mesh and added two (2) 'Unwrap UV' modifiers to the stack, that way I can bake my maps correctly without the overlap. Using the 1st 'Unwrap UV' modifier, I selected the head UV and moved them to the right past the texture size border "box", so only the body UV's are laid out. I did the same for the 2nd modifier, keeping the head UV in position and moved the body UV to the side. After both are setup, I used the "eyeball" next to each modifier in the stack to hide/show which UV's I wanted to bake with 'Render to Texture'.

    After I got all 4 textures rendered out, I just added those to Unity and assigned them to my 2 materials that I created.

    I hope that helps someone since it took me a while to figure out how to accomplish that...
     
    Last edited: Jan 10, 2014
  13. xzaros

    xzaros

    Joined:
    Apr 7, 2014
    Posts:
    1
    Thanks Adam, I've got a big room and tried doing it all in one texture sheet which came out really bad quality. I'm going to try using multiple maps tomorrow like you said and will see if that works better :) going to try and do a tiled texture base and then uv map the details on top
     
  14. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,204
    Glad I can help. If you run into any issues just post here and I'll give you a hand.