Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
TracePro_User_Manual_5.0.pdf
Источник:
Скачиваний:
281
Добавлен:
03.05.2015
Размер:
6.09 Mб
Скачать

Surface Properties

Despite its versatility and generality, there are limitations to the capability of the TracePro anisotropic surface property. If you apply an anisotropic surface property to a plane surface, the “grain” of the surface is fixed to one direction. To get the anisotropy to be spatially dependent (i.e. to be different on different parts of the surface) you would have to break up the object on which the surface resides into smaller pieces, one for each anisotropy direction.

However, you can model circular brush marks on a parabolic reflector, for example. Because the “azimuth = 0” axis that you enter is projected onto the tangent plane in order to calculate the azimuth angle, the orientation of the azimuth = 0 axis determines the symmetry of the anisotropy. Suppose the axis of the reflector is along the z axis in Figure 7.7. To model brush marks that go around the reflector, you would enter the azimuth=0 axis as (0, 0, 1) or along the z axis. To make brush marks parallel to the axis of the reflector, enter an azimuth=0 axis perpendicular to the reflector axis, e.g. (1, 0, 0) or (0, 1, 0). To make elliptical brush marks at a skew angle, enter an azimuth=0 axis that is neither parallel nor perpendicular to the reflector axis.

Getting anisotropic data

To obtain data for an anisotropic surface, you will probably have to make measurements from a sample of material. If you do not have the equipment and expertise to make these measurements, you can contract with any of several commercial labs to make the measurements. Lambda Research does not endorse any particular laboratory, but the quantity you need to measure is often referred to as the Hemispherical Directional Reflectance or Transmittance Function, often abbreviated as HDRF or HDTF. This gives you the total reflectance or transmittance versus direction of incidence (by a reciprocity argument) but may or may not distinguish between specular and scattered components. The best way to separate these is to also make BRDF and/or BTDF measurements for several directions of incidence. So to fully characterize an anisotropic surface, you need two sets of measurements: HDRF/HDTF and BRDF/BTDF. For example, to create a surface property for an opaque surface (so that the specular transmittance and BTDF are zero) you would:

1.Obtain BRDF and HDRF measurements of a sample.

2.Fit the BRDF measurements using one of the BSDF models in TracePro.

3.Enter the BRDF coefficients into the surface property.

4.Calculate the absorptance versus θ and φ as A = 1 – HDRF and enter into the surface property.

5.Solve for Reflectance in the surface property editor.

When you make the measurements, be sure that orientation of the sample with respect to the measurement apparatus is known. Define a local axis on the part, and reference all measurements to this axis. This will become the azimuth = 0 axis when you create the surface property in TracePro.

User Defined Surface Properties Expert

Overview

TracePro Expert provides interfaces for user defined properties using dynamic link libraries (DLLs). Currently Surface and Bulk Scatter properties are available.

TracePro 5.0 User’s Manual

7.25

Technical Reference

To use these properties, you must create a DLL which will perform the property calculations and define a property in the property editor which may be applied to a surface or object in TracePro.

Creating a Surface Property DLL

TracePro is delivered with a set of source files that facilitate the creation of a C++ DLL. Through this DLL interface, you can write custom surface properties which can be applied to surfaces within a TracePro model. When tracing rays, TracePro’s raytrace engine will interact with these surface properties as prescribed by the your programmed instructions.

Currently, the following set of inputs and outputs are supported. Provisions have been made to expand the sets of inputs and/or outputs in the future. The delivered source files serve as further clarification and documentation of this implementation.

TABLE 7.1. Surface Property DLL Inputs

Description

Variable

 

 

wavelength temperature position X position Y position Z

incident direction X incident direction Y incident direction Z flux S0, (Stokes Vector) flux S1, (Stokes Vector) flux S2, (Stokes Vector) flux S3, (Stokes Vector)

flux SX, (Stokes Vector) flux SY, (Stokes Vector) flux SZ, (Stokes Vector) surface normal X surface normal Y surface normal Z

input[WAVELENGTH]

input[TEMPERATURE] input[RAY_POS_X] input[RAY_POS_Y] input[RAY_POS_Z] input[RAY_DIR_X] input[RAY_DIR_Y] input[RAY_DIR_Z] input[RAY_FLUX_S0] input[RAY_FLUX_S1] input[RAY_FLUX_S2] input[RAY_FLUX_S3] input[RAY_FLUX_SX] input[RAY_FLUX_SY] input[RAY_FLUX_SZ] input[SURF_NORM_X] input[SURF_NORM_Y] input[SURF_NORM_Z]

