Jump to content
  • Advertisement
Sign in to follow this  
TTK-Bandit

md5mesh loading: mesh too small, while skeleton correct..

This topic is 3616 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

Hey, I've been writing an md5mesh importer, and weird thing is, the skeleton shows correctly, but the mesh itself is a LOT smaller.. This is how I create the verts:
	ogVec3 tVec;
	int j, num = vertexList.Num();
	for( int i=0; i<num; i++ ) {
		if ( i >= vertexList.Num() )
			return false;

		const ogMD5Vertex &md5Vert = vertexList;

		mesh->texCoords.Append( md5Vert.texCoord );
		ogVec3 &vert = mesh->verts.Alloc();

		for ( j=md5Vert.firstWeight; j<=md5Vert.lastWeight; j++ ) {
			if ( j >= weightList.Num() )
				return false;
			const ogMD5Weight &weight = weightList[j];

			if ( weight.jointIndex >= joints.Num() )
				return false;

			const ogVBMJoint &joint = joints[weight.jointIndex];
			joint.quat.TransformVector( weight.origin, tVec );
			vert += (tVec + joint.origin) * weight.bias;
		}
	}
	return true;
The character mesh looks absolutely correct, except that it has the size of a toe of the skeleton. any ideas what I missed ?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • 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!