The Phong scatter model simulates a quasi-Gaussian scatter distribution function in which the BSDF is proportional to Tn where T is the cosine of the angle between the specular and scattered rays. It can apply on both transmission and reflection if the Raytrace Controls allow it.
WARNING: Use of the Phong scatter model can result in non-physical effects for specular angles near grazing incidence (see Examples below). Use with caution.
The following picture shows a normalized log space plot of the reflected hemispherical scatter intensity distribution in direction cosine space. The Phong scatter parameters are d = 0.1 and n = 16. The specular angle is 30 degrees.
This feature can be accessed by selecting Phong scatter (Cos^n from specular) as the Scatter Type in the Create a new scatter model dialog box.
The Bidirectional Scatter Distribution Function (BSDF) for the Phong model is defined by the following function:
BSDF = d * cosn(qscatter - qspecular)
The Phong model is linear shift invariant, which means that the BSDF depends only on the cosine of the difference between the specular angle and the scattered angle. The scattered and specular angles are always taken in the plane of the incident ray. Angles are measured relative to the surface normal.
The relative scattered ray power in the specular direction is d multiplied by the projected solid angle in the specular direction. This product cannot exceed 1 for a 100% scattering surface. Failure to satisfy this restriction violates conservation of energy.
The BSDF for the Phong model at large specular angles can result in a split distribution in angle space that is the result of the distribution wrapping across the scatter angle boundary from 90 to –90 degrees.
The Phong model is wavelength invariant.
Scatter in transmission and reflection All scatter models describe the BSDF as measured over a maximum of 2p steradians. Both transmitted and reflected scatter can be modeled by specifying the two scatter directions simultaneously with the appropriate direction controls found under the Scatter tab in the Surface Dialog.
Multiple scatter models can be attached to the same surface. The scatter direction controls are then imposed on every attached model.
Subroutines AddPhongScatter YourScatter SetPhongScatter IndexInScatterList, YourScatter GetPhongScatter IndexInScatterList, YourScatter
Data structure Name – (string) Holds the name of the model. Default is an empty string. Description – (string) Holds the description of the model. Default is an empty string. d – (double) Holds the d parameter as shown in the above dialog. Default is 0. n – (double) Holds the n parameter as shown in the above dialog. Default is 0. ApplyRefl – (Boolean) Applies the scatter model on reflection. Default is False. ApplyTrans – (Boolean) Applies the scatter model on transmission. Default is False. HaltIncident – (Boolean) Halts the incident ray. Default is False.
This example adds a Phong Scatter model to the FRED file associated with this script.
Dim s As T_PHONGSCATTER
This example sets the fourth Scatter model’s name to “Phong Example 2”, as long as that scatter model is a Phong model. It fails if it is any other scatter type.
Dim s As T_PHONGSCATTER
This example gets the fourth Scatter model and prints its name, as long as that scatter model is a Phong model. It fails if it is any other scatter type.
Dim s As T_PHONGSCATTER
The following examples show line plots of the Phong BSDF as a function of scatter angle for specular angles of 0, 30, 45, 60, and 89 degrees for n=16 and n=24. Notice that the distribution wraps across the scatter angle boundary from 90 degrees to –90 degrees for large specular angles.
The Phong scatter model settings are d = 0.1 and n = 16.
The Phong scatter model settings are d = 0.1 and n = 48. Increasing the value of n has the effect of narrowing the linewidth of the distribution function so that more light is scattered near the specular angle.
ABg – for polished surface scatter Binomial - plane symmetric case of general Polynomial Extended Harvey-Shack - shift variant form of the Harvey-Shack model Extended Scripted - User-defined scattering function that allows manipulation of the scattered rays' polarization state Flat Black Paint – specify Total Integrated Scatter (TIS) Harvey-Shack – for polished surface scatter K-Correlation – analytic PSD Lambertian – for diffuse scatter Polynomial - General polynomial with diffuse and Lorentzian component Scripted - User-defined scattering function Surface Particle (Mie) – for particulate contamination Tabulated BSDF – measured BSDF data Tabulated PSD – measured PSD data
|
|||||||||||||||||||||||||||||||||||||||||||||||||||