Importing bone weight in C++ into 3dmax 2015 doesn't work.

Importing bone weight in C++ into 3dmax 2015 doesn't work.

Anonymous
Not applicable
671 Views
1 Reply
Message 1 of 2

Importing bone weight in C++ into 3dmax 2015 doesn't work.

Anonymous
Not applicable

Hi, in our company we have a C++ importer/exporter for our custom mesh format and we support 3ds 2015-2021 versions.
We aim at the 100% roundtrip data coverage but we still lack bones weights importing and I'm trying to add that feature.

 

I have an 'ISkinImportData' interface and add all bones with "iskinImport->AddBoneEx()", then I set weights to them using "iskinImport->AddWeights".

My code works in 3ds 2019, 2020 and 2021 and "AddWeights" return always true, but the same code fails in 3ds 2015-2018, the "AddWeights" returns false and I don't know why.

 

I think that there was some bug fixed in 3ds 2019, but is it possible to store bone weights in previous versions? Any workaround?

 

0 Likes
Accepted solutions (1)
672 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

I've found a solution here:  https://github.com/KhronosGroup/OpenCOLLADA/blob/master/COLLADAMax/src/COLLADAMaxSkinControllerDataI...

 

After adding bones, but before adding weights we need to run "EvalWorldState(0)" on the node and that fixes my issue.

0 Likes