Navigation: Scripting Reference Manual > Functions & Subroutines > MPCInitAdvancedRaytrace

 

MPCInitAdvancedRaytrace

 

Contact Us: fredsupport@photonengr.com

 

Description

This subroutine initializes a T_MPCADVANCEDRAYTRACE data structure with default values.

 

Syntax

MPCInitAdvancedRaytrace( tMPC )

 

 

Parameters

tMPC As T_MPCADVANCEDRAYTRACE

Input data structure being initialized with default values.  Structure members are initialized to the following values.

 

Structure Member

Initialized Value

action

"GPU"

doublePrecision

False

rayBufSize

1048576

maxSplitDepth

Maximum (specular ancestry) + (scatter ancestry) supported by the raytrace properties assigned to the model's traceable surfaces

log

False

logFile

Location of the associated FRED document

rayPaths

False

maxEventsPerPath

10

randomNumberSeedGeneration

"preference"

randomNumberSeed

(will be random)

forceMonteCarlo

False

reinitialize

False

reloadDoc

False

renderFile

Same location as associated FRED document, with the filename "mpc_render.bmp"

supressFacetData

False

suppressSurfPowers

False

 

 

Example

The example below demonstrates how to initialize a T_MPCADVANCEDRAYTRACE data structure to default values, modify specific parameter values of interest, and then use the structure to perform an MPC Trace Advanced call.

 

Sub Main

 

    Dim mpcErr As Huge_

    Dim tMPC As T_MPCADVANCEDRAYTRACE

    MPCInitAdvancedRaytrace( tMPC )

 

    tMPC.action          = "GPU" 'Use GPUs to generate starting rays

    tMPC.forceMonteCarlo = True 'Overrides raytrace properties

    tMPC.log             = True

 

    mpcErr = MPCAdvancedRaytrace( tMPC )

    Print "MPC error code = " & mpcErr

 

End Sub

 

 

See Also

MPCAdvancedRaytrace

MPCRaytrace

T_MPCADVANCEDRAYTRACE

MPCGetRaySumMode

MPCGetSimpleTraceMode

MPCSetRaySumMode

MPCSetSimpleTraceMode

 

 

 

 

 

Copyright © Photon Engineering, LLC