ssebi / jmonkeyengine

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

Blender loader has strict requirements for animation import #498

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Import a model that does not satisfy the following requirements:
Model has identity transform.
Armature has identity transform.
The origin point for both model and armature is at 0, 0, 0.
A single root bone exists with all other bones parented to it. The root bone 
has identity transform.
Bone envelopes and skeleton deform envelopes are disabled.
Only one mesh is animated by the armature.

What is the expected output? What do you see instead?
If the above requirements are not satisfied, then the animation will be 
imported incorrectly. 
Having to follow these requirements often requires users to change their model 
or how it is animated, it is unacceptable and not convenient. Fixing this issue 
is crucial for ensuring that .blend file importing remains a viable option in 
jME3's asset pipeline.

Original issue reported on code.google.com by ShadowIs...@gmail.com on 28 May 2012 at 5:51

GoogleCodeExporter commented 9 years ago
Is it possible to get an example blend file that will cause the errors to show 
up?
I have made a simple model with bones and animated it.
The I have transformed the bones and the model and the animation in jme was 
still the same as it was in blender.
But maybe I am doing something wrong so I'd like to check that.

As for the root bone - I add a root bone to each armature so that I can attach 
all the vertices that have no bone attached in blender. This way they do not 
disappear but remain in place just like in blender.

Original comment by mrogu...@poczta.fm on 19 Jun 2012 at 9:05

GoogleCodeExporter commented 9 years ago
@Kaelthas_Spellsinger@o2.pl:
I have attached some models that were imported incorrectly in jME3. Each model 
either has a stack trace or some explanation.
**************
*Sinbad.blend*
**************
java.lang.IllegalStateException: Object's action cannot have more than one 
channel!
    at com.jme3.scene.plugins.blender.modifiers.ModifierHelper.readAnimationModifier249(ModifierHelper.java:151)
    at com.jme3.scene.plugins.blender.modifiers.ModifierHelper.readModifiers(ModifierHelper.java:108)
    at com.jme3.scene.plugins.blender.objects.ObjectHelper.toObject(ObjectHelper.java:168)
    at com.jme3.scene.plugins.blender.AbstractBlenderLoader.toObject(AbstractBlenderLoader.java:132)
    at com.jme3.scene.plugins.blender.BlenderLoader.toObject(BlenderLoader.java:70)
    at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:63)
    at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:49)

*********************
*character_new.blend*
*********************
Most animations display incorrectly in jME3, but work in Blender.

Original comment by ShadowIs...@gmail.com on 23 Jun 2012 at 9:14

Attachments:

GoogleCodeExporter commented 9 years ago
The problem with Sinbad was fixed several days ago.
The animations were attached to the object instead of armature which I did not 
predict may happen. The model should work fine now.

As for the second model the problem is not with the matrices or stuff connected 
to animation calculating but with the lack of support for Inverse Kinematics 
constraint for bones. I hope to add it soon but untill then every model that 
has this constraint applied for bones will not be displayed as it is in Blender.

Original comment by mrogu...@poczta.fm on 24 Jun 2012 at 2:47

GoogleCodeExporter commented 9 years ago

Original comment by ShadowIs...@gmail.com on 9 Jul 2012 at 3:25

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
A brand new blend file that fail to load :D

java.lang.IllegalStateException: Unknown curve rna path: 
pose.bones["IKhand.L"]["rigify_type"]
    at com.jme3.scene.plugins.blender.animations.IpoHelper.getCurveType(IpoHelper.java:135)
    at com.jme3.scene.plugins.blender.animations.ArmatureHelper.getTracks250(ArmatureHelper.java:196)
    at com.jme3.scene.plugins.blender.animations.ArmatureHelper.getTracks(ArmatureHelper.java:164)
    at com.jme3.scene.plugins.blender.modifiers.ArmatureModifier.<init>(ArmatureModifier.java:132)
    at com.jme3.scene.plugins.blender.modifiers.ModifierHelper.readModifiers(ModifierHelper.java:91)
    at com.jme3.scene.plugins.blender.objects.ObjectHelper.toObject(ObjectHelper.java:167)
    at com.jme3.scene.plugins.blender.AbstractBlenderLoader.toObject(AbstractBlenderLoader.java:132)
    at com.jme3.scene.plugins.blender.BlenderLoader.toObject(BlenderLoader.java:70)
    at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:63)
    at com.jme3.scene.plugins.blender.BlenderModelLoader.load(BlenderModelLoader.java:49)
    at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:282)
    at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:410)
[catch] at 
com.jme3.gde.core.assets.SpatialAssetDataObject.loadAsset(SpatialAssetDataObject
.java:90)
    at com.jme3.gde.core.assets.actions.OpenModel$1.run(OpenModel.java:72)
    at java.lang.Thread.run(Thread.java:619)

Original comment by remy.bou...@gmail.com on 9 Jul 2012 at 5:26

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r9577.

Original comment by mrogu...@poczta.fm on 21 Jul 2012 at 12:04