Navigation: Scripting Reference Manual > Functions & Subroutines > AddTabulatedScatter2

 

AddTabulatedScatter2

 

Contact Us: fredsupport@photonengr.com

 

Description

Adds a new Tabulated BSDF model using a valid file containing scatter data.  The FileName member of the T_TABULATEDSCATTER structure should point to the data file.  If the FileName member is left un-initialized then this function will add a tabulated scatter model whose file pointer is empty.  For the data file format please refer to the help topic on Tabulated BSDF.

 

Syntax

id = AddTabulatedScatter2( scatter )

 

Parameters

id (Long)

Assigned identifier of added model.

 

scatter As T_TABULATEDSCATTER

Structure containing model definition.  Structure member "FileName" should point to a valid data file.

 

 

Example

The following example demonstrates how to create a tabulated scatter model from a file, where the scatter model operates in reflection and has a TIS subsampled region about specular of 2 degrees.

 

Sub Main

    Dim scat As Long

    Dim tTab As T_TABULATEDSCATTER

    InitTabulatedScatter( tTab )

    tTab.filename     = "C:\tmp\fred\tabulatedBsdf.txt"

    tTab.ApplyRefl    = True

    tTab.HaltIncident = False

    tTab.SymmetryType = "Beta-Beta0"

    tTab.TISRegionSampleCountX     = 200

    tTab.TISRegionSampleCountY     = 200

    tTab.TISSpecRegionSampleCountX = 200

    tTab.TISSpecRegionSampleCountY = 200

    tTab.TISSpecRegionSemiApeX     = 2

    tTab.TISSpecRegionSemiApeY     = 2

    scat = AddTabulatedScatter2( tTab )

 

    Update

 

End Sub

 

See Also

T_TABULATEDSCATTER

AddTabulatedScatterData

GetTabulatedScatterIthData

GetTabulatedScatterDataCount

SetTabulatedScatterIthData

 

 

 

 

 

Copyright © Photon Engineering, LLC