• Advertisement
Sign in to follow this  

How to debug an fx file

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

Yes I tried that still getting massively distorted mesh. I tried Icebreaker's method. It should have worked. Is there any specific ordering to multiply this matrices. I tried multiplying the opposite order still no good.

Assimp says : mOffsetMatrix = the matrix transforming from mesh space to bone space, also called inverse bind pose transform 

                      mTransform = a node's transformation matrix in relation to it's parent node

 

So, this information and does my code match ? 

Share this post


Link to post
Share on other sites
Advertisement

So, this information and does my code match ?

I can't tell you. It sounds like you're just trying this, that and the other, hoping to stumble on something that works. With hundreds of lines of code and complex data, that's probably not going to be a good approach.

 

At some point, you need to understand what each line of code should do, and, more importantly, determine whether it does what it's supposed to do.

 

The approach I personally prefer is to follow the data. Pick a point in your code and look at the data. Verify that it's correct. If it's not, pick a point earlier in the process. Keep moving earlier in the process until you find correct data.

 

Then move on to the next step. Pick a line of code in the process where you think everything preceding it is correct, likely the point where you just found good values. If that line of code looks right, then you have to check the data that's coming into that line, to see if the data is correct. If the data is correct, then verify the data gets manipulated by the code the way it should by checking that the data that comes out of the manipulation is correct.

 

Most programmers know the code better than the data. They can write a line such as: MatrixInverse( Matrix invMat, Matrix inputMat ). But, to know that it's the correct code, someone in the project has to know what a matrix is, what the inverse of a matrix is, and whether (at that point in the code) the inverse of a matrix is needed. If the code is correct, but the results are not correct, someone in the project has to look at the actual inputMat and determine if the data is correct.

 

If that "someone in the project" is you, you have to be able to do those things.

Edited by Buckeye

Share this post


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

  • Advertisement