Home Technical Talk

how to scale a rig?

polycounter lvl 8
Offline / Send Message
Olli. polycounter lvl 8
we've got a custom arm rig consisting of bones and various helpers, and we need to scale it linearly to match real-life size (currently its around 20cm long)

does anyone have any idea how we can do that? (all scale values need to be reset to 100 before exporting because the exporter doesnt support != 100 values).

Replies

  • GeeDave
    Offline / Send Message
    GeeDave polycounter lvl 11
    Little confused, are you having trouble scaling it to an exact amount, or is the problem just the usual issues you'd get with scaling rigs?

    Also, what are you using? Max/Maya?
  • Olli.
    Offline / Send Message
    Olli. polycounter lvl 8
    im using max. Basically we just have a rig that is too small, and I want to scale it up from 20cm long to an average arm length (which is about 70-80cm I would think). the size doesnt have to be exact, the whole rig just needs to be scaled linearly.

    also we do have some animations already made, so preserving those would be a huge plus (although I think if we export the anims from the old rig and re-import them in to the linearly scaled rig it should work right?)

    the problem is that I cant just select everything and use the scale tool to enlarge the whole rig, so what am i supposed to do?

    edit: just to elaborate a bit, the rig consists of the bones and the mesh which is skinned to the bones. The reason we want to scale it is because the rig (although mainly to be used for first person animations) will sometimes interact with world-objects, and currently it looks really dumb when tiny 20cm long hands grab a huge life-sized weapon from the ground.
  • GeeDave
    Offline / Send Message
    GeeDave polycounter lvl 11
    What are you exporting to? If it's possible to scale it on the engine/editor side... then I'd go with that.

    When I've scaled rigs it's usually ended in me un-linking everything, scaling, and then resetting the xform, then re-linking. You can preserve skin information with "SkinUtilities" but if the mesh/bones you're wanting to change have any animation on ... say goodbye to it!

    Or wait for someone else to come a long with a better idea.

    Edit
    Hang on, I'm remembering something about freezing transforms, and resetting transforms too? Shit, sorry... it's been a long time since I've had to deal with dodgy/wrongly scaled rigs.
  • Olli.
    Offline / Send Message
    Olli. polycounter lvl 8
    Im exporting to cryengine 3 (freesdk) and as far as i know theres no way to scale the rig in-engine (would probably be possible via c++ but unfortunately we dont have a coder yet)

    I figured out that by scaling the root dummy and some other helpers linearly scales the whole rig. It also leaves the bone's transforms at 100, so i dont have to reset them (thank god).
    I've replaced the scaled helpers with new ones that have no scaling, so that part is all good now.

    I've tried re-skinning the meshes using .env files that I exported before scaling, but that doesnt seem to be working very well.

    Ill try find out more about this SkinUtilities thing if that should work

    losing animation data is a bummer but we can handle it.
  • GeeDave
    Offline / Send Message
    GeeDave polycounter lvl 11
    Aye the SkinUtilities are great, you'll find them hidden away here:

    SkinUtilities.png

    It basically spits out a duplicate "Skin Data" of your mesh, which you then use to put the skin info back on after making changes. I don't know if I've ever used it with scaling rigs actually... use at your own risk! The help file has info on it... but it might be quicker to hunt down a youtube clip or something.
  • Mark Dygert
    It's kind of hard to do with a custom skeleton because so much depends on how it was built. Rigs like CAT and biped have scaling features included.

    I make sure that each mesh piece shares the same pivot point which makes scaling much easier. I like to put this pivot point at the lowest center point of the character, so the character scales up from the feet, not out from the center. I then move that pivot to the scene 0 0 0 spot and then set the rig's root node to be in exactly the same spot. That way everything scales from the same point.

    With CAT you use the Main Menu > Animations > Animation CAT > Rig Resizer, I only use it on the CAT pieces and scale the meshes independently. Bake and save out the skin weights, save out the animation. Using the rig resizer you can use the same scale that you applied to the mesh making them match exactly.

    With biped bake and save skin weights, delete skin, scale the mesh first, then with the biped in figure model I adjust the height to match, which isn't as precise as the CAT rig-resizer but in the cases where precision is key I will attach a point helper to the surface of the mesh and put it on a specific point where the rig pokes through the mesh (before scaling anything). When the points align again they are the same size. Still not an exact match but close enough that it won't effect anything.

    Then you can load in whatever animation you had before. With CAT and Biped the rig scale doesn't matter you can load any motion onto the current rigs and the animation will conform to the rig, unless you force it to conform to the "incoming rig".
  • cptSwing
    Offline / Send Message
    cptSwing polycounter lvl 11
    I did this just recently.. i think my workflow was to save the skin envelope (lower part of the skin modifier rollout somewhere, delete it, group the rig and the mesh together, scale, reset xform on the mesh and reapply a skin modifier and load the saved envelope data.

    I am probably forgetting that one crucial step, though. :)

    EDIT : and yeah, at this point i'm really just rehashing what others have said. move along sir.
  • Olli.
    Offline / Send Message
    Olli. polycounter lvl 8
    alright guys thanks I managed to get the weights transported to the scaled rig using the SkinUtilities tool (that thing is a lifesaver)

    now i just got to get cracki'n and re-do all the animations :P
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    for future reference...

    Id advise that you never directly animate your deformation rig. if you build it from a simple bone hierarchy and constrain it to an animation rig you get a layer of abstraction that can save you having to redo animations in this situation or save you reskinning if you need to make changes to the animation rig.
Sign In or Register to comment.