|
The Channel->Shock custom effect in the Motion module allows you to simulate real-time dynamic collision between models. Shock supports the collision between the bounding spheres of single objects on a plane using both the Custom and Channel menu cell commands to exchange data with SOFTIMAGE 3D.
- The models must be parented to a single null. Only the bounding sphere of each object is considered during the simulation. Object types considered correctly are polygon meshes and patches. The null parents of the spheres must not be translated nor rotated from the global centre of coordinates.
- The hierarchy cannot exceed three levels. The hierarchy of the selected model is not taken into consideration during the simulation, so each object moves separately. The hierarchy is used only for an easy association of object properties.
- If you are creating a collision between groups of models, all models in a group that will have the same properties must be parented to a null; you can then apply the properties to the null so that they are inherited by all its children.
- The collision is detected only in the xz plane: the y movement of the object is considered, but forced to zero. You must create the models in the xz plane aligned on the same y value.
- If points or vertices of a model pass below y=0, the setup is invalid and the Shock effect will not work. For example, assume you have a B-Spline sphere sitting just above y=0. Since the control points on a B-Spline sphere reside outside its surface, they will probably pass below y=0 and invalidate the setup for the Shock effect. To avoid this kind of problem, you can use a Cardinal sphere because the points are located on the surface of the model.
You can edit parameters by choosing the Channel->Channel Run->Sequence I/O command. You don't need to recall the Channel Setup since you didn't change the model used.
Start Frame
Start frame for the simulation: the default is 1.
End Frame
End frame for the simulation: the default is 100.
Frame Rate
Frame rate set in SOFTIMAGE 3D: the default is 25.
Precision
Simulation precision level. It describes the sampling rate per frame. A higher value results in a more accurate simulation, but it takes longer to calculate. The values range from 1 to infinity: the default value is 3.
Z Gravity
The gravity value along the z-axis. If this value is more than 0, all the objects, except those designated as fixed, are attracted. The default is 0.
Bound X
This is the x-dimension of the simulation field in the plane, or floor. The field is always centred according to the world. The default is 40.
Bound Z
This is the z-dimension of the simulation field in the plane, or floor. The field is always centred according to the world. The default is 40.
Roughness
The amount of plane, or floor, friction. A value of 0 means that the floor doesn't affect the object's simulation. The range is 0 to 1, with 0 as the default.
Random
This global value describes the "surface quality" of the floor. A value of 0 means that the floor surface is perfectly "clean." A value of 0.1 produces a fuzzy random movement of the objects. Suggested values are close to 0 (the default).
Simulation Data File
Path and name of the file where the simulation data is placed. The default is /usr/tmp/Shock.data. If you change this path, you must also change the path in the DataFileDrive.drv file.
Working Database
Database where Shock stores the channel setup for the simulation. You must have the environment variable SI_DBDIR in your account and specify a valid Database Name as found in the DatabaseDir.rsrc file. The default database is TEST.
Verbose
Prints simulation statistics in a shell, as well as the percentage of simulation completed. The default is selected.
Node Name
Name of the object or the parent of models with the same physical properties.
Speed X
Node linear speed along the x-axis. The default is 0.
Speed Z
Node linear speed along the z-axis. The default is 0.
Density
Defines the object density and mass. Values range from 0 to infinity, with 1 as the default (water density).
Elasticity
Defines the object elasticity. The higher the value, the more the object bounces against the others. Values range from 0 to infinity. The default is 1, where no energy is lost after a collision.
Roughness
Defines the object friction. Values range from 0 to 1, with 0 as the default.
Fixed
This means that the object does not change the starting velocities; if it is still, it becomes a fixed obstacle for moving objects.
Shock Channel Driver
The Shock custom effect comes with its own channel driver. It allows SOFTIMAGE 3D to read the animation from the data file created by the effect. The installation program automatically installs two files called DataFileDriver and DataFileDriver.drv in the specified directory (usually the one pointed to by the SI_CHNL_DRIVER environment variable).
Note:
If you change the Simulation Data File, you must also change it in the DataFileDriver.drv file in your channel directory.This driver can also be used with other applications that can produce ASCII data in the DataFileDriver format. The format is:
3 0.1 0.0000 0.0000 1.0000 33.1245 -1.8211 321.1224 0.1 9.3221 0.0000 7.1000 33.1245 -1.8211 -65.3244 0.1 0.0030 0.0060 1.0800 33.1245 -1.8211 11.1243 0.2 0.0210 0.0000 1.0000 33.1245 -1.8211 63.1224 0.2 0.0123 0.0000 1.0000 33.1245 -1.8211 -0.1524 0.2 0.0121 0.0000 1.0000 33.1245 -1.8211 21.2124 ...where:
- The first number is the number of objects animated per frame
- One row for each object is at each frame with 7 float fields where
- field 1 is the time in seconds
- fields 2, 3, 4 are the translation values
- fields 5, 6, 7 are the rotation values
Last updated 03-apr-1998