Custom ICENode Examples

This addon shows various self-installing custom ICENodes.

BBoxGenerator
This sample demonstrates how to use the single-threading model for implementing a custom ICENode. The node reads all the points of a geometry at once and write the min and max point value on the output.

CloudGeneratorFromDataFile
The example demonstrates the use of an element generator custom node (i.e. CloudGeneratorFromDataFile) and the built-in StringFilePathSequence node for generating a particle cloud from a sequence of files. The CloudGeneratorFromDataFile custom node generates the particles by reading the 'pointposition' values from the data files provided by the StringFilePathSequence node. Other cloud attributes such as size and color are set by the SetAttributeValueFromDataFile custom node. The data files are generated with the mycache plugin example by exporting the pointposition, size and color attribute values from a demo scene.

CustomGoalDeformer
The CustomGoalDeformer sample demonstrates the use of the multi-phase evaluation approach for implementing a goal particle deformer. The ICENode reads the source particle points in the first phase and performs the final blending operation using the goal points in the last evaluation phase.

CustomPassThrough
This example demonstrates how to handle port polymorphism programmatically in a custom node.

CustomVector3ToScalar
This is a simple example of an ICENode. The node reads a vector3 input value, extracts the XYZ components and write each one to individual output ports. This sample node is demonstrated with the CustomVector3ToScalar.scn scene which contains an ICENode graph that performs a twist operation on a cube.

ElementGenerator
This sample demonstrates how to implement an element generator ICENode typically used for generating particles. The ElementGenerator.scn contains an instance of the ElementGenerator node and creates a 2D particle grid whose size is specified with the node's Size input port.

GridWalker
This sample demonstrates how to use the custom type support for storing binary data values in ICE with custom ICENodes. The GridWalker sample moves particle points randomly on a grid and keeps the state of each particle in a data structure stored as binary data in the ICE graph. The structure is updated at each frame with a new particle state.

PointGeneratorFromGeometry
The sample demonstrates how to use the CICEGeometry class for accessing geometry data within a custom ICE node. This is demonstrated by the PointGeneratorFromGeometry node which generates particles on a set of geometry surfaces by using different sampling methods.

PortStateObserver
This sample demonstrates how to determine if the state of the data and the geometry objects connected to a custom node have changed. The CICEPortState class is used in this demo to query for the states of any connected input data, whereas the CICEGeometry class is used to determine if the state of connected geometries have changed.

Quake2Loaders
This sample demonstrates how to create custom nodes to read geometry from files and create geometry using ICE Modeling.
The MD2Loader node reads a Quake2 MD2 model file and returns the geometry at a given frame.
The BSPLoader node reads a Quake2 BSP map file, and returns the geometry based on a given position.
The 2 loaders returns singleton arrays for the vertices, polygonal description, uvs, normals.
The BSP loader also returns arrays for materials and materialIDs.

RandomGridGenerator
This sample demonstrates how to generate a particle cloud geometry with random points using the MATH::CRandom class of the C++ SDK.

Vector3Union
This sample demonstrates how to create an array of CVector3f objects by combining the similar objects of 2 input CVector3f arrays in multi-threading. The sample scene Vector3Union.scn demonstrates how to generates particles from the union of 2 point position vectors output by GetClosestPoints nodes.

YPosFilter
The YPosFilter sample demonstrates how to remove elements from a node index set to achieve a filtering operation in an ICE graph. The YPosFilter.scn uses the ICENode sample to remove all point elements of a cone whose Y components are below 0.0. You can watch the resulting effect by translating the cone in the Y direction.

Example Files

Location
Files
BBoxGenerator.cpp
CustomMultiPhaseGoal.cpp
CustomPassThrough.cpp
CustomVector3ToScalar.cpp
ElementGenerator.cpp
GridWalker.cpp
CloudGeneratorFromDataFile.cpp
SetAttributeValueNode.cpp
SetAttributeValuesNode.cpp
DataFileParser.cpp
DataFileParser.h
PointGeneratorFromGeometry.cpp
PortStateObserver.cpp
RandomGridGenerator.cpp
YPosFilter.cpp
Vector3UnionNode.cpp
PortStateObserver_LogChanges.vbs

