Transform a Model Set to a different Co-Ordinate System

Example commands are shown for Windows but can also be used on OS X or Ubuntu. The 'fgbl' or 'fg3' executables can be used instead of 'fgrt'.

In this example, we'll transform the 'Animate' model set:

> fg3 meshops convert HeadHires.tri HeadHires2.obj
> fg3 meshops convert ~sdk/data/csam/Animate/InternalBaseFace.tri InternalBaseFace2.obj

Move both HeadHires2.obj and InternalBaseFace2.obj in tandem to whatever coordinate system you want and save.

Extract the affine transform:

> fg3 meshops xform create meshes xf.xml InternalBaseFace.tri InternalBaseFace2.obj

Apply the transform to all the meshes you want to bring across:

> fg3 meshops xform apply xf.xml HeadHires.tri HeadHires2.tri
> fg3 meshops xform apply xf.xml HeadHires_neck_seam.tri HeadHires2_neck_seam.tri
> ...

Now re-create the EGMs:

> fg3t ssm InternalBaseFace2.obj -fv HeadHires2_neck_seam.tri HeadHires2.tri ...

Now copy over and rename the respective PNG, EGT, FIM and TXT files (where applicable).