thinkingParticles 7.3

Shapes Input Functions

The Shapes input of the ExpressionME-L Node allows for programmatic access to Spline objects (Shape Objects) in 3ds Max. You can use various functions to access nearly every aspect of a Spline object and use this data to create particles on splines or at specific knots on a spline.
Additionally, you can use this input to evaluate splines in a way that allows you to use the distance to a spline or the nearest spline knot to create particle-dependent effects. This can be useful for creating a wide range of visual effects that involve splines. Note, this input type is currently used with the Shape Node and Shape** Node in thinkingParticles.


Global Variables:

Variable Description
shapes_in_count The number of shapes (curves) in the list.
shapes_in_id returns the index of the input you created (starting with 0 excluding Time and On). 

 

shapes_in_curve_point

Used to get information/data from a point on a curve or spline, if the return value is 1, the data from this point can be retrieved with the point function.

Calls:

shapes_in_curve_point(in_curve_id, in_curve_pos_rel)
shapes_in_curve_point(in_curve_id, in_curve_pos_rel, in_mtlid)

Parameters:

Parameter Description
in_curve_id The id of the curve to retrieve a point from. Set to -1 to retrieve a point from all curves as a sum.
in_curve_pos_rel A scalar curve position relative to 0 (start) and 1 (end).
in_mtlid The material id to use. Only retrieves points on curves with this material id.

Output:

Return Description
scalar 0: failed, 1: success

 

shapes_in_closest_point

Used to find the closest point on a curve, if the return value is 1, the data of the point can be retrieved with the point function.

Calls:

shapes_in_closest_point(in_curve_id, in_position[3])
shapes_in_closest_point(in_curve_id, in_position[3], in_mtlid)

Parameters:

Parameter Description
in_curve_id The id of the curve to find the closest point on. Set to -1 to find the closest point on all curves as a sum.
in_position A vector of size 3 representing a world position to find the closest point to.
in_mtlid The material id to use. Only finds the closest point on curves with this material id.

Output:

Return Description
scalar 0: failed, 1: success

 

shapes_in_point

Used to get curve point information. Note, this function is only valid if the curve_point or closest_point functions return 1.

Calls:

shapes_in_point(in_point_data, out_scalar)
shapes_in_point(in_point_data, out_vector[3])

Parameters:

Parameter Description
in_point_data The data to retrieve. (see below)
out_scalar A scalar output value.
out_vector[3] A vector of size 3 as output value.

Point Data Parameter:

point_data Description
point_pos World space position of the point.
point_opos Object space position of the point.
point_vel Velocity of the point.
point_norm World space normal of the point.
point_onorm Object space normal of the point.
point_tang World space tangent of the point.
point_otang Object space tangent of the point.
point_cid The id of the curve the point is on.
point_scid The id of the sub curve the point is on.
point_cpos The curve position relative to the point.
point_scpos The sub curve position relative to the point.

Output:

Return Description
scalar 0: failed, 1: success


 

©2023, cebas Visual Technology Inc.