How do you rig multiple objects and have their UVs in one combined UV?

Hi, 

I have a character that has a separate mesh for the "eye glass coating", iris part of the eye, upper/lower gums and teeth, and tongue.

I am about to rig everything for UE4, but I don't know what should be combined before rigging or how to get everything on a single UV. 

below is the character:



Any insight here would be great, thanks.

Replies

  • Mark Dygert
    Fewer meshes means fewer draw calls so as a general rule of thumb it's a good idea to combine as much as you can, unless you have a fairly compelling reason to do otherwise.

    One reason might be...
    That you want to pack a lot of detail into the eyes, both the textures and the material (reflection and refraction) but you're body doesn't need that complex of a shader or you have a hard time giving such tiny details the space they need and it makes sense to break them apart into separate materials and MAYBE separate objects. Keep in mind that you can apply multiple materials to different faces of an object, but that depends on your Digital Content Creation tools.

    Another reason might be...
    I can think of a few eye shaders that need very specific geometry unwrapped in a very particular way to give the lens it's depth and refraction. It only works if the eye is a separate mesh. But maybe you don't need that level of detail? Maybe you do, I don't know...

    Even if the shader can be combined with the body, you don't need that complex of a material for the main body and having something that big on the screen eating up pixel calculations could be more expensive than running with a simpler shader for the body and extra draw calls for the eyes.

    Another reason might be...
    That you plan to swap out the eyes or apply different textures for different characters? This one has black eyes, the next has cat eyes, another octopus eyes. You don't want to generate entirely new bodies to just swap the eyes, so you will probably break them apart.

    Personally I don't think it matters that much which way you go, its not likely to be a bottle neck to performance but some punk will probably look at some bits the players will never see and start tutting. You aren't likely to be in the same room so, honestly you could probably say "screw it, I'm doing whatever" and no one is going to care.
  • Nimzo
    Very informative response, thank you!

    I'll definitely try to combine everything into a single mesh to reduce draw calls then. One question though, I have my eyes rigged up via constraints already, should I simply combine it to the main mesh now? Are the teeth/gum normally rigged by constraints then combined later? 

    Thanks again!
  • Nimzo
    i ended up not combining the geometry after finishing rigging everything, and just assigning a new material to each mesh, then exporting it as an FBX to texture it. Still not sure how to combine the eyes to the mesh to make one mesh and then rigging/skinning it. 
  • Eric Chadwick
    Another good one from Mark!

    Also any polygons with transparency should generally use a separate shader/material from the polygons without.

    Transparency is often more expensive to render, and if non-transparent polys are forced to use a shader with transparency this can cause rendering errors. More info on that here:
    http://wiki.polycount.com/wiki/Transparency_map#Sorting_Problems

    Regardless of material approaches, rigging is a separate concern, basically unrelated. If you have to split your meshes, then just make sure to use the same bones and same vertex weights, where ever they meet. 

    If you see a shading seam where meshes meet, like head stuck on a body, then edit the vertex normals along the seam. 
    http://wiki.polycount.com/wiki/VertexNormal
  • Mark Dygert
    Which app are you modeling and rigging in? 

    The general workflow usually goes as follows: 
    1. Model/Sculpt high poly (if there is one)
    2. Model low poly (optimized geometry ready for a game)
    3. Materials (UV's baking and shader work, usually in the engine)
    4. Rigging (create the skeleton, controllers and constraints)
    5. Skinning (bind the skin to bones, refine weights)
    6. Export
    If you jumped the gun and rigged something before doing UVs and materials that generally is not too much of an issue, there are ways to handle it, but that depends on your DCC. Even if the buttons are different it generally goes: 
    1. Copy the Mesh (leave the old alone for now)
    2. Make your edits
    3. Reset transforms (position, scale, rotation, pivot and history)
    4. Rebind the mesh to the skeleton and copy weights

    3dsmax
    • Combine Meshes
      Apply the edit poly modifier to one object, click attach, click the second mesh.
    • Replace Skinned Mesh
      Copy your mesh, make your edits, delete history and transforms (xform reset) then apply skinwrap to the new mesh, target the old mesh, convert to skin, delete the old mesh.
    Maya
    • Combine Meshes
      On the modeling main menu select Mesh - Combine
    • Replace Skinned Mesh
      Copy your mesh, make your edits, delete history and reset transforms, bind skin, copy skin weights, delete the old mesh.

    Blender
    • Combine Meshes
      You can combine meshes in Blender using Ctrl-J, but you want to do that before you start rigging.
    • Replace Skinned Mesh
      Copy your mesh, make your edits, clear transforms (Alt-G, Alt-S, Alt-R), Transfer Mesh Data to copy weights, delete old mesh.

  • Nimzo
    @Eric Chadwick
    Hey, thanks for the insight. Having the eyes on a separate shader makes sense. I have "glass" corneas, so I'll do this. Unless this is uncommon for games. 

    @Mark Dygert
    Hey Mark, thanks again for the tips! I was getting confused with the UV/shader setup. I did have my UV's done already, but I wanted my eyes, tongue, teeth, and body/head to be compiled into one UV map to reduce draw calls (I'm assuming this is done through combining the objects)

    I'm using Maya to do the rigging. Just to clarify, are the 3dsmax/maya/blender workflows you stated, the general rigging approaches for multiple object characters? So, do I want to combine the tongue/eyes/teeth/body/head into one mesh before rigging/skinning?

  • Eric Chadwick
    Don't strictly have to combine objects. It's multiple materials that cause increased draw calls. 

    Basically every time the game has to switch between materials, it has to load those meshes into the graphics card, and that loading can slow down rendering.

    My understanding is if you have a few meshes that share the same material, they can be "batched" meaning they're loaded together. 
  • Mark Dygert
    Yes, you generally want to combine meshes and clean them (reset transform & delete history) before you skin.

    If you end up needing to make changes to something afterward, like combining or splitting off meshes, you make copies and go through the process I outlined making sure they're "clean".

    In Maya you can generally edit UV's and material assignment after you've skinned without it causing issues. You pop the UV editor open, do your stuff and close it.

    You can even make minor changes to the topology (add/remove an edge loop, make a cut ect...) as long as you "delete non-deformer history" and you'll still have a clean mesh with good transforms. BUT there is a good chance that will mess with the skin weights you've already assigned, so if you're deep into skinning with hours of work spend, you probably want go through the workflow. Major changes like combining meshes or significantly editing the topology should go through the copy/clean workflow.

    In 3dsmax you aren't so lucky. If you're trying to edit UV's you have to apply modifiers on top of skin or below it and then try to collapse it down while preserving the skinning. You're better off just going through the copy/clean workflow.
Sign In or Register to comment.