64
Hierarchical Radiosity Hierarchical Radiosity with Multiresolution with Multiresolution Meshes Meshes Andrew J. Willmott Committee Committee Paul Heckbert Paul Heckbert David O’Hallaron David O’Hallaron Steven Seitz Steven Seitz Francois Sillion (iMAGIS) Francois Sillion (iMAGIS)

Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

Embed Size (px)

Citation preview

Page 1: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

Hierarchical Radiosity with Hierarchical Radiosity with Multiresolution MeshesMultiresolution Meshes

Andrew J. Willmott

CommitteeCommittee

Paul HeckbertPaul Heckbert

David O’HallaronDavid O’Hallaron

Steven SeitzSteven Seitz

Francois Sillion (iMAGIS)Francois Sillion (iMAGIS)

Page 2: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

2

Thesis StatementThesis Statement

The DomainThe Domain Radiosity on scenes with detailed models

By using By using face cluster hierarchiesface cluster hierarchies we can we can Get sub-linear or constant time complexity Better approximate detailed model surfaces

Page 3: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

3

RouteRoute

Global illumination Radiosity & Hierarchical Radiosity

Methods Problems Face cluster hierarchies Face Cluster Radiosity Results

Page 4: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

4

Simple IlluminationSimple Illumination

Solid Colours Solid Colours Direct Illumination Direct Illumination

Page 5: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

5

Global IlluminationGlobal Illumination

+ Shadows + Shadows + Indirect Illumination + Indirect Illumination

Page 6: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

6

Reflection TypesReflection Types

Specular Specular DiffuseDiffuse

Page 7: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

7

Reflection TypesReflection Types

Specular Specular DiffuseDiffuse

Page 8: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

8

RadiosityRadiosity

DefinitionDefinition The calculation of global illumination for

scenes with only diffuse surfaces

ConsequencesConsequences Easier to solve than the full equation Suitable for finite-element methods The solution produced is view-

independent

Page 9: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

9

Indirect IlluminationIndirect Illumination

Lightscape Lightscape TechnologiesTechnologies

Page 10: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

10

View-IndependenceView-Independence

Quake: IDQuake: ID

Page 11: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

11

Finite ElementsFinite Elements

Discretize scene into Discretize scene into nn elements, solve for each elements, solve for each elementelement

Page 12: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

12

Solving for RadiositySolving for Radiosity

Each element emits radiosity [Watts/sr/m2]

Can write in terms of all other elements:

bi = ijFij bj + ei

Gives system of linear equations

Page 13: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

13

Early Radiosity MethodsEarly Radiosity Methods

Matrix Radiosity [Cohen ‘85]Matrix Radiosity [Cohen ‘85] Initially used standard matrix techniques

(Jacobi, Gauss-Seidel) But this is O(n2) in time and space

Progressive Radiosity [Cohen ‘88]Progressive Radiosity [Cohen ‘88] Reorder computation Repeatedly shoot element with most unshot

radiosity: can see results improving Still O(n2) speed, but O(n) memory

Page 14: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

14

Hierarchical RadiosityHierarchical Radiosity

[Hanrahan ’91] Use hierarchical mesh (quadtree)

•Coarse level: unimportant interactions•Fine level: Interactions between close surfaces

O(k2 + n) time and space complexity• k is the number of input polygons• n is the number of elements used by the

solution k2 is a problem for k > 1000 polygons

Page 15: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

15

Refinement for Hier. Rad.Refinement for Hier. Rad.

Root: entire scene

High Resolution

Input polygon

s

Refinements

Page 16: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

16

Hierarchical Radiosity with Hierarchical Radiosity with Volume ClusteringVolume Clustering

Constructs a complete scene hierarchy Constructs a complete scene hierarchy [Smits ‘94, Sillion ‘94] Adds volume clusters above input

polygons (octree) Completes the hierarchy Algorithm is O(k logk + n) Klogk is a problem for k > 100,000

Page 17: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

17

Volume ClusteringVolume Clustering

Unused refinements

Input polygons

Leaf elements

Used refinemen

ts

Volume clusters

Page 18: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

18

Hier. Radiosity DemoHier. Radiosity Demo

Page 19: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

19

Problems with HRVCProblems with HRVC

Slow for complex scenes (k >> n)• Must push irradiance down to leaves when

gathering, pull radiosity up when shooting• O(logk), and all input polygons must be

touched on each iteration Approximation

• Volume clusters approximate a cloud of unconnected polygons

• Idea: We can do better for connected, largely smooth surfaces

Page 20: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

20

My FocusMy Focus

