thinkingParticles 7.3

Field Output Functions

The ExpressionME-L node allows you to create outputs for specific OpenVDB Field Data, which can then be further processed with any other available node, including another ExpressionME-L node.

Below is a list of functions dedicated to creating and passing on outputs and Field data.

 

Global Variables

Variable Description
field_out Scalar or vector value of the current voxel. Note, this value is only available when the first input is a Field (parallel processing).
field_in_voxelsize World voxel size
field_in_ovoxelsize voxel size in object space
field_out_valuestate Value state of the current voxel "valueon", "valueoff", "forcevalueoff", "forcevalueon"
field_out_id returns the index of the output you created (starting with 0).



field_out_iset

This function sets the value of a voxel in index (voxel) space. The position is rounded to the nearest voxel. The value can be either a scalar or vector.

Calls:

field_out_iset(value_in, ipos_in)
field_out_iset(value_in, ipos_in, set_type_in)
field_out_iset(value_in, ipos_in, set_type_in, create_in)

Parameters:

Parameter Type Description
value_in float or float[3] The value to set for the voxel.
ipos_in float[3] The position in index (voxel) space to set the value.
set_type_in int The set type. Refer to the Set Types table for more information. Default is set_max.
create_in bool "true": Create a voxel if it does not exist. "false": Set the value only if the voxel exists. Default is true.

Set Types:

Type Description
set_rep Replace the value.
set_add Add to the existing value.
set_sub Subtract from the existing value.
set_mul Multiply the existing value.
set_dev Divide the existing value.
set_min Set the minimum value.
set_max Set the maximum value.

Returns:

Value Description
0 The operation failed.
1 The operation was successful.

 

field_out_wset

Description: This function sets the value of a voxel in world space. The position is transformed to index (voxel) space and rounded to the nearest voxel before the value is set. The value can be either a scalar or vector.

Calls:

field_out_wset(value_in, wpos_in)
field_out_wset(value_in, wpos_in, set_type_in)
field_out_wset(value_in, wpos_in, set_type_in, create_in)

Parameters:

Parameter Type Description
value_in float or float[3] The value to set for the voxel.
wpos_in float[3] The position in world space to set the value. The position is transformed to index space before the value is set.
set_type_in int The set type. Refer to the Set Types table for more information. Default is set_max.
create_in bool "true": Create a voxel if it does not exist. "false": Set the value only if the voxel exists. Default is true.

Set Types:

Type Description
set_replace Replace the value.
set_add Add to the existing value.
set_subtract Subtract from the existing value.
set_multiply Multiply the existing value.
set_divide Divide the existing value.
set_min Set the minimum value.
set_max Set the maximum value.

Returns:

Value Description
0 The operation failed.
1 The operation was successful.

 

field_out_iraster

This function rasters a value into voxels in a spherical shape centered at a position in index (voxel) space. The radius of the sphere is specified in index space and the value is set for all voxels within the sphere. The radius blending curve can be manipulated using the bias parameter. The value can be either a scalar or vector.

Calls:

field_out_iraster(value_in, ipos_in, iradius_in)
field_out_iraster(value_in, ipos_in, iradius_in, bias_in)
field_out_iraster(value_in, ipos_in, iradius_in, bias_in, set_type_in)   
field_out_iraster(value_in, ipos_in, iradius_in, bias_in, set_type_in, create_in)    field_out_iraster(value_in, ipos_in, iradius_in, bias_in, set_type_in, create_in, iminradius_in, imaxradius_in)

Parameters:

Parameter Type Description
value_in float or float[3] The value to set for the voxels.
ipos_in float[3] The position in index (voxel) space to center the spherical raster.
iradius_in float The radius of the sphere in index space.
bias_in float Manipulate the radius blending curve. A value of 1 results in a linear curve. Values less than 1 result in a bell curve. Values greater than 1 result in a pointed curve. Default is 1.
set_type_in int The set type. Refer to the Set Types table for more information. Default is set_max.
create_in bool "true": Create a voxel if it does not exist. "false": Set the value only if the voxel exists. Default is true.
iminradius_in float The minimum radius in index space. Default is 1.
imaxradius_in float The maximum radius in index space. Default is 100.

Set Types:

Type Description
set_replace Replace the value.
set_add Add to the existing value.
set_subtract Subtract from the existing value.
set_multiply Multiply the existing value.
set_divide Divide the existing value.
set_min Set the minimum value.
set_max Set the maximum value.

Returns:

Value Description
0 The operation failed.
1 The operation was successful.

 

field_out_wraster

Description: This function rasters a value into voxels in a spherical shape centered at a position in world space. The radius of the sphere is specified in world space and the value is set for all voxels within the sphere. The radius blending curve can be manipulated using the bias parameter. The value can be either a scalar or vector. The world space position is transformed into index space before setting the voxels.

Calls:

