Page MenuHome

Collada import-side patch
Closed, ArchivedPublicPATCH

Description

Hi,

Attaching the transform/animation import-side patch, lots to do and to figure out with this stuff. Design issues; should be decided what is an acceptable level of support, how to achieve it and what type of user input/feedback there should be. Anyway, as I said before importing is restricted by possible skew in transforms, arbitrary rest pose matrices and made more difficult by skinning joints not having to be related to each other.

AnimationImporter: partial fix for #29082, make blender use code apply_curves_via_matrix when the incoming transforms don't fit loc/eulerXYZ/scale, default for bones (collada transform is vs parent, blender transform is vs parent + restpose tail+rot). Done only at keyframed points atm, need to fill in full frames or go by user input step etc. Small changes to existing code with the only real addition of transform_compatibility() to check if things can be presented as blender does it by default.

collada_utils.cpp: only set a unit parentinverse-matrix when importing objects from collada, though I guess parentinverse could be used to support skew for non-animated objects. One exception in ArmatureImporter.cpp, but it ties in with generally figuring out what to do with armatures and skinning controllers.

DocumentImporter.cpp: a partial fix for #29246, requires some decisions what types of collada armatures blender can/should support and in which way. Note that the file kat_collada.DAE (3ds Max) actually has the following node-tree, mixed joints + non-joints; open issue

<node id="node-kat_mesh_001" name="kat_mesh_001">
<instance_controller url="#geom-kat_mesh_001-skin1"> ... </instance_controller>
</node>

<node id="node-Mocap_Rig" name="Mocap_Rig">
<node id="node-Reference" name="Reference">
<node id="node-Hips" name="Hips" sid="joint0" type="JOINT"> ... </node>

### inconveniently not of type JOINT ###
<node id="node-LeftPelvis" name="LeftPelvis">
<node id="node-LeftUpLeg" name="LeftUpLeg" sid="joint33" type="JOINT"> ... </node>
</node>

</node>
</node>

Event Timeline

Assigning to Arystanbek. Thanks for the patch.

Juha, what is the current status of this patch? Is it still necessary or does it need updating against current trunk?

Aaron Carlisle (Blendify) changed the task status from Unknown Status to Unknown Status.Aug 24 2015, 2:46 AM

No talk in over 3 years