www.schorsch.com

Rayfront 1.0 User Manual

Contact | Sitemap | Search

Prismatic Material Types

The prismatic materialy types are for general light redirection from prismatic glazings, generating secondary light sources. They can only be used for planar surfaces (eg. polygons or disks) and should not result in either light concentration or scattering.

There is a function file "prism.cal" in the standard library, which makes sure that those conditions are met. The functions in this file orient the prism panel so that the flat side of the panel coincides with the X-Z plane, and the normal points into negative Y. The correct orientation for the actual position in the scene is then set by applying the right transformations.

Prism1

The prism1 type applies to prism panels that have only one main light exit direction. Typically, the profile of the panel will have a saw-tooth shape. material definition simplifies the actual situation quite a bit, since it ignores the spatial properties of the prismatic profile. The simplification assumes that a ray that enters the panel will always be redirected by the oblique face, and never hits the horizontal face. In reality, the probability that this is the case can easily approach zero for rays hitting the panel under small angles.

[Prism1 Parameters Dialog]

Function File:
This pop-up list offers all function files known to the system for selection. If a file is active, then the variables in that file can be selected for one or several of the vector coordinates. Otherwise, the coordinates must be entered as expressions. Edit...
Start the text editor that was configured in the project preferences to edit the function file. New...
Create a new function file, and start the text editor to edit it.
The file "prism.cal" from the standard library offers all the required functions and variables.

Coefficient:
This variable or expression specifies the fraction of light leaving the panel with a specific ray.
In the function file "prism.cal", the appropriate selection is "coef1".

Direction X:
Direction Y:
Direction Z:
Those three variables or expressions specify the new direction for the redirected ray. The vector defined this way doesn't need to be normalized. The builtin variables "DxA", "DyA", and "DzA", giving the normalized direction to the target light source, are defined for convenience with this material.
In the function file "prism.cal", the appropriate selections for the new direction vector are "dx1", "dy1", and "dz1".

[Prism1 Geometry Diagram]

Real Arguments
Rayfront will check the selected function file to decide how many real arguments the material definition should supply. If this number is greater than the mandatory arguments specifying the basic properties, then the needed number of entry fields in the list is made available. Supplying those arguments is optional, but failing to do so may result in runtime errors when the selected function relies on a specific argument which is not set.
In the function file "prism.cal", the required arguments are the following:

arg(1) The index of refraction of the panel surfaces.
arg(2) The thickness of the prism triangle.
arg(3) The height of the upper side of the triangle.
arg(4) The height of the lower side of the triangle
(normally zero for this type).

Prism2

The prism2 type applies to prism panels that have two main light exit directions. Those two directions are resulting from the fact that the two sides of the prismatic triangles refract light into different directions. The relative height of those two sides also defines the relative weight of the two resulting rays. Note that the material definition simplifies the actual situation quite a bit, since it ignores the spatial properties of the prismatic profile. The simplification assumes that a ray that enters the panel in the height area of either the upper or lower face will also be redirected by that respective face. In reality, the probability that this happens can easily approach zero for rays hitting the panel under small angles.

[Prism2 Parameters Dialog]

Function File:
This pop-up list offers all function files known to the system for selection. If a file is active, then the variables in that file can be selected for one or several of the vector coordinates. Otherwise, the coordinates must be entered as expressions.
Edit...
Start the text editor that was configured in the project preferences to edit the function file.
New...
Create a new function file, and start the text editor to edit it.
The file "prism.cal" from the standard library offers all the required functions and variables.

Coefficient 1:
This variable or expression specifies the fraction of light leaving the panel with a specific ray, as created by the upper side of each prism triangle.
In the function file "prism.cal", the appropriate selection is "coef1".

Direction 1 X:
Direction 1 Y:
Direction 1 Z:
Those three variables or expressions specify the new direction for the redirected ray, as created by the upper side of each prism triangle. The vector defined this way doesn't need to be normalized. The builtin variables "DxA", "DyA", and "DzA", giving the normalized direction to the target light source, are defined for convenience with this material.
In the function file "prism.cal", the appropriate selections for the new direction vector are "dx1", "dy1", and "dz1".

Coefficient 2:
This variable or expression specifies the fraction of light leaving the panel with a specific ray, as created by the lower side of each prism triangle.
In the function file "prism.cal", the appropriate selection is "coef2".

Direction 2 X:
Direction 2 Y:
Direction 2 Z:
Those three variables or expressions specify the new direction for the redirected ray, as created by the lower side of each prism triangle. The vector defined this way doesn't need to be normalized. The builtin variables "DxA", "DyA", and "DzA", giving the normalized direction to the target light source, are defined for convenience with this material.
In the function file "prism.cal", the appropriate selections for the new direction vector are "dx2", "dy2", and "dz2".

[Prism2 Geometry Diagram]

Real Arguments
Rayfront will check the selected function file to decide how many real arguments the material definition should supply. If this number is greater than the mandatory arguments specifying the basic properties, then the needed number of entry fields in the list is made available. Supplying those arguments is optional, but failing to do so may result in runtime errors when the selected function relies on a specific argument which is not set.
In the function file "prism.cal", the required arguments are the following:

arg(1) The index of refraction of the panel surfaces.
arg(2) The thickness of the prism triangle.
arg(3) The height of the upper side of the triangle.
arg(4) The height of the lower side of the triangle.

Navigation:

Up:
User Manual Overview
     The Simulation Control Center
         Project Variation Settings
             Modifier Types
                 Material Types

Previous:
Mist
Next:
BRTDfunc
http://www.schorsch.com/en/software/rayfront/manual/prismdef.html
Copyright © 2004-2020 schorsch.com