Navigation: Materials > Volume Scatter > Scripted Volume Scatter

 

Scripted Volume Scatter

 

Contact Us: fredsupport@photonengr.com

 

 

 

Description


Adds a scripted volume scatter model attribute to a material definition. This general volume scatter model type defines a new set of ray direction cosines based upon current ray position and direction cosines. The user also has access to individual ray wavelength which allows this feature to model volume fluorescence.  This feature is not compatible for use with coherent raytracing.

 

 

Navigation


This feature can be accessed in the following ways:

From a materials dialog select the "Volume Scatter" tab, then select "User defined volume Scatter (user-script)" as the type.

 

 

Controls


Control

Inputs / Description

Defaults

Active

Turns volume scattering on or off

Unchecked

Maximum number of .......

Sets the maximum number of consecutive scatter events allowed in the material.

1000

Type

Sets model type:

None

Henyey-Greenstein

User-defined volume Scatter

None

Compile

Checks the script for syntax errors.

 

Test

Tests the script with input/output values.

 

 

OK

Accept settings and close dialog box.

 

Cancel

Discard settings and close dialog box.

 

Apply

Accept settings and keep dialog box open.

 

Help

Access this Help page.

 

 

 

Application Notes


Script Implementation

The user constructs a volume scatter definition based upon ray position (g_x, g_y, g_z), ray direction cosines (g_u, g_v, g_w) and uniform random number values (g_r1, g_r2, g_r3, g_r4). The ray output direction is returned in the form of direction cosines (g_uout, g_vout, g_wout). All values are expressed in the local coordinate system of the surface last intersected.

 

The default scripted volume scatter model is a Henyey-Greenstein model as shown below. A description of the mathematical approach is also included.

 

 

 

Document Modifications

It is strongly recommended that the script make no modifications to other nodes in the FRED document.

 

If a change is made to the document during the raytrace by way of the scripted entity, the state of the document as seen by each individual thread of the raytrace will be inconsistently defined and the results of the raytrace may not be valid.

 

 

Related Topics


Scripted Volume Scatter Test Dialog

Henyey-Greenstein Volume Scatter model

 

 

 

 

 

Copyright © Photon Engineering, LLC