Advertisement

Linear Skinning Influence Issue

Started by October 03, 2020 04:58 AM
2 comments, last by HandleNull 4 years, 3 months ago

Hi,

I'm stuck into this problem…

I'm trying to implement Linear Blend Skinning, and it works fine if there's only one bone influence, but if more than one, the model's vertices are wrong skinned…

Here's the model screenshot:

Model

The correct model:

				//Output Vertex
				Math::Vector3 out = Math::Vector3( 0.0f, 0.0f, 0.0f );

				//Final Transformation Matrix between bones
				Matrix4 mMatrix = Matrix4::Null;

				for ( int i = 0; i < 4; i++ )
				{
					//Set Skinning...
					if ( v.faBoneIndice[i] >= 0 )
						mMatrix += bones[(int)v.faBoneIndice[i]]->world * v.faWeight[i];
				}

				//Flip YZ and multiply by the local vertex
				out = mMatrix.FlippedYZ() * v.sVertex;

Another question, must be the weights in desc order?

Thanks in advance.

Check my reply to the other post where u said u have the same problem.

That's it. All the best ?

Advertisement

Solved.

Solution: https://www.gamedev.net/forums/topic/707920-i-have-a-problem-with-skinning-arms-and-legs-are-deattached/5431723/

This topic is closed to new replies.

Advertisement