Implorer / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

Blender loader - "-1" bone indices are generated for this model #515

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Import the attached model file

What is the expected output? What do you see instead?
The model will be imported, but when trying to play an animation, an index out 
of bounds exception will be raised in the software skinning method.

It happens because the bone indices buffer has invalid values ("-1"). 
The ArmatureHelper.getGroupToBoneIndexMap() is responsible for generating the 
mappings, but some vertex groups do not have any bones assigned to them 
(probably the author left them unused)
Thus getBoneIndex() returns "-1" indices for these particular groups.

The model loads fine and animates in Blender 2.63. Re-saving it does not help.

ATTRIBUTION: This model was created by Clement Wu, Nikolaus & Botanic and was 
downloaded from this link: http://opengameart.org/content/animated-knight

Original issue reported on code.google.com by ShadowIs...@gmail.com on 1 Jul 2012 at 8:58

Attachments:

GoogleCodeExporter commented 9 years ago
The error occured when the model had vertex groups that were not assigned to 
bones. If such group is found then the '-1' bone index is not being added.

Original comment by mrogu...@poczta.fm on 3 Jul 2012 at 7:46