@bvaldes

Thanks for the quick response!

Below is an example of the xml file exported out of Maya. It contains the xform transformation matrix and the path to the hi res alembic file.

This is what we use in Katana to assemble our scene. From what I've been told, Katana has a node that parses this xml and is able to determine the location, scale, transform of the asset from the xform transformation matrix.I'm not too concerned with the parsing aspect of things more so the decomposition of the xform values into useable location, scale, rotation values in Clarisse.

#### xml code

<?xml version="1.0" encoding="UTF-8"?>

<scenegraphXML version="0.1.0">

<instanceList>

<instance groupType="assembly" name="item_a" type="group">

<bounds maxx="109.5480637" maxy="62.03710598" maxz="-60.38813261" minx="50.46317526" miny="41.62017811" minz="-120.757277" />

<xform value="1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0" />

<instanceList>

<instance groupType="lodGroup" name="item_geometry_hires" type="group">

<bounds maxx="109.5480637" maxy="62.03710598" maxz="-60.38813261" minx="50.46317526" miny="41.62017811" minz="-120.757277" />

<xform value="1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0" />

<instanceList>

<instance name="item_geometry_parent_hires" refFile="/fpath/cauldron_01_aa__geometry__hires.abc" refType="abc" type="reference">

<bounds maxx="109.5480637" maxy="62.03710598" maxz="-60.38813261" minx="50.46317526" miny="41.62017811" minz="-120.757277" />

<xform value="1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 80.2593559839 42.4934811039 -90.6733613351 1.0" />

</instance>

</instanceList>

</instance>

</instanceList>

</instance>

</instanceList>

Your suggestion would definitely work, but would require me to create some custom script for exporting out an xml with translation, rotation, scale explicitly stated. I would like to avoid this if possible.

I've implemented a combination of these two papers in an attempt to decompose the xform matrix without much success. Below you can find my implementation.

https://math.stackexchange.com/question ... ion-rotatihttp://citeseerx.ist.psu.edu/viewdoc/do ... 1&type=pdf#### python code

def translation(m):

return m[12], m[13], m[14]

def scale(m):

sx = math.sqrt(math.pow(m[0], 2) + math.pow(m[4], 2) + math.pow(m[8], 2))

sy = math.sqrt(math.pow(m[1], 2) + math.pow(m[5], 2) + math.pow(m[9], 2))

sz = math.sqrt(math.pow(m[2], 2) + math.pow(m[6], 2) + math.pow(m[10], 2))

return sx, sy, sz

def rotation(m):

sx, sy, sz = scale(m)

# rotation matrix

r = [ m[0]/sx, m[1]/sy, m[2]/sz,

m[4]/sx, m[5]/sy, m[6]/sz,

m[8]/sx, m[9]/sy, m[10]/sz,

]

# test rotation matrix values

# r = [0.5, -1.464, 0.8536, 0.5, 0.8536, -1.464, -0.7071, 0.5, 0.5]

# rx,ry,rz = (pi/4, pi/4, pi/4)

# Rotation around y

theta_1 = -math.asin(r[6])

theta_2 = math.pi - theta_1

# Rotation around x

gamma_1 = math.atan2(r[7]/math.cos(theta_1), r[8]/math.cos(theta_1))

gamma_2 = math.atan2(r[7]/math.cos(theta_2), r[8]/math.cos(theta_2))

# Rotation around z

phi_1 = math.atan2(r[3]/math.cos(theta_1), r[0]/math.cos(theta_1))

phi_2 = math.atan2(r[3]/math.cos(theta_2), r[0]/math.cos(theta_2))

return math.degrees(gamma_1), math.degrees(theta_1), math.degrees(phi_1)

# return math.degrees(theta_2), math.degrees(gamma_2), math.degrees(phi_2)

if __name__ == "__main__":

# xform transformation matrix obtained from maya

m = [4.9809734904587275, 0.0, -0.4357787137382908, 0.0,

0.0, 10.0, 0.0, 0.0,

1.3073361412148725, 0.0, 14.942920471376183, 0.0,

0.0, 0.0, 0.0, 1.0]

print translation(m)

print scale(m)

print rotation(m)