Navigation: Scatterers > Scatter Types > Phong

 

Phong

 

Contact Us: fredsupport@photonengr.com

 

 

 

Description


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.

 

 

 

Navigation


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.

 

 

Controls


Control

Inputs

Defaults

Name

Name of the model (required).

Scatter n

Description

Description of the model  (optional).

 

Type

Select Phong from the pull down menu.

Lambertian

d

Value of d between 0 and 1.

0.1

n

Value of the exponent greater than 1.

16

Additional data

Apply on Reflection

Apply the scatter model on reflection.

Checked

Apply on Transmission

Apply the scatter model on transmission.

Unchecked

Halt Incident Ray

For any surface with this scatter model assigned to it, no specular rays will leave the surface, regardless of the surface coating and raytrace property settings, if this toggle is checked.

Checked

 

OK

Accept settings and close dialog box.

 

Cancel

Discard settings and close dialog box.

 

Help

Access this Help page.

 

 

 

Application Notes


BSDF functional form

The Bidirectional Scatter Distribution Function (BSDF) for the Phong model is defined by the following function:

 

BSDF = d * cosn(qscatter - qspecular)

 

 

Linear shift invariance

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.

 

 

Ray power

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.

 

 

Distribution splitting

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.   

 

 

Wavelength invariance

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

Multiple scatter models can be attached to the same surface. The scatter direction controls are then imposed on every attached model.  

 

 

Scripting with Phong scatter 

Subroutines

AddPhongScatter YourScatter

SetPhongScatter IndexInScatterList, YourScatter

GetPhongScatter IndexInScatterList, YourScatter

 

Data structure
T_PHONGSCATTER

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
s.Name = "Phong Example"
s.Description = "Sample from FRED documentation"
s.d = 0.05
s.n =
s.ApplyRefl = true
s.ApplyTrans = true
s.HaltIncident = true
AddPhongScatter s

 

 

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
s.Name = "Phong Example 2"
SetPhongScatter 4, s

 

 

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
GetPhongScatter 4, s
Print s.Name

 

 

Examples

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.

 

 

 

Related Topics


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

 

 

 

 

 

Copyright © Photon Engineering, LLC