XGen Interactive Groom SplineΒΆ

Guerilla Render can render the XGen IGS procedural geometries.

Installation

Linux

Make sure the MAYA_PATH/lib and the MAYA_PATH/plug-ins/xgen/lib are present in the LD_LIBRARY_PATH before running "guerilla".

XGen IGS is dependent on libtbb.so, and thus you may experience linking incompatibilities with Yeti 1.3, as they link with different versions of libtbb.so. Also note that adding MAYA_PATH/lib to the LD_LIBRARY_PATH may cause Python to use Maya's Python distribution, which may be incompatible with your installed Python. Make sure that you also add the root directory to your libpython2.x.so prior to Maya's directories.

Baking XGen IGS caches in Maya

The current support being fairly experimental, we don't provide a fully integrated export command. Use the following script to export caches. import maya.cmds as cmds
import maya.mel as mel

# Where to write the descriptions
output_directory = "/tmp/igs"
# The frame range to bake
start_frame = 1
end_frame = 1
# The motion blur substeps
substeps = [ -0.2, 0, 0.2 ]

selection = cmds.ls(sl=1,sn=True)
for frame in range(start_frame,end_frame+1):
    print ('Baking frame '+str (frame))
    for substep in substeps:
        current_time = frame + substep
        print (' ... ' + str (current_time))
        cmds.currentTime (current_time)
        for shape in selection:
            # The following command writes the splines data to a file
            mel.eval ('xgmExportSplineDataInternal -output "'+output_directory+'/'+shape+'_'+str (current_time)+'.xgs" '+shape+'.outRenderData;')

This procedure bakes all selected XGen Spline Descriptions (note: select shapes, not transforms) into a single file, for each frame as defined by start_frame and end_frame (included) and for each motion substep.

The resulting files are located in the output_directory, name shapeName_time.xgs.

Loading XGen IGS in Guerilla as an Archive

  • Click the Create Reference item from the Create menu.
  • Select the XGen Spline description (this expects the .xgs file extension).
  • If your XGen Spline description is animated, replace the time item in the reference file name with a '#' character.
  • The Reference Options dialog, with the time token replaced with a '#'

    The XGS Spline description loaded as an ArchReference. Model courtesy of Jean-Michel Bihorel.

    Loading XGen IGS in Guerilla as a Procedural

    • First create a XGenSpline procedural node using the Create menu.
    • Set the Files to point to your exported caches files using %g for the time.
    • Setup the motion time steps as they were set when baking.
    • Disable the Attributes > SceneGraph > Load On Demand flag to prevent Bounding Boxes from culling the actual geometry.
    • The %g token is replaced by the procedural loader by the actual frame/substep time, as in 38.2.