Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Jiia

Who cares about skinned meshes?

This topic is 5224 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've spent 2 weeks straight doing nothing but trying to make all of these billion things come together. All to be kicked back off the ladder in my final hour. Why does rotating a biped character's neck rotate their upper arms? Why does rotating their abdomen rotate their entire body minus the abdomen? Why do blend weights not effect the model using ConvertToIndexedBlendedMesh the same as they do in Max? Max = perfect, after 4 days of tweaking. DirectX = NOTHING like max, phucked, 4 days wasted. I'm only using 2 links per vertex, so I know it's not a limit. I've never seen a Skinned Mesh example, or even a program for that matter, which allowed rotating individual bones. So there's no way I can determine which one of the billion things I'm doing is causing the problem: 1) Creating the mesh? 2) Creating the biped? 3) Aligning the biped and mesh? 4) Attaching the biped and mesh? 5) Modifying the spherical blend envelopes? 6) Parsing an x file? 7) Loading the heirarchy (in correct order)? 8) Writing the vertex shader to blend vertices? 9) Traversing the bone hierarchy to update bones? Since everything works in max, I'm imagining the problem must be after 5. But I imagine no one will reply, since no one else out there seems to have made these things work. Or maybe the one's who did spent so much time getting it to work, they hold it as a personal secret treasure. Sorry for the overly dramatic post, and thanks for any help. [edited by - Jiia on June 1, 2004 7:53:26 PM]

Share this post


Link to post
Share on other sites
Advertisement
Umm, I figured out why the neck and abdomen are malfunctioning. The hierarchy is layed out like this (printed from my loader):

Hip
{
Abdomen
{
Chest
{
Neck
{
Head
LCollar
{
LShldr
{
LForearm
{
LHand
{
LThumb1
{
LThumb2
{
LThumb3
}
}
LFinger1_1
{
LFinger1_2
{
LFinger1_3
}
}
LFinger2_1
{
LFinger2_2
{
LFinger2_3
}
}
LFinger3_1
{
LFinger3_2
{
LFinger3_3
}
}
LFinger4_1
{
LFinger4_2
{
LFinger4_3
}
}
}
}
}
}
RCollar
{
RShldr
{
RForearm
{
RHand
{
RThumb1
{
RThumb2
{
RThumb3
}
}
RFinger1_1
{
RFinger1_2
{
RFinger1_3
}
}
RFinger2_1
{
RFinger2_2
{
RFinger2_3
}
}
RFinger3_1
{
RFinger3_2
{
RFinger3_3
}
}
RFinger4_1
{
RFinger4_2
{
RFinger4_3
}
}
}
}
}
}
}
}
LThigh
{
LShin
{
LFoot
{
LToe
}
}
}
RThigh
{
RShin
{
RFoot
{
RToe
}
}
}
}
}

Does anyone know why? Things like the fingers appear to be layed out perfectly. But the abdomen should not be parent to the legs. Nor the neck to the arms.

EDIT: I just looked at the ascii tiny.x model, and following the brackets in the file, even her arms are children of her neck. Why in the world would arms be placed under the neck?

And as far as I can tell, this has nothing to do with the way the blending is different in max.

[edited by - Jiia on June 1, 2004 9:27:29 PM]

Share this post


Link to post
Share on other sites
Hi, I know what you mean about maybe peope keeping it to themselves. Personly I am learning about xfiles, - templates etc, in theory once you know that you should be able to understand how they work. You may have been caught out on what were children of what, but that doesn''t mean the file was wrong, that was just the way it was put together.

Share this post


Link to post
Share on other sites
The knowledge is there if you want it and even more so if you''re prepared to pay for it. Get the book "Advanced Animation With DirectX" by Jim Adams for a thorough rundown on X files, skeletal animation, blended skeletal animation etc. It isn''t a simple concept to explain and you''re very unlikely to learn it from examples on the web.

Share this post


Link to post
Share on other sites
I don't think you guys understand. The X file itself has the entire arms as children of the neck. It's not my understanding of it that's screwed. It's not my exporter either. Even the biped in Character Studio places them this way. It's all wrong!

The neck should be child of the chest, parent to the head, and that's it. Nothing else. Same for the abdomen, it's also screwed. It should be parent to everything above it, and nothing below it. But for some reason, they have it parenting the thighs.

I had to hard code a hierarchy order in my animation system to get it working properly. Just have to make sure my models have specific bone names. Not too big of a deal.

As for the blending part, I think it may have been my shader. Once I bumped it up to 4 bones per vertex, it became a lot closer to the blending in max.

As for the books and such, this is not that complicated. It's just riddled. Everyone seems to have their own way, so there's not a direct path to follow.

I would still love to know why the hierarchy is so messed up and unsortable in cs / max.

EDIT: By chest / abdomen, I mean Spine1 Spine2, etc

[edited by - Jiia on June 2, 2004 9:57:58 PM]

Share this post


Link to post
Share on other sites
I wish I could help you more. I had a lot of trouble getting xfiles to parse and work with my program so I decided to try something else. I went and looked at the milkshape code. Milkshape has an exporter that exports the bones in a ASCII file and then it has a loader that loads it and then animates it. The ascii loader source code is on the milkshape site and I just ended up making a custom file format based on the milkshape code and it worked great.
~Wave

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!