0% found this document useful (0 votes)
141 views

Radiance Parameters

The document summarizes key concepts in lighting simulation using Radiance software. It discusses: 1) Radiance uses both deterministic and hemispherical sampling techniques to calculate direct and indirect illumination. Deterministic methods are used for direct light from concentrated sources like the sun, while hemispherical sampling "hunts" for light from any direction. 2) Materials defined as "light" in Radiance participate in direct illumination calculations via deterministic sampling, while "glow" materials use hemispherical sampling for indirect illumination. 3) Increasing hemispherical sample count (ad parameter) produces smoother indirect illumination but is more computationally expensive and may still be lumpier than direct illumination calculations.

Uploaded by

Ritica Bhasin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
141 views

Radiance Parameters

The document summarizes key concepts in lighting simulation using Radiance software. It discusses: 1) Radiance uses both deterministic and hemispherical sampling techniques to calculate direct and indirect illumination. Deterministic methods are used for direct light from concentrated sources like the sun, while hemispherical sampling "hunts" for light from any direction. 2) Materials defined as "light" in Radiance participate in direct illumination calculations via deterministic sampling, while "glow" materials use hemispherical sampling for indirect illumination. 3) Increasing hemispherical sample count (ad parameter) produces smoother indirect illumination but is more computationally expensive and may still be lumpier than direct illumination calculations.

Uploaded by

Ritica Bhasin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 100

13th International Radiance Workshop 2014

London, UK
1-3 September 2014

Ambient Calculation
Crash Course

John Mardaljevic

Professor of Building Daylight Modelling


School of Civil & Building Engineering
Loughborough University, UK
Lighting simulation is a
hunt for light
There are several approaches
we can use to hunt for light

• Ray tracing - forward or backwards

• Radiosity

• Others: Photon mapping, etc.


