blender-to-gmstudio / blender-to-smf

Import-Export of Blender model from/to SMF model format
MIT License
11 stars 2 forks source link

Add an export option to adjust the number of bone influences #51

Closed bartteunis closed 3 months ago

bartteunis commented 4 months ago

The number of bone influences is currently hard-coded to 4, though a smaller number of influences could be used. In this case, the weights of any bones other than the "n" highest should be forced to 0 and the other values remapped to sum to 1.

Add an option for this to the exporter, a slider with a minimum of 1 influence and a maximum of 4. Check if the values are remapped correctly after adding.

bartteunis commented 3 months ago

A quick test with a basic model shows that the weights are remapped to e.g. a single bone/node by the modified code. For example, when exporting using a single bone influence, the weights are remapped to a single bone (left: 4 influences, right: 1 influence): 4_vs_1_max_influences