7.26

TracePro 5.0 User’s Manual

Surface Properties

TABLE 7.2. Surface Property DLL Outputs

By assigning as follows: results[SIGNAL_TO_TRACEPRO] =

COATING_DLL_SIGNAL_NONE

Description

Variable

s – absorptance

 

results[ABSO_S]

p – absorptance

results[ABSO_P]

s – reflectance

results[REFL_S]

p – reflectance

results[REFL_P]

s – transmittance

results[TRAN_S]

p – transmittance

results[TRAN_P]

Phase reflection [deg]

results[PHAS_R]

Phase transmission [deg]

results[PHAS_T]

By assigning as follows: results[SIGNAL_TO_TRACEPRO] =

COATING_DLL_SIGNAL_USE_MUELLER_MATRIX

Description

16 Mueller Matrix components for reflection

16 Mueller Matrix components for transmission

Variable

results[REFL_MM_xy]

x -> 0 to 3 ; y-> 0 to 3

results[TRAN_MM_xy]

x -> 0 to 3 ; y-> 0 to 3

By assigning as follows: results[SIGNAL_TO_TRACEPRO] =

COATING_DLL_SIGNAL_FULL_RAY_CONTROL

Description

Variable

s – absorptance p – absorptance

output direction X output direction Y output direction Z output Stokes, S0 output Stokes, S1 output Stokes, S2 output Stokes, S3 output Stokes, SX output Stokes, SY output Stokes, SZ

results[ABSO_S] results[ABSO_P] results[RAYOUT_DIR_X] results[RAYOUT_DIR_Y] results[RAYOUT_DIR_Z] results[RAYOUT_FLUX_S0] results[RAYOUT_FLUX_S1] results[RAYOUT_FLUX_S2] results[RAYOUT_FLUX_S3] results[RAYOUT_FLUX_SX] results[RAYOUT_FLUX_SY] results[RAYOUT_FLUX_SZ]

The DLL information is consolidated in the \DLLs directory of the TracePro installation directory (default is C:\Program Files\Lambda Research Corporation\TracePro). Within this DLLs directory you will find the following:

TracePro 5.0 User’s Manual

7.27

Technical Reference

TraceProDLLs.h

header file shared with TracePro defines the array subscripts to the input and output arrays should be included in each new Surface Property DLL

\SurfacePropDll

folder that contains source, project, and workspace files as an example to writing your own DLL

The following steps can be used to create and use your DLL:

1.Copy the SurfacePropDll folder and it contents to a new folder in the DLLs directory.

2.Open the workspace file (surf.dsw) in Developer Studio.

3.Add your code to the source files surf.h and surp.cpp

4.Build the DLL. The name of the DLL from this project will be surf.dll.

5.Within TracePro’s Surface Property Editor, create a new surface property. Set the “Type:” to “Coating DLL” and browse to the DLL’s location on the disk.

6.You may now apply this surface property to any surface in a TracePro model using the Apply properties dialog box.

7.When applying this type of surface property you must also supply an origin, normal direction, and up direction. This will identify the local coordinate system of the property in the model’s global coordinate system.

8.After debugging your work, move and rename the DLL. It may be moved to any convenient location such as the DLLs directory.

9.After renaming the DLL, go back and modify the surface property to identify the new location of the DLL.

Create the Surface Property

DLL properties are created in a similar manner to standard surface properties. Add a new property using the Add Surface Property button and set the Type to Coating DLL. The Specular data is provided in the DLL. Scattering data may be added separately in the property editor.

Apply Surface Property

The Apply Surface Property dialog provides additional data for DLL properties (see Figure 7.8). An Origin, Normal Direction (normal vector) and Up Direction (up vector) are available to orient the property to the surface. This data permits spatially varying properties. The normal and up vectors will be transformed when the object is rotated and the origin will be translated when the object is moved. A User Param (user parameter) cell is also available as a storage place for data that you want to keep with the Surface Property. A standard Windows browse button:

is placed to the right of the User Param cell in case you want to easily determine a file location path to store in the User Param cell.

7.28

TracePro 5.0 User’s Manual

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]