Working with large scanned modelsWorking with large scanned models Large enough to make klogk a problem Observation

• Most polygons are for high resolution detail• Don’t affect radiosity computations much

and with Multiresolution Modelsand with Multiresolution Models Allow you to adjust the resolution of the

model at different places on the model

Page 21: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

21

Detailed ModelsDetailed Models

200,000 triangle model. Medium Resolution 200,000 triangle model. Medium Resolution version(!) version(!)

Page 22: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

22

Demo of a MR ModelDemo of a MR Model

Page 23: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

23

IntuitionIntuition

Run radiosity on simplified

model

Instead of running

radiosity on detailed model

Apply results to original

model

Page 24: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

24

SimplificationSimplification

Root

High Resolution

Input polygons

Simplifications

Page 25: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

25

AdvantagesAdvantages

No manual selection of simplification level Don’t access each of the k input polygons

during each iteration Don’t store radiosity for each input

polygon Multiresolution models are precalculated

• Once for each new model acquired• Amortized over many scenes and renders

Page 26: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

26

Face ClustersFace Clusters

Dual of standard multiresolution model

Group faces rather than vertices

Don’t change geometry of the model

Page 27: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

27

Face Cluster HierarchiesFace Cluster Hierarchies

Iteratively merge face clustersInitial clusters each contain a single polygonCreate links between two child clusters and their unionRepeat until only root cluster left

Page 28: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

28

Face Cluster DemoFace Cluster Demo

Page 29: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

29

A Face ClusterA Face Cluster

An approximately planar region on the mesh

Container for a set of connected faces • Oriented bounding box• Aggregate area-weighted normal• Pointers to the two child clusters that

partition it

Page 30: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

30

Radiosity with Face ClustersRadiosity with Face Clusters

Unused refinements

Input polygons

Leaf elements

Used refinemen

ts

Volume clusters

Face clusters

Unusedface

clusters

Page 31: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

31

We use Garland’s Quadric methodWe use Garland’s Quadric method Dual of edge-collapse simplification

• Quadric error term measures distance to best-fit plane of face vertices, rather than distance to face planes of best-fit vertex.

Most important properties• Produces clusters that are approximately

planar• Tight oriented bounding box calculated via

Principal Component Analysis• Add well-shaped term to get compact clusters

Building the HierarchyBuilding the Hierarchy

Page 32: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

32

Radiator DemoRadiator Demo

Page 33: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

33

Vector RadiosityVector Radiosity

Standard radiosity equation is scalarStandard radiosity equation is scalar Applied to face clusters it incorrectly

ignores variation in local normals No obvious way of combining radiosities

of two elements with different normals

SolutionSolution Recast radiosity equation in terms of

irradiance vector

Page 34: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

34

Leaf Elements

Scalar Radiosity

Vector Radiosity

Why Vector Radiosity?Why Vector Radiosity?

Page 35: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

35

Gather in FCRGather in FCR

Gather: process of transferring radiosity between elements

Must be able to calculate Visible Projected Area quicklyDeveloped methods of bounding VPA

without sampling visibility

Page 36: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

36

Vector InterpolationVector Interpolation

Can get inter-cluster discontinuities, same as with constant radiosity basis functionCan fix by resampling irradiance vector at corners of the cluster, and interpolatingFinal pass only

Page 37: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

37

Vector InterpolationVector Interpolation

Same clusters: without & with interpolationSame clusters: without & with interpolation

Page 38: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

38

Algorithm SummaryAlgorithm Summary

Construct face cluster hierarchy file for each new model. klogk (Approx. linear in k)

Create scene from models Read in scene description, add root face

cluster nodes to a volume cluster hierarchy Run gather/push-pull/refine

solver. Sub-linear in k Propagate radiosity solution to leaves of all

models, write to disk. Linear in k

Dominant

Page 39: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

39

Results: Test Patch WhalesResults: Test Patch Whales

Radiance, 378sRadiance, 378sFCR, 127sFCR, 127s

RenderPark, RenderPark, 2700s2700s

Page 40: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

40

Results: ComplexityResults: Complexity

Tested on several scene resolutionsTested on several scene resolutions Museum scene Medium-high illumination complexity

(nighttime, daytime) 6 scanned models, implicit surface

podium, displacement-mapped floor 550,000 polygons in maximum scene;

lower-resolution ones generated by simplification

Page 41: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

41

Results: Solution TimeResults: Solution Time

Same scene, Same scene, progressivelprogressivel

y more y more polygonspolygons

Page 42: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

42

Results: Memory UseResults: Memory Use

Same scene, Same scene, progressivelprogressivel

