1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of...

24
1 GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

Transcript of 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of...

Page 1: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

1GR2-00

GR2Advanced Computer

GraphicsAGR

GR2Advanced Computer

GraphicsAGR

Lecture 18Image-based Rendering

Final Review of RenderingWhat We Did Not Cover

Learning More...

Page 2: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

2GR2-00

Model-based RenderingModel-based Rendering

Conventional approach is:– create 3D model of a virtual world– project each object to 2D and

render into frame buffer Scene complexity is a major

factor– real-time walkthroughs of complex

scenes needs powerful processing– affects major application areas such

as computer games and VR

Page 3: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

3GR2-00

Image-based RenderingImage-based Rendering

Goal:– make rendering time independent

of scene complexity Approach:

– make use of pre-calculated imagery– many variations - we look just at

two Question:

– where have we met pre-calculated imagery before?

Page 4: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

4GR2-00

Image Caching - ImpostorsImage Caching - Impostors

Basic idea:– cache image of an object rendered in one frame

for re-use in subsequent frames Technique

– project bounding box of object onto image plane to get rectangular extent for that view

– capture image and put in texture memory– for next view, render an ‘impostor’ which is a

quadrilateral in plane parallel to initial view plane, and texture map with the original image

– texture mapping uses current view so image is warped appropriately

Page 5: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

5GR2-00

Image CachingImage Caching

Validity of impostors:– once view direction changes

substantially, the impostor is no longer valid

– object then re-rendered Hierarchical image caching:

– use BSP trees to cluster objects in a hierarchy

– distant objects can be clustered and a single image used to render the cluster

Page 6: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

6GR2-00

Environment Mapping - Revision

Environment Mapping - Revision

Pre-computation:– from object at centre of scene we

rendered 6 views and stored resulting images as walls of a surrounding box

– caches light arriving at object from different directions

Rendering time– specular reflection calculation then

bounced a viewing ray onto point on interior of box and used its colour as the specular colour of the object

Page 7: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

7GR2-00

Light FieldsLight Fields

Concept:– for every point, cache the light or

radiance emanating from that point in each direction

– rendering involves looking up (very large) table

– five dimensions: (x,y,z) to give position and ( to give direction

– in ‘free’ space, radiance constant along a line, so we have a 4D light field - we pre-compute the radiance along all lines in the space

Page 8: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

8GR2-00

Indexing the LinesIndexing the Lines

Use two parallel planes - think of these as between viewer and scene

u

v

s

tL(u,v,s,t)

For each pointon (u,v) grid, we havea line to every point on (s,t) grid- ie 4D set of lines - knownas light slab

viewer

scene

Page 9: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

9GR2-00

Constructing a Light FieldConstructing a Light Field

Place camera on (u,v) plane– for each point on grid ( ui, vj ),

render scene and store image as:

Imageij (sk, tl )– giving a 2D array of images!

Do this from all six surrounding directions of the scene - ie six light slabs

Page 10: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

10GR2-00

RenderingRendering

The rendering operation is now a linear look up operation on our 2D array of images

For example, any ray in a ray tracing approach will correspond to a particular 4D point (u,v,s,t) - we look up its value in the light field (using interpolation if it is not exactly on a grid point

Page 11: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

11GR2-00

CompressionCompression

Technique is only feasible because there is coherence between successive images

Hence the 2D array of images can be compressed by factors of over 100

Page 12: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

12GR2-00

Model-based versus Image-based Rendering

Model-based versus Image-based Rendering

virtual world

model

real-time interactive flythrough

real world

images

modelconstruction

real-timerendering

imageacquisition

image-basedrendering

off-linerendering

imageanalysis

Page 13: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

13GR2-00

Revision of Model-based Rendering

Page 14: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

14GR2-00

Rendering Review - Local Illumination

Rendering Review - Local Illumination

Z-buffer and Gouraud shading

MODELLINGTRANSFORM’N

CULLING LIGHTING VIEWINGTRANSFORM’N

CLIPPING PROJECTION RENDERING DISPLAY

Z-bufferscan conversioninterpolated shading

Page 15: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

15GR2-00

Rendering Review - Local Illumination

Rendering Review - Local Illumination

Z-buffer and Phong shading

MODELLINGTRANSFORM’N

CULLING VIEWINGTRANSFORM’N

CLIPPING PROJECTION RENDERING DISPLAY

Z-bufferscan conversionlightinginterpolated shading

Page 16: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

16GR2-00

Rendering Review - Global Illumination

Rendering Review - Global Illumination

Ray Tracing

MODELLINGTRANSFORM’N

RAYTRACING

DISPLAY

Page 17: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

17GR2-00

Rendering Review - Global Illumination

Rendering Review - Global Illumination

Radiosity and Gouraud Shading

MODELLINGTRANSFORM’N

VERTEX INTENSITYCALCULATIONS

CULLING VIEWINGTRANSF’N

CLIPPING

PROJECT’N RENDERING DISPLAY

Stage 1

Stage 2

Z-bufferscan conversioninterpolated shading

Page 18: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

18GR2-00

Parametric Surface Representation

Parametric Surface Representation

Rather than require the user to represent curved surfaces as an ‘IndexedFaceSet’ of flat polygons, some modelling systems allow representation as Bezier or spline surfaces

Hearn & Baker Chap 10

Page 19: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

19GR2-00

Constructive Solid Geometry

Constructive Solid Geometry

Rather than model objects as surfaces, some systems work in terms of solid objects - field known as Constructive Solid Geometry (CSG)

Hearn & Baker, Chap 10

Primitive objects (sphere, cylinder, torus, ..) combined by operators (union, intersection, difference)

Result is always a solid

Rendering via ray tracing typically

Page 20: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

20GR2-00

Volume GraphicsVolume Graphics

A very new approach is to model using volumes - with varying transparency

OpenGL Volumizer adds this capability to OpenGL

See:www.sgi.com/software/volumizer

Mitsubishi Volume Pro 500 board– www.rtviz.com

Page 21: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

21GR2-00

Procedural ModellingProcedural Modelling

Objects can be defined procedurally - ie by mathematical functions

See Hearn & Baker, Chap 10

Fractals are well-known example

See The Fractory:library.advanced.org/

3288/

Page 22: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

22GR2-00

Other Important TopicsOther Important Topics

Colour Anti-aliasing Animation … and much more!

Page 23: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

23GR2-00

Learning MoreLearning More

Journals:– IEEE Computer Graphics and its

Applications– Computer Graphics Forum– Computers and Graphics

Conferences:– ACM SIGGRAPH (Proceedings as ACM

Computer Graphics)– Eurographics– Eurographics UK

Page 24: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 18 Image-based Rendering Final Review of Rendering What We Did Not Cover Learning More...

24GR2-00

The EndThe End