Running the Example

To run the CustomPassThrough example

To run the CustomVector3ToScalar example

To run the CustomGoalDeformer example

To run the BBoxGenerator example

To run the CloudGeneratorFromDataFile example

To run the ElementGenerator example

To run the GridWalker example

To run the PointGeneratorFromGeometry example

To run the PortStateObserver example

To run the RandomGridGenerator example

To run the Vector3Union example

To run the YPosFilter example

Building the Examples

Use the following instructions to build the ICENode samples.

To build the CustomGoalDeformer example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).

    Tip To load the CustomMultiPhaseGoal project from the command line, type:

    devenv cppsrc_custom_goal_deformer\CustomMultiPhaseGoal.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the CustomGoalDeformer example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_custom_goal_deformer
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the CustomPassThrough example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).

    Tip To load the CustomPassThrough project from the command line, type:

    devenv cppsrc_custom_passthrough\CustomPassThrough.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the CustomPassThrough example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_custom_passthrough
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the CustomVector3ToScalar example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).

    Tip To load the CustomVector3ToScalar project from the command line, type:

    devenv cppsrc_customvector3toscalar\CustomVector3ToScalar.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the CustomVector3ToScalar example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_customvector3toscalar
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the BBoxGenerator example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).

    Tip To load the BBoxGenerator project from the command line, type:

    devenv cppsrc_bboxgenerator\BBoxGenerator.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the BBoxGenerator example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_bboxgenerator
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the CloudGeneratorFromDataFile example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).

    Tip To load the CloudGeneratorFromDataFile project from the command line, type:

    devenv cppsrc_pointcloud_generator_from_file\CloudGeneratorFromDataFile.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the CloudGeneratorFromDataFile example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_pointcloud_generator_from_file
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the ElementGenerator example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).

    Tip To load the ElementGenerator project from the command line, type:

    devenv cppsrc_elementgenerator\ElementGenerator.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the ElementGenerator example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_elementgenerator
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the GridWalker example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).

    Tip To load the GridWalker project from the command line, type:

    devenv cppsrc_gridwalker\GridWalker.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the GridWalker example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_gridwalker
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the PointGeneratorFromGeometry example on Windows

  1. Open an Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from an Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).

    Tip To load the PointGeneratorFromGeometry project from the command line, type:

    devenv cppsrc_pointgenerator\PointGeneratorFromGeometry.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the PointGeneratorFromGeometry example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_pointgenerator
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the PortStateObserver example on Windows

  1. Open an Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from an Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).

    Tip To load the PortStateObserver project from the command line, type:

    devenv cppsrc_port_state_observer\PortStateObserver.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the PortStateObserver example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_port_state_observer
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the RandomGridGenerator example on Windows

  1. Open an XSI command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from an XSI command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).

    Tip To load the RandomGridGenerator project from the command line, type:

    devenv cppsrc_randomgridgenerator\RandomGridGenerator.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the RandomGridGenerator example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_randomgridgenerator
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the Vector3Union example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).

    Tip To load the Vector3Union project from the command line, type:

    devenv cppsrc_vector3_union\Vector3Union.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the Vector3Union example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_vector3_union
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

To build the YPosFilter example on Windows

  1. Open a Softimage command prompt, and type devenv to start Visual Studio .NET.

    Starting Visual Studio .NET from a Softimage command prompt ensures that environment variables such as XSISDK_ROOT are set (otherwise you'll get build and link errors).

    Tip To load the YPosFilter project from the command line, type:

    devenv cppsrc_yposfilter\YPosFilter.vcproj
  2. In Visual Studio .NET, open the project file .vcproj.
  3. Select a configuration (Release or Debug) and build the DLL.

To build the YPosFilter example on Linux

  1. In a shell (tcsh) window, type:

    source $XSI_HOME/.xsi_<xsi_version>
  2. Change directories to

    cppsrc_yposfilter
  3. To remove all intermediate files before building the example, run this command:

    gmake clean
  4. To compile the example, run this command:

    gmake

Keywords

This example uses the following keywords:

ICENode ICENodeContext C++