Skinning and CMO files converted from Daz3D Genesis

Dec 16, 2013 at 11:56 PM
Edited Dec 18, 2013 at 1:36 AM
UPDATE:

Figured it out !!!!!!!

It seems that some software packages will export FBX with "unnormalized weights". So if this is the case you could add some simple code to SetBlendWeights to normalize the weights, like so:

float normalizer = weights.x + weights.y + weights.z + weights.w;
weights /= normalizer;

And that fixes it.

Almost 2 days spent on this trying various software, conversions, export settings, etc. Ugh...


Original question below:







UPDATE:

I deleted the original question since I found out that the problem is not in either CMOLoader or my code. I used teapot.fbx from the starter kit to check and loading that I can see the teapot jumping and moving the snout as it should. So I will rephrase the original question....

Has anyone had success with animating Genesis figures (from Daz3D) that were previously exported as FBX. My figure gets completely distorted and I suspect it's something to do with weights. If i attach the debugger and look at the loader I can see something like this for verts:

boneIndex: 0x0afc54ff {43, 51, 0, 0}
boneWeight: 0x0afc550f {1.61891917e009, 528466176., 0.000000000, 0.000000000}

or

boneIndex: 0x0afc5ebf {44, 52, 0, 0}
boneWeight: 0x0afc5ecf {1.61891917e009, 528466176., 0.000000000, 0.000000000}

These weight values look way over the top. And I don't even know what "528466176." is all about (like a float number with the decimal point at the end but no decimals after that). If I load teapot.fbx then these values are normal numbers below 1.0.

I am exporting the object by baking the animations, selecting allow degraded skinning and scaling. Also if I import the same FBX object in 3ds max , max animates it and shows it just fine.

I also did ASCII export of the file so I can look at the raw data and indeed I can see that the weights are really high, here's an excerpt :

Weights: 1000442048,608253824,409882400,1387813504,1120139904,875141056,173468496,319478240,2067302784,2147385344,2147385344

On the other hand if I look at ASCII version of teapot.fbx I get

Weights:
,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.439829051494598,0.318557143211365

Which is what I'd expect the numbers to be.

Odd thing is that 3dsmax loads both just fine, so I suspect that there is some export setting or some special way to parse these large numbers out, but not sure what just yet. Has anyone tried Genesis figures before?
Coordinator
Dec 24, 2013 at 7:07 AM
Thanks for the update. I'll keep that in mind as I work on 858