Home Technical Talk

Exporting problem 3d max - x file

It is my first post here and and I hope I will describe it as good as possible.
We use custom programmed engine. It needs 3d max exported .X file. The skin is ok and the animations are ok. I was asked to reduce the size of the character.
So I turn it into 3d max charater object and scale it. After this delete the character icon and send it for export. The answe was that the skin is again broken and there is not attached vertexes.
What is the problem that cause this skin failure?

Thank you.

Replies

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    The scaling is borked because you scaled it.

    Safest fix is to go back to bind pose, reset transforms on everything and reapply the animations.

    Depending on how max is feeling you might get away with simply resetting xforms and moving the xform modifier below skin before collapsing to it.
    If not, save weights out to a mesh using skin utilities before scaling the whole character. scale the weight mesh along with everything else and reimport the weights after resetting your transforms.

    You'll need to freeze transforms on the bones as well as the mesh of course- that will wipe out any fancy controllers you're using though
  • kitana_mk
    Thank you very much :) I'm glad to see you here
  • Mark Dygert
    Some exporters allow you to set a scale when exporting, but I'm not familiar with the one you're using.

    To expand on what Poopipe said, to reset scale/transforms after you scale it go to...
    Command Panel > Hierarchy tab > Pivot tab > Click Reset: Transform and scale buttons.

    This is different than the xform utility and the xform modifier. If you do a xform utility on bones it will realign the pivots to match the world and that is all bones are, a series of pivot points. If they all start pointing up, you have major problems.

    Resetting the scale and transform in the Hierarchy Tab, will reset only your scale and transform matrix to 100% instead of it being -76.456% like it would if you had just scaled it and exported it. It also leaves your pivot points intact. Some engines freak out if the scale is not 100%, others handle it no problem. You can monitor the scale matrix by right clicking the scale tool.

    Scaling skeletons can get a bit tricky poopipe pretty much covered scaling a custom skeleton and the steps similar if you use other rigs like CAT and Biped but with some differences.

    If you're using biped
    You adjust the height of the biped while in figure mode, there is no need to reset the scale on a biped using xform or reset scale/transform, its impossible to scale a biped. Unless you are in figure mode which resets the scale when you exit, or you applied a scale sub-animation controller, even then you still want to go into figure mode to make your adjustments.

    Bake vert weights (little oven icon in the skin modifier)
    Save vert weights
    Rescale the mesh
    Reset scale and transforms on the mesh (Command Panel > Hierarchy tab > Reset: Transform & Scale)
    Rescale your biped height while in figure mode
    Apply skin and load the vert weights

    Note: Getting the height of a biped to match your mesh is a bit tricky and what I like to do, is an "attachment constraint" on a point helper to stick it to the surface of the mesh, I do this at point where the biped pokes out of the surface. Then while you scale the biped watch that point and when they line up again you have the right scale.


    If you're using CAT
    You use the rig resizer. Even though this technically has features to scale the meshes they aren't as robust as they should be and often break, so only use it on the CAT pieces and scale the mesh on its own like Pooppipe pointed out,

    Bake vert weights (little oven icon in the skin modifier)
    Save vert weights
    Reset scale and transforms on the mesh (Command Panel > Hierarchy tab > Reset: Transform & Scale)
    Use the Rig Resizer on the CAT pieces (Animation > Animation CAT > Rig Resizer)
    Apply skin and load the vert weights

    The rig resizer in CAT is good because it operates on scale, not height, so you can punch in the same scale that you used on the mesh and they match perfectly.
  • monster
    Offline / Send Message
    monster polycounter
    Note: Getting the height of a biped to match your mesh is a bit tricky and what I like to do, is an "attachment constraint" on a point helper to stick it to the surface of the mesh, I do this at point where the biped pokes out of the surface. Then while you scale the biped watch that point and when they line up again you have the right scale.

    You might know this, and are just giving a simpler method...

    Typically, if I need to scale the character I'll multiply the percent by the height value of the Biped.

    ScalePercent * Height = New Height

    For example if you need to scale your character down to 85%:

    0.85 * 180 = 153

    You can use the listener bar in the lower left as a calculator.
  • kitana_mk
    Thank you all - you are such a tresure :*
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    you can type expressions into the tranform bar fields as well - ctrl+N (if memory serves)
Sign In or Register to comment.