Jump to content
  • Advertisement
Sign in to follow this  

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

This topic is 3675 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
Sign in to follow this  

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!