Download - Fast Depth-of-Field Rendering with Surface Splatting

Transcript
Page 1: Fast Depth-of-Field Rendering with Surface Splatting

Fast Depth-of-Field Rendering with Surface

Splatting

Jaroslav Křivánek

CTU PragueIRISA – INRIA Rennes

Jiří Žára

CTU Prague

Kadi Bouatouch

IRISA – INRIA Rennes

ComputerGraphics Group

Page 2: Fast Depth-of-Field Rendering with Surface Splatting

2/25

Goal

• Depth-of-field rendering with point-based objects

• Why point-based ?– Efficient for complex objects

• Why depth-of-field ?– Nice and naturally looking images

Page 3: Fast Depth-of-Field Rendering with Surface Splatting

3/25

Overview

• Introduction – Point-based rendering– Depth-of-field

• Depth-of-field techniques• Our contribution: Point-based depth-of-field

rendering– Basic approach– Extended method: depth-of-field with level of detail

• Results• Discussion• Conclusions

Page 4: Fast Depth-of-Field Rendering with Surface Splatting

4/25

Point-based rendering

• Object represented by points without connectivity

• Point (surfel) – position, normal,

radius, material

• Rendering = screen space surface reconstruction

• Efficient for very complex objects

x

yz

Page 5: Fast Depth-of-Field Rendering with Surface Splatting

5/25

Depth-of-Field

• More naturally looking images• Important depth cue for perception of scene

configuration• Draws attention to the focused objects

Page 6: Fast Depth-of-Field Rendering with Surface Splatting

6/25

Thin Lens Camera Model

image plane focal planelens

VP P

F/n

DVD

C

Circle of Confusion (CoC)

C = f ( F, F/n, D, P )

F…... focal distanceF/n… lens diameterP……focal plane distanceD……point depth

Page 7: Fast Depth-of-Field Rendering with Surface Splatting

7/25

Depth-of-Field Techniques in CG

• Supersampling– Distributed ray tracing [Cook et al. 1984]– Sample the light paths through the lens

• Multisampling [Haeberli & Akeley 1990]– Several images from different viewpoints on the

lens– Average the resulting images using accumulation

buffer

Page 8: Fast Depth-of-Field Rendering with Surface Splatting

8/25

Depth of Field Techniques in CG

• Post-filtering [Potmesil & Chakravarty 1981]– Out-of-focus pixels displayed as CoC– Intensity leakage, hypo-intensity– Slow for larger kernels

Focus processor(filtering)

Image + depth Image with DOF

Image synthesizer

Page 9: Fast Depth-of-Field Rendering with Surface Splatting

9/25

Point-based rendering - splatting• Draw each point as a fuzzy splat (an ellipse)

Image = SPLATi

o b jec t sp ace

x

yz

sc reen sp ace

x

y

splat

Page 10: Fast Depth-of-Field Rendering with Surface Splatting

10/25

Our Basic Approach

• Post-filtering

Focus processor(filtering)Image + depth

Image with DOF

Image =i SPLATi

i SPLATi + depth

• Our Approach: Swap and Focus filteringFocus filtering

Image with DOF

SPLATi

Focus filteringSPLATj

Focus filteringSPLATk

Page 11: Fast Depth-of-Field Rendering with Surface Splatting

11/25

Our Basic Approach

o b jec t sp ace

x

yz

sc reen sp ace

x

y

Splat = reconstr. kernel

DOF filter GQDOF

Blurred reconstr.

kernel

DOFGQDOF

Page 12: Fast Depth-of-Field Rendering with Surface Splatting

12/25

Properties of our basic approachPROS…+Avoids leakage

– Reconstruction takes into account the splat depth

+No hypo-intensities– Visibility resolved after blurring

+Handles transparency– In the same way as the EWA splatting – A-buffer

CONS- Very slow, especially for large apertures

– A lot of large overlapping splats– High number of fragments:

• E.g. Lion, no blur: 2.3 mil.; blur 90.2 mil. (40x more)

Page 13: Fast Depth-of-Field Rendering with Surface Splatting

13/25

Our Extended Method

• Use Level of Detail (LOD) to attack complexity

• blur = detail• Select lower LOD for blurred parts

• # of fragments increases more slowly• E.g. Lion, no blur: 2.3 mil.; blur 5.3 mil. (2.3x

more)

Blurred img. Selected LOD

Page 14: Fast Depth-of-Field Rendering with Surface Splatting

14/25

Fine LOD Lower LOD

Observation

• Selecting lower LOD for rendering equivalent to 1) selecting the fine LOD 2) low-pass filtering is screen space

• Use LOD as a means for blurring – not only to reduce complexity

Page 15: Fast Depth-of-Field Rendering with Surface Splatting

15/25

Effect of LOD Selection

• How to quantify the effect of LOD selection in

terms of blur in the resulting image ?

• We use Bounding sphere hierarchy – Qsplat [Rusinkiewicz & Levoy, 2000]

Page 16: Fast Depth-of-Field Rendering with Surface Splatting

16/25

Bounding Sphere Hierarchy

The finest level: L=0 Lower level: L=1

subsample

• Building the hierarchy levels low-pass filtering + subsampling

Center the filter GQL

Page 17: Fast Depth-of-Field Rendering with Surface Splatting

17/25

LOD Filter in Screen Space

• GQL defined in local coordinates in object space

• GQL related to screen space by the local affine approximation J of the object-to-screen transform

• Selecting level L = filtering in screen space by GJQLJT

Screen space

GQLGJQLJT

Object space

Page 18: Fast Depth-of-Field Rendering with Surface Splatting

18/25

DOF with LOD - Algorithm

• Given the required screen space filter GQDOF 1. Select LOD L such that

support( GJQLJT ) < support ( GQDOF )

2. Apply an additional screen space filter GQDIFF to get GQDOF o b jec t sp ace

x

yz

x

y

DOFGQDOFDOFGJQLJTGQDIFF

GJQLJT

Page 19: Fast Depth-of-Field Rendering with Surface Splatting

19/25

Results

No Depth-of-Field – everything in focus

Page 20: Fast Depth-of-Field Rendering with Surface Splatting

20/25

Results

Transparent mask in focus, male figure out of focus

Page 21: Fast Depth-of-Field Rendering with Surface Splatting

21/25

Results

Male figure in focus, transparent mask out of focus

Page 22: Fast Depth-of-Field Rendering with Surface Splatting

22/25

Results

Our algorithm Reference solution

(multisampling)

• Our blur looks too smooth because of the Gaussian filter

Page 23: Fast Depth-of-Field Rendering with Surface Splatting

23/25

Results

Our algorithm Reference solution

(multisampling)

• Artifacts due to incorrect surface reconstruction

Page 24: Fast Depth-of-Field Rendering with Surface Splatting

24/25

Discussion

• Simplifying assumptions & limitations– Gaussian distribution of light within the CoC

• Mostly ok– We are blurring the texture before lighting

• We should blur after lighting– Possible incorrect image reconstruction from

blurred splats

Page 25: Fast Depth-of-Field Rendering with Surface Splatting

25/25

Conclusion

• A novel algorithm for depth of field rendering• LOD as a means for depth-blurring+ Transparency+ Avoids intensity leakage+ Running time independent of the DOF- Only for point based rendering- A number of artifacts can appear• Ideal tool for interactive DOF previewing

– Trial and error camera parameters setting

Acknowledgement: Grant 2159/2002 MSMT Czech Republic