Return to index
NAME
type - specify the type of phase function
SYNOPSIS
type {Isotropic | Schlick | Schlick2 | HenyeyG}
DESCRIPTION
Use the keywords Isotropic, Schlick, Schlick2 or HenyeyG to determine the type of phase function. Schlick and Schlick2 phase functions refer to the single-parameter Schlick function and the linear combination of two single-parameter Schlick functions (see [1]). HenyeyG refers to the Henyey-Greenstein phase function. The default value is Isotropic.
EXAMPLE
# Establish a new phf context called "cloudyPhF"
phf cloudyPhF =
type Schlick2
k 0.3
l -0.4
r 0.5
# We're done, the current phf context is now "cloudyPhF"
# Create new named material for participating media context
mpm matPsicoCloud =
# Set a certain albedo
c
# Spectrum measured in 10 nm increments from 400 to 700 nm
cspec 400 700 35.29 44.87 47.25 47.03 46.87 47.00 47.09 \
47.15 46.80 46.17 46.26 48.74 51.08 51.31 51.10 \
51.11 50.52 50.36 51.72 53.61 53.95 52.08 49.49 \
48.30 48.75 49.99 51.35 52.75 54.44 56.34 58.00
albedo 0.97
# Set neutral color
c
# Set extinction coefficient
kt .04
# Modulate with a file of our own
ktgridfile myGridFileApart
# The cloud corner vertices:
v corner.xyz =
p 0 0 0
v corner.XYZ =
p 48 24 48
# The cloud:
# Push object name
o cloud
# Get previously defined matPsicoCloud material
m matPsicoCloud
# Get previously defined cloudyPhF phase function
phf cloudyPhF
# Polygonal face using defined vertices
rectprism corner.xyz corner.XYZ
# Pop object name
o
SEE ALSO
phf,
k,
l,
r