So I took a break from the SDK after a few uncessful attempts and attended the training seminar they had about a week ago. I started trying to fix my issue again by writing new code from scratch, but unfortunately Im still running into my old issues.
Tidbits to consider…
1. Im only concerned with rigid binding, 1 bone per vertex
2. I need the vertex data in its initial positions, so basically I need the mesh data in world space, as well as the bone data in world space. The code in my game is responsible for converting the vertex data into Bone space.
So to make things easier on myself I’m only concerned with getting the vertices to line up correctly.
gWorkingModel is a class (DogModel) I created that stores the information I need for my In Game model format and does the saving for me, it also includes some helper functions.
These helper functions are gWorkingModel.getCluster(i), I specify a vertex index and it returns the cluster associated with that vertex. I also have DogModel::fromFBXVector4() which converts the FbxVector4 to the structure I use.
Ok basically you can see in the if statement
if(lCluster != NULL && true)
when I change the true to false, the vertex data shows up in the dimensions I expect the only thing is it is orientated wrong(its on its side when it should be standing up) and its initial position isnt exactly correct, but other than that it has the shape that its suppose to have.
now when I leave that flag as true the max and min size of the model are far to small, but atleast it is orientated correctly, but I believe that the initial position isnt exactly correct either.
Please note that you see some extra matrix transformations that are not exactly necessary but the thing is I tried a few of the iterations and none of them work correctly so I just started testing other things to see if it would work
lDstVertex = lBoneBindingMatrix.Inverse().MultT(lDstVertex); // now it is in bone space
and the scale problem was fixed by now the mesh was squished together, but the pieces that were squished together looked to be the right size, and in the right orientation.
I then proceeded just for the hell of it (even tho I knew multiplying a matrix by is inverse was just gonna cancle eachother out) trying to multiply it by its bone matrix to see if that worked since it was in bone space.
Please help I have been splitting hairs and reading and going to training and still have not made the progress I wanted to, there is something that I have to be missing or somethign that I’m quite not getting because other wise i should of had my results by now.
Attached is a copy of the model Im using for testing purposes.
Don’t preview - that will kill any attachments. Click Browse, select and OK your file, click Submit. There is also a size limit - how big is zip you’re trying to attach?
If all else fails, there are loads of “upload” sites on the net - upload to one of those and post the link (though this is a last resort if nothing else works).
Max 4.2 through 2014, Composite 2014.
nVidia 9800GTX+ (512MB) (Driver 314.22).
i5-3570K @ 4.4GHz, 8Gb Ram, DX9.0c.