field_out_wraster(value_in, wpos_in, wradius_in)
field_out_wraster(value_in, wpos_in, wradius_in, bias_in)
field_out_wraster(value_in, wpos_in, wradius_in, bias_in, set_type_in)
field_out_wraster(value_in, wpos_in, wradius_in, bias_in, set_type_in, create_in)
field_out_wraster(value_in, wpos_in, wradius_in, bias_in, set_type_in, create_in, iminradius_in, imaxradius_in)

Parameters:

Parameter Type Description
value_in float or float[3] The value to set for the voxels.
wpos_in float[3] The position in world space to center the spherical raster.
wradius_in float The radius of the sphere in world space.
bias_in float Manipulate the radius blending curve. A value of 1 results in a linear curve. Values less than 1 result in a bell curve. Values greater than 1 result in a pointed curve. Default is 1.
set_type_in int The set type. Refer to the Set Types table for more information. Default is set_max.
create_in bool "true": Create a voxel if it does not exist. "false": Set the value only if the voxel exists. Default is true.
iminradius_in float The minimum radius in index space. Default is 1.
imaxradius_in float The maximum radius in index space. Default is 100.

Set Types:

Type Description
set_replace Replace the value.
set_add Add to the existing value.
set_subtract Subtract from the existing value.
set_muliply Multiply the existing value.
set_divide Divide the existing value.
set_min Set the minimum value.
set_max Set the maximum value.

Returns:

Value Description
0 The operation failed.
1 The operation was successful.

 

field_out_iextrapolate

This function extrapolates a value into the surrounding voxels in index space using trilinear interpolation. The value can be either a scalar or vector.

Calls:

field_out_iextrapolate(value_in, ipos_in)
field_out_iextrapolate(value_in, ipos_in, set_type_in)
field_out_iextrapolate(value_in, ipos_in, set_type_in, create_in)

Parameters:

Parameter Type Description
value_in float or float[3] The value to set for the voxels.
ipos_in float[3] The position in index space to extrapolate the value.
set_type_in int The set type. Refer to the Set Types table for more information. Default is set_max.
create_in bool "true": Create a voxel if it does not exist. "false": Set the value only if the voxel exists. Default is true.

Set Types:

Type Description
set_replace Replace the value.
set_add Add to the existing value.
set_subtract Subtract from the existing value.
set_multiply Multiply the existing value.
set_divide Divide the existing value.
set_min Set the minimum value.
set_max Set the maximum value.

Returns:

Value Description
0 The operation failed.
1 The operation was successful.

 

 

field_out_wextrapolate

This function extrapolates a value into the surrounding voxels in world space using trilinear interpolation. The value can be either a scalar or vector. The position in world space is transformed into index space before extrapolation.

Calls:

field_out_wextrapolate(value_in, wpos_in)
field_out_wextrapolate(value_in, wpos_in, set_type_in)
field_out_wextrapolate(value_in, wpos_in, set_type_in, create_in)

Parameters:

Parameter Type Description
value_in float or float[3] The value to set for the voxels.
wpos_in float[3] The position in world space to extrapolate the value.
set_type_in int The set type. Refer to the Set Types table for more information. Default is set_max.
create_in bool "true": Create a voxel if it does not exist. "false": Set the value only if the voxel exists. Default is true.

Set Types:

Type Description
set_replace Replace the value.
set_add Add to the existing value.
set_subtract Subtract from the existing value.
set_muliply Multiply the existing value.
set_divide Divide the existing value.
set_min Set the minimum value.
set_max Set the maximum value.

Returns:

Value Description
0 The operation failed.
1 The operation was successful.

 

field_out_transform

This function transforms a vector or point from one space into various other coordinate spaces. Vector transform represents only rotate/scale and NO translation. Point rtransforms represent a full transform including rotation, scale and translation.
 

Calls:

field_out_transform(transform_point, in_fromto_type, in_vector[3], out_vector[3]);
field_out_transform(transform_vector, in_fromto_type, in_vector[3], out_vector[3]);
field_out_transform(transform_point,in_fromto_type, in_out_vector[3]);

field_out_transform(transform_vector,in_fromto_type, in_out_vector[3]);

Parameters:

Name Description
transform_type sets the transformation type to either vector or point(complete transform). 
in_fromto_type specifies the transformation space to use see below table for possibel options.
in_vector[3] specifies the input 3D vector to transform
out_vector[3] stores the transformed result of this function
in_out_vector[3] the passed in vector will be overwritten with the result of the transformation


fromto_types:

Name Description
object2world will convert the vector from object to world coordinates
world2object will convert the vector from world to object coordinates
voxel2world will convert the vector from voxel to world coordinates
world2voxel will convert the vector from world to voxel coordinates
voxel2object will convert the vector from voxel to object coordinates
object2voxel will convert the vector from object to voxel coordinates

Return:

0; Fail, 1; Succed

 

 

©2023, cebas Visual Technology Inc.