Export DAE animation from 3ds max to Xcode with correct bounding box

1.3k views Asked by At

I'm trying to convert some fbx animation to DAE file in 3ds max, and then use it in Xcode with SceneKit. It almost works, but there is a problem when I'm trying to get bounding box of this node in SceneKit. Bounding box seems to be much larger than node itself. It also shows when I try to add Physics body in Xcode. Probably I need to do something in 3ds before exporting, but I don't know what. Does anyone know how to prepare such animation, so that bounding box will be responding to node size?

Code for loading model is very simple:

let scene = SCNScene(named: "(model.name).dae")!; 
object.model3D = scene.rootNode.childNode(withName: "MDL_Obj", recursively: false)! 

I think that bounding box itself is correct, but this animation is transformed, scaled or something (I'm not an expert in 3d). Bounding box is 90x131x22 - same as physics body in Xcode scene editor, and the person in animation itself is more than 2x smaller.

Here is this animation, maybe someone can help.

dl.dropboxusercontent.com/u/40968624/Serah.dae

Header:

<?xml version="1.0" encoding="UTF-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<authoring_tool>SceneKit Collada Exporter v1.0</authoring_tool>
</contributor>
<created>2016-12-21T06:43:57Z</created>
<modified>2016-12-21T06:43:57Z</modified>
<unit meter="0.025400"/>
<up_axis>Y_UP</up_axis>
</asset>
<library_animations>
<animation id="mixamorig_RightHandRing1-Matrix-animation-transform">
<source id="genericSource1">
...

Node itself:

Node itself

Bounding box: Bounding box

0

There are 0 answers