hey @animatrix . thanks for the reply.. i did take your suggestions.. but when i apply the inverse matrix.. the pighead's orientation is off from the default. i was hoping to restore the default orientation.
Your Rotation is prolly off because the rotation data stored is taken from the prim and not the object itself. You can simply extract the orientation from the object and feed it back to the final output using attribute reorient .
Also if you just need to bring your animation to grid and then send it back to the world space,you can simply store the matrix and recall it later.
It's not very clear what you are trying to do. The rotation you are seeing is normal because you are using a specific primitive to base the transform on like MarXindia mentioned. The geometry as is doesn't have any transformation.
If you just want to center the geometry using a specific primitive, you can either ignore the rotation in the computed matrix or just use the center of the primitive to move the geometry to the origin. You can also use the center of the geometry itself to do the same.