y more y more polygonspolygons

Page 43: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

43

Results: ComplexityResults: Complexity

Volume Volume Clustering, 850sClustering, 850s

Face Cluster Face Cluster Radiosity, 150s Radiosity, 150s

Page 44: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

44

Time: 450s Time: 450s secssecs

Results: Large SceneResults: Large Scene

Radiance, Radiance, Progressive Progressive and HRVC and HRVC

would not fit would not fit in 1GBin 1GB

3,350,000 3,350,000 trianglestriangles

Page 45: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

45

Results: Large SceneResults: Large Scene

Page 46: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

46

ConclusionsConclusions

Face cluster hierarchies are highly Face cluster hierarchies are highly effective for use with radiosityeffective for use with radiosity Sub-linear time in the number of input

polygons, as opposed to ‘previous best’ of O(klogk)

After a point, solver is constant time Low memory usage Extremely detailed scenes

Page 47: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

47

ContributionsContributions

FCR helps make radiosity practical for general use• Runs on a laptop!• One of the most complex radiosity scenes simulated

Three essential parts to making it work • Use of Face Clusters• Vector Radiosity• Tight visible area bounds for polygonal clusters

Sped up Garland’s cluster creation algorithm 80,000 lines of code available

• http://www.cs.cmu.edu/~ajw/thesis-code

Page 48: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

48

Future WorkFuture Work

Better visibility sampling in final pass Extend bounded projected area to

higher-order BRDFs (non-diffuse) Use of irradiance map to represent

illumination

Page 49: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

49

EXTRASEXTRAS

Page 50: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

50

Face Cluster CreationFace Cluster Creation

Modified & Extended Garland’s Modified & Extended Garland’s methodmethod Existing code needed lots of memory Showed how balance was important to

clustering time Created new, cheaper cost terms Improved stability and quality of

bounding boxes

Page 51: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

51

Test ModelsTest Models

Page 52: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

52

Clustering TimesClustering Times

150s150s

1s1s

Page 53: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

53

Integration for GIIntegration for GI

Page 54: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

54

State of the ArtState of the Art

ResearchResearch Hierarchical/wavelet radiosity systems

High-quality: Lightscape, LightworksHigh-quality: Lightscape, Lightworks Progressive radiosity, 1,000-100,000 polygon

scenes Raytracing post-pass to add specular

component, 2-3 hour renders is fine.

Virtual worldsVirtual worlds Progressive radiosity, 10,000 polygon scenes Quick previews, 10 minute final renders.

Page 55: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

55

Virtual MemoryVirtual Memory

Face cluster files are written in breadth-first order, so get good memory locality

Usually only small first section of the face cluster file used, so it’s memory mapped

Progressive Radiosity has good total memory use, but very poor locality. Hierarchical Radiosity thrashes better.

Page 56: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

56

DetailsDetails

Visibility by ray casting, nested grids Fractional visibility used during

simulation

Page 57: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

57

ComplexityComplexity

O(slogs), not O(klogk), where s is the number of face cluster hierarchies.

s << k Almost always, s << n Each face cluster hierarchy represents a

separate polygon mesh Corresponds to a connected part of a

model surface

Page 58: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

58

Vector Radiosity EquationsVector Radiosity Equations

Ein̂iTr̂i j r̂ji

Tn̂j

rij2

------------------------------------- vijAjbjj

=

Ei n̂ iT r̂r̂

T–r2------------ n̂jAjbjj

E mm TP–=

PE

Page 59: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

59

The Sky as a Light SourceThe Sky as a Light Source

Page 60: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

60

Colour BleedingColour Bleeding

Page 61: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

61

A Better SolutionA Better Solution

Combine simplification & radiosity algorithms

Use multiresolution hierarchies of the models directly

Adjust resolution on the fly to match that needed by the radiosity algorithm

Page 62: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

62

Hierarchical RadiosityHierarchical Radiosity

Unused refinements

Input polygons

Leaf elements

Used refinemen

ts

Page 63: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

63

JustificationJustification

Simplest representation that captures the appropriate behaviour

Minimises storage for each face cluster node

We combine vectors hierarchically to represent complex radiosity distributions

Page 64: Hierarchical Radiosity with Multiresolution Meshes Andrew J. WillmottCommittee Paul Heckbert David O’Hallaron Steven Seitz Francois Sillion (iMAGIS)

64

Multiresolution ModelsMultiresolution Models

Initially used edge-collapse models directly• These contain vertex hierarchies

Switched to using dual of vertex hierarchy algorithm: face cluster hierarchies• It’s easier to deal with face hierarchies