Direct sky Total illumination
lux [l
Illuminance
10000

1000

100
Indirect sky Total illumination
lux [l
Illuminance
10000

1000

100
Direct sun Total illumination
lux [l
Illuminance
10000

1000

100
Indirect sun Total illumination
lux [l
Illuminance
10000

1000

100
Total illumination
Direct sun Direct sky
Illuminance [lux]
10000
Direct sun

1000

100

Indirect sun I

Indirect sun Indirect sky

Total illumination
I
1

Total illumination
Ray tracing: forwards or
backwards?

Very little from there


ends up in here

Radiance uses backwards RT


Sunlight (beam radiation) can be intense
and comes (usually) from one direction

Skylight and reflected light (from sun and


sky) can come from all directions
Radiance treats the
components of light differently
Together Direct

Specular Indirect show


by th
Plate 23 Rendering with Radiance (c) r
Figure 4. Components of illumination
We “hunt” using different tactics
depending on the source of illumination

•A deterministic method for the direct contribution from


“concentrated” (i.e. direct) sources of light, e.g. sun or
luminaire.

•A random (or stochastic or Monte-Carlo) method to


“hunt” for light that could arrive from any direction (e.g.
skylight or any type of reflected light). In Radiance this is
done using hemispherical sampling.
Deterministic and hemispherical sampling

Deterministic - we know a priori where the light is coming


from, so we send rays to the source.
Hemispherical - we don’t know in advance where the
illumination is coming from, so we search (i.e. sample) every
direction where it might come from.
How we define an emitting material in Radiance determines
how it will be sampled:
• Material type light -> deterministic sampling
• Material type glow -> hemispherical sampling
rpict

‘Camera’
‘Pixel plane’

rtrace
(a)
Direct
Light
View ray intersects with scene
here. A “shadow ray” is then
sent to determine if this point
of the scene (i.e. pixel) is
illuminated by the light.
‘Camera’
‘Pixel plane’

(b)
Indirect
Light
Hemispherical sampling initiated
here. Where a ray intersects
here. A “shadow ray” is then
sent to determine if this point
of the scene (i.e. pixel) is
illuminated by the light.
‘Camera’
‘Pixel plane’

(b)
Indirect
Light
Hemispherical sampling initiated
here. Where a ray intersects
with the scene, shadows rays
may be sent out to determine
if this point is illuminated by
‘Camera’ the light source.
‘Pixel plane’

(c)

Light Specular
Specular reflection to (direct)
with the scene, shadows rays
may be sent out to determine
if this point is illuminated by
‘Camera’ the light source.
‘Pixel plane’

(c)

Light Specular
Specular reflection to (direct)
light source.

Specular reflection to
‘Camera’ illuminated room surfaces.
‘Pixel plane’

Figure 8. Computation of direct, indirect and specular components

Lesson 2.2 Radiance basics Page


When to use light and glow sources

We use the material light for important sources of


illumination, e.g. electric luminaire, the sun.

These participate in the direct calculation of illumination.

The material glow is used to describe extended sources


of illumination (sky or ‘glowing’ ground) and also
unimportant sources that may be visible to the ‘camera’
but do not contribute significantly to scene illumination.
These participate in the indirect calculation of illumination.
Example scene: two polygons
The test scene comprises two polygons - one is
an emitter of light which shines onto the other

Light source
View parameters set
to see source shining
downwards and the
resulting illumination
on the upper-side of
the polygon below

Diffuse reflecting
polygon
Define the emitting material as light
A shadow ray is sent from the reflection polygon to the source at
every point in the pixel plane where the reflection polygon is visible.

The reflecting polygon is evenly illuminated by the light source.


This is clearly revealed in the false colour image.
Note: -ab 0 setting used, i.e. inter-reflection calculation turned off.
Adaptive source subdivision

A light source will be subdivided until the width of each sample


area divided by the distance to the illuminated point is below the
ratio ds [default value = 0.2].
Fig 11.7 Rendering with Radiance
Define the emitting material as glow
Now we have to switch on the inter-reflection to hunt for the
light source, i.e. set -ab 1. We’ll hunt for the source using
different numbers of hemispherical sampling rays (the ad
parameter) to see the effect.

-ad 32 -ad 64
The
12.2 Indirect Irradiance Caching sampling pattern is not evenly 537
.......................................................................................................................................................
distributed across the hemisphere

Fig 12.7 Rendering


Figure 12.7 Sampling pattern used to compute indirect irradiance over the with Radiance
projected
Increasing the number of ad rays does produce
smoother shading (at greater computational cost)
128 256 512

1024 2048 4096


But even with -ad 4096 the illumination from the
glow material is not quite as smooth as with that
from the light material.

‘glow’ ‘light’
Why are the glow renderings lumpy?
With a small glow source, sometimes the hemispherical
sampling finds (i.e. “hits”) the source, and sometimes it doesn’t.
Note also that there is a random (or stochastic) component to
the ray direction.
Pixel dimension

~ scale of “lumps”

Notice that the lumpiness occurs at scales much larger than the effective
dimension of a pixel - what does that suggest about hemispherical sampling
compared to deterministic?
What’s the significance of the big lumps?

These suggests to us that hemispherical sampling is not


happening for every pixel.

If it was, then the “sometimes you find the source sometimes


you don’t” effect would be happening from one pixel to the
next - resulting in lumpiness at the pixel scale.

Usually in Radiance, hemispherical sampling is set to happen


at points every now and then across a scene, and not at
every pixel. Radiance then interpolates (i.e. estimates) values
between these points.
Why use interpolation?
Simply, to be efficient. Consider, for the images used previously,
the reflecting polygon comprised ~25,000 pixels. In the
deterministic calculation (light), a shadow ray was sent to the
source for each of the 25,000 pixels where a view ray intersected
with the reflecting polygon.

If hemispherical sampling occurred at each of these pixels, then


the number of rays sent would be 25,000 times the ad number:
25,000 x 128 = 3,200,000 rays; or,
25,000 x 4096 = 102,400,000 rays.
Even for -ad 128 many times more hemispherical sampling rays
are sent out than for the deterministic calculation, but most of
those will “miss” the small source.
Where interpolation took place
The genambpos utility was used to place markers (red spheres ●)
in the scene where interpolation took place.

Hemispherical
sampling took place
at these
points to generate
this image
Recap
For small, important sources of illumination, we
describe the emitter using the material light so that it
is sampled using the direct (deterministic) calculation.

In the previous example, the scene didn’t allow for


inter-reflection. Here, we modify the scene by adding
an occluding polygon to see how hemispherical
sampling is used to compute indirect or (inter-
reflected) light.
Scene with partially occluding polygon

Light source Polygon B positioned to


partially shade Polygon A
Polygon B
from the light source
(occluding) (material light)

Polygon A
View shows the underside of
Polygon B and the topside of
Polygon A
Rendering for occluding scene -ab 0

90,000 cd/m2

Underside of
0 cd/m2
polygon B not
illuminated

0 cd/m2
Topside of
polygon A half
in shade ~450 cd/m2
Rendering for occluding scene -ab 1

90,000 cd/m2

Underside of
~35 cd/m2
polygon B now
illuminated

0 cd/m2
Topside of
polygon A still
half in shade ~450 cd/m2
Rendering for occluding scene -ab 2

90,000 cd/m2

Underside of
~35 cd/m2
polygon B
illuminated

~3 cd/m2
Shaded half of polygon A
now illuminated by reflected
light from polygon B ~450 cd/m2
Hemispherical sampling (HS) took place
at these locations for -ab 1

Level 0 ●
Direct light
source
HS from here found
the illuminated half of
the lower polygon

But HS from here did not


find any illuminated
surfaces (the light source is
excluded from the indirect
calculation)
Hemispherical sampling took place at
these locations for -ab 2

Level 0 ●
Direct light
Level 1 ● source

Level 1 HS from the


lower polygon can
now find the
reflected light from the
(underside) of the
upper polygon
Questions?
Some quantitative examples

• Predict the illuminance under a simple sky (without sun).

• First a uniform (i.e. constant brightness sky).

• Then a CIE standard overcast sky.


# sky_uni.rad
# uniform brightness sky (B=1)

void glow sky_glow


0
0
4 1 1 1 0

sky_glow source sky


0
0
4 0 0 1 180
% oconv sky_uni.rad > sky_uni.oct

% echo "0 0 0 0 0 1" \


| rtrace -h -I+ -w -ab 1 sky_uni.oct

3.141593e+00 3.141593e+00 3.141593e+00

I = 0.265IR + 0.670IG + 0.065IB


Z 2⇡ Z ⇡/2
I= B (✓, ) sin ✓ cos ✓ d✓ d
0 0

Z 2⇡ Z ⇡/2
I=B sin ✓ cos ✓ d✓ d
0 0

I = ⇡B

I = 3.1415926
CIE standard
Uniform sky
overcast sky
Horizon Horizon

Zenith Zenith

Bz (1 + 2 cos )
B = Bz B =
3
# sky_ovc.rad
# CIE overcast sky (Bz = 1)
!gensky -ang 45 0 -c -b 1
skyfunc glow sky_glow
0
0
4 1 1 1 0

sky_glow source sky


0
0
4 0 0 1 180
% oconv sky_ovc.rad > sky_ovc.oct

% rtrace -w -h -I+ -ab 1 \


sky_ovc.oct < samp.inp \
| rcalc -e '$1=$1*0.265+$2*0.670+$3*0.065'

2.434001 [default ad]

7 Bz /9 = 2.443451

2.443563 [higher ad]


p 5 0.7497
y= x

12 0.6203

Z 1 p
area = x dx = 0.6667
0
Typical values commonly used to
define the CIE overcast sky
• The CIE overcast sky is defined by its horizontal
illuminance, usually given in lux.
• A convenient horizontal illuminance for a (brightish)
overcast sky is 10,000lux, e.g. 500 lux corresponds to a
5% DF.
• In gensky we can specify either the zenith radiance (-b
option) or the horizontal (diffuse) irradiance (-B option).
The second option is perhaps the more direct, and we
shall use that for the next rtrace example.
The irradiance that corresponds to this
illuminance is 10,000/179 = 55.866 W/m .2

This conversion factor is the Radiance system’s


own internal value for luminous efficacy and is
fixed at kR = 179 lumens/watt (lm/W).
!gensky -ang 45 0 -c -B 55.866

rtrace -w -h -I+ -ab 1 \


sky_ovc.oct < samp.inp | rcalc -e \
'$1=($1*0.265+$2*0.670+$3*0.065)*179'

9977.17002 [near enough to 10,000 lux]


Although it might seem too self-evident to point out, we should remind
ourselves that at the horizon the sky “meets” the ground. An actual ground
plane of finite extent, say, a disc of radius r, will always fall short of an
Thishorizon,
“infinite” is what we 1.can
Figure seegiven
For any if we add
view a ground
toward the horizon,plane
we can

Source solid angle sky


(“at infinity”)
Gap between
“infinite” sky
and finite
ground

Finite ground plane

Figure 1. An infinite sky cannot “meet” a finite ground


Ground glow - an upside down sky

skyfunc glow ground_glow


0
0
4 1 1 1 0

ground_glow source ground


0
0
4 0 0 -1 180
This creates a ‘seamless luminous envelope’
around our scene

Sky

Buildings

“Ground”

Fig 6.5 Rendering with Radiance


Predicting internal illuminance
W

S N
Y E
9m (West wall)

X (0,0,0)
3m (North wall)
2.6m (window)

[No ground plane in this example]


#!/bin/csh -f
# loop through ab

foreach ab (1 2 3 4 5)
echo "Ambient bounces" $ab

# Calculate DF
rtrace -w -h -I+ -ab $ab -aa 0.2 -ad 512 \
-as 0 -ar 128 scene.oct \
< samp1.inp | rcalc -e\
'$1=($1*0.265+$2*0.670+$3*0.065*179/10000*100'

end
ab 1 ab 2
0.1
0 2 4 6 8
-aa
-aa0.2
0.2-ad
-ad1024 -as 064-ar-ar128
512 -as 16
(b)
(a)
ab 1
10.0
10.0 ab 2
ab 3
ab 4
DF [%]
DF [%]

ab 5
1.0
1.0

0.1
0.1
00 22 44 66 8
8
-aa Distance
0.2 -ad from
1024Window
-as 64[m]-ar 16
(b)
ab 1
Fig 6.7 Rendering with Radiance
10.0
0.1
0 2 4 6 8
-aa 0.2 -ad 1024 -as 64 -ar 16
(b)
ab 1
10.0 ab 2
ab 3
ab 4
DF [%]

ab 5
1.0

0.1
0 2 4 6 8
Distance from Window [m]

Fig 6.7 Rendering with Radiance


Questions?
Adding complexity

• Now we add a ground plane and a nearby building to our


simple scene. We model the ground plane as a disc of,
say, radius 20 meters, centered on the origin.

• External obstruction is a nearby building positioned so


that it faces the room window and obscures much of the
view of the sky from inside the room. The DF predictions
are repeated as before, only now we increase the
maximum -ab to 7.
Ground plane

Ground glow

Fig 6.8 Rendering with Radiance


For -ab 3 ray
samples ground
plane radiance
calculated from sky
brightness

For -ab 2 ray


samples ground
glow radiance

Fig 6.9 Rendering with Radiance


Photocell’s ‘view’ from the front near the window

(a) (a) (b) (b)


With
(b)
Previous
obstruction
Fig 6.12 Rendering with Radiance
views
ure fromviews
5. Two the daylight
from thefactor plane:
daylight unobstructed
factor view (a), a
plane: unobstructed
0.1
0 2 4 6 8
-aa 0.2 -ad 1024
-aa 0.1 -ad -as
102464
-as-ar 16
64 -ar 16
(a) (b)
ab 1
10.0 ab 2
10.0
ab 3
ab 4
DF [%]

ab 5
DF [%]

1.0 ab 6
ab 7
1.0

0.1
0 2 4 6 8
Distance from Window [m]
0.1
0 2 4 6 8
-aa 0.1 -ad 1024 -as 64 -ar 16
(b)
ab 1
Fig 6.10 Rendering with Radiance
10.0
0.1
0 2 4 6 8
-aa 0.1 -ad 1024 -as 64 -ar 16
(b)
ab 1
10.0 ab 2
ab 3
ab 4
DF [%]

ab 5
1.0 ab 6
ab 7

0.1
0 2 4 6 8
Distance from Window [m]

Fig 6.10 Rendering with Radiance


The ambient resolution
parameter [ar]

The art of sfumato in Radiance


A
B
-ar 4 -ar 64

A B B
-ad 2048 -as 128 -ab 1 -aa 0.15 -av 0 0 0
A B B
-ar 4 -ar 64

99 locations 563 locations

A’ B’ B’
99 locations
cations 563
Dmax ⇥ aa 563
locations loca
Smin =
ar
The overture calculation

• Executethe simulation as normal, however save the


ambient file (i.e. values determined from hemispherical
sampling), but don’t keep the image.

• Then,redo the simulation using the saved ambient file


and the same ambient parameters.
without overture
with overture
without overture
with overture
Irradiance

Estimate

Pixel position along ‘scanline’


Irradiance

Pixel position along ‘scanline’


Irradiance

Pixel position along ‘scanline’


-af keep.af
Irradiance > /dev/null

Pixel position along ‘scanline’


-af keep.af
Irradiance > image.hdr

Pixel position along ‘scanline’


Why overture?
• Ina ‘one-off’ simulation, Radiance has to sometimes use
extrapolation to estimate values between sampling
locations as it progresses from one sampling point to the
next.

• Withan overture calculation, the ambient file (aka


ambient cache) is first populated with values. Thereby
ensuring that - when reused to create an image -
Radiance uses interpolation between already calculated
values rather than less reliable extrapolation. Negligible
overhead in overall computation time.
Parameter settings
and CPU costs
% rtrace -defaults

-av 0.0 0.0 0.0 # ambient value


-aw 0 # ambient value weight
-ab 0 # ambient bounces
-aa 0.100000 # ambient accuracy
-ar 256 # ambient resolution
-ad 1024 # ambient divisions
-as 512 # ambient super-samples
Potential CPU
Parameter Change
overhead

ad 512 to 1024
x2
ambient divisions i.e. doubling

0.2 to 0.1
x4
i.e. halving
aa
ambient accuracy
no interpolation
x a lot?
0

32 to 64
x4
i.e. doubling
ar
ambient resolution
unlimited resolution
x a lot?
0
Potential CPU
Parameter Change
overhead

ad 512 to 1024
x2
ambient divisions i.e. doubling

0.2 to 0.1
x4
i.e. halving
aa
ambient accuracy
no interpolation
x a lot?
0

32 to 64
x4
i.e. doubling
ar
ambient resolution
unlimited resolution
x a lot?
0
Potential CPU
Parameter Change
overhead

ad 512 to 1024
x2
ambient divisions i.e. doubling

0.2 to 0.1
x4
i.e. halving
aa
ambient accuracy
no interpolation
x a lot?
0

32 to 64
x4
i.e. doubling
ar
ambient resolution
unlimited resolution
x a lot?
0
mkillum
mkillum - hunt twice to
avoid having to search wide
only to find small openings
that lead to the light

1
2
Mkillum “window” accounts
Illumination from for illumination from
outside outside”

“window”

Look ‘everywhere’ to find Look first at the window


the light from the sky because we know a priori that
through window it is the ‘source’ of illumination
Step 1
• Create the octree as normal.

• Itis important for the mkillum process that follows to


be able to identify the windows that need to be
treated.

• Use mkillum to compute the window output distribution


i.e. a similar specification to that used to characterise the
light output distribution of a luminaire. Ambient settings
as required.

•A new window is created using the illum material.


Step 2

• Recreate the octree replacing the window with the new


description created by mkillum.

• Replace window.rad with mkiwin.rad.

• Run rpict or rtrace on the new octree with ambient


settings as required.
oconv room.rad window.rad sky.rad \
out.rad > scene.oct
1
mkillum [options] scene.oct < window.rad > \
mkiwin.rad

oconv office.rad mkiwin.rad sky.rad \


out.rad > mkiscene.oct

rpict / rtrace [options] mkiscene.oct 2


ab 1 MKI ab 1 ; ab 0
ab 2 MKI ab 1 ; ab 1
Issues with mkillum

• Many windows can results in too many light sources.

• Nearby external obstructions - subdivide window.

• CAD input - rectangles, surface normals.


mkillum. First let us look at limitations and the interaction of the illum type with
other parts of the Radiance calculation, along with the source-level
Modelling
implementation.
venetian blinds using mkillum

Figure 13.4 A window with venetian blinds whose distribution has been computed on separate
illum surfaces by mkillum. Fig 13.4 Rendering with Radiance

A five-sided illum box encloses the blinds on the inside


37. A light shelf is a horizontal panel designed to redirect daylight onto the ceiling. An example of this arrangement
s were flat, the specular behavior of the system could be accounted
m1 or prism2 type. However, their curvature means that the output
l not Cases
be specular,where the
and an illum mkillum
is needed approach
to represent it. However, doesn’t work
ossible to compute the distribution using a random sampling of rays

oss section of aFig


double-paned window
13.8 Rendering with specular louvers, with sunlight
with Radiance

Curved mirror louvres Light pipes


Questions?
Thank you

e-mail: John Mardaljevic Professor of Building Daylight Modelling


School of Civil & Building Engineering
Loughborough University, UK
links: Staff page

CBDM Loughborough
University

You might also like