Home Technical Talk

Rigging issue with Source and 3DSMax

Hey guys. I'm at my wits end here, I would really appreciate any ideas you guys have, running out of time on this project.

Basically, I modelled this laser cannon, rigged it up, skinned and animated, everything was fine. The problem came when I exported it to Source.

This is what it looks like in 3ds:

http://i.imgur.com/agXGXXL.png

Exported to source:

http://i.imgur.com/wtQ7aXi.png

As you can see, the bones are fine, in the right place, animating correctly, etc. The mesh however is twice the size it's meant to be, rotated weirdly, and this happens when it tries to animate.

My first thought was to reset the pivot, because source is always funny with that. When I reset the pivot to 0,0,0 and aligned to world, and re-assigned the SAME skinning data, it ended up like this:

http://i.imgur.com/3KpT8ik.png

And I thought, okay, it's not the exact same as it was in source, but clearly we're in the right area. So let's try re-skinning with the pivot set like that. Except then when I re-add the bones, this happens:

http://i.imgur.com/WPIGROz.png

So basically, I've got no idea what's going on anymore.

I'm thinking I'm going to need to remake the entire bone chain, start again from scratch, but the issue is I have NO idea what I did wrong the first time, so I have no idea how to prevent that happening when I remake the bone chain.

Does anyone have any experience whatsoever with this, I'd much prefer to preserve the animation and rigging I have if possible...

Thanks all.

EDIT:

Well, I appear to have fixed it myself.

Not sure what was wrong, to be honest. I rolled back to a very early save and re-rigged and re-animated the entire thing and it worked :/ Apparently source doesn't support bone scaling, which is a bit annoying, but hey. At least it's working.

Apologies to anyone who finds this thread with this issue, I've got no idea how I fixed it really.

Replies

  • AshuraDX
    Options
    Offline / Send Message
    AshuraDX triangle
    did you reset xforms ? that may have caused it had similiar problems with exporting a model to a Quake 3 engine game when I forgot to do that ;)
  • Mark Dygert
    Options
    Offline / Send Message
    Yep, AshuraDX is right, you want to reset transforms before you apply skin, because the OBJECT's transform data (position, rotation, scale) will affect the way skin behaves and that relationship gets saved/loaded with the skin modifier. Skin needs that data to be the same when load, if not it's just going to dork out like it did.

    Before I get to much further I should define two things:
    Sub-Object: Vert, Poly, Edge, Element modes. Changes to these do not get recorded into the Objects transform history.

    Object: Anytime you aren't in Sub-Object mode. Changes in this mode get recorded into the objects transform history (technically called a matrix). THIS IS HUGE.

    Skin is interacting with the object transform matrix. If the transforms aren't clean (0 0 0 & 100), then you shouldn't be applying skin. You can see part of it by right clicking the move, rotate, scale buttons in the max toolbar. The transform matrix is sort of a hidden history of everything you've done to that OBJECT (not sub-object).

    You can avoid object space editing (position and rotation are mostly ok) and only scale in sub-object modes but that's a bit of a pain. So instead of avoiding object space scaling all together just reset the transforms in the hierarchy tab > reset > transform. Or go nuclear like AshuraDX said and reset xform.

    NOTE about reset xform:
    You will want to be careful, it will realign your objects pivot to the world. In some cases you don't care, in others its a disaster, like a rotated cylinder, if you destroy the local pivot you can make it tough to edit. Just resetting the transform clears out just the one piece that is making your life hard.

    Re-rigging it worked because...
    You started with a clean mesh. Which is what you should always do. It will almost always leads to problems like this if you start off with dirty transforms.

    In the future...
    If you accidentally forget to reset transforms and you will, (it happens to everyone). What you can do is copy your mesh(es), reset their transform data, apply the skinwrap modifier and target the old mesh(es), scrub the bar and tweak the settings so it follows along as closely as possible then, convert to skin. Skinwrap will copy the weights from nearby verts on the old model but not copy the transform data so all of your weighting comes over but the jacked up issues stay behind. This is typically how people make changes to meshes after they're skinned, which even in the most awesome of pipelines, happens, ha.

    In the future ALWAYS reset transforms before applying skin.

    I hope that helps explain some of the craziness!
Sign In or Register to comment.