IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline...

13
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms
  • date post

    15-Jan-2016
  • Category

    Documents

  • view

    240
  • download

    0

Transcript of IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline...

Page 1: IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.

IN4151 Introduction 3D graphics 1

Introduction to 3D computer graphics part 2

Viewing pipelineMulti-processor implementationGPU architectureGPU algorithms

Page 2: IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.

IN4151 Introduction 3D graphics 2

Viewing pipeline

model from

database

approximate curved surfaces by

polygons

viewing transformation

light intensity clippingperspective divide

window to viewport

transformation

edge processing

span interpolation

texture mapping

depth buffer test

area summing

r,g,b, z, a-buf

CPUgeometry processin

g

fragment/ pixel

processing500 Mflops 5000 Mips 100 Mpix/s

1 M polygons

/s

nsdamba HNIcLNIcIcI ).().(

...,,,,

3

2

1

vzyxvzyxv

1

.,,,z

y

x

TMwzyx vvvv vvs

vvs

vvs

wzzwyywxx

///

scan-conversion

Page 3: IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.

IN4151 Introduction 3D graphics 3

Load balancing and bottlenecks

FB MD/A

Pipeline is good for geometric processing (#vertices)

Viewing transformationsShadingClippingPerspective projectionViewport transformations

Access to frame buffer is now bottleneck

Span interpolationDepth testingTexture mappingAlpha blending

Farm is better for scanline and pixel processing

(#pixels)

H P P P P

P

P

P

PFIF

O

buffer

Page 4: IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.

IN4151 Introduction 3D graphics 4

Distributed frame buffers

• Distribution for R,G,B and Z

• Distribution by image subdivision

FB

D/A MP

PH

P

P

FB-R

FB-G

FB-B

FB-Z

H P P P P

D/A MPPP

PPP

PPP

PPP

P

P

P

P

H P P P P

Page 5: IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.

IN4151 Introduction 3D graphics 5

• Segmented– Coherence

– No load balancing

• Interlaced– Scan-line coherence– Better load balancing

• Interleaved– No coherence– Optimal balance

Frame buffer distributions

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

1 : 1,2,3,4,17,18, .. 2 : 5,6,7,8,21,22, .. 3 : 9,10,11,12,25, .. 4 : 13,14,15,16,29, .. 5 : 65,66, ... 6 : ..

1 : 1,2,3,4,5,6,... 17,18,19,.. .... .... 2 : 33,34,35,... ....

1 : 1,5,9,13, 65, ... 2 : 2,6,10,14, ... 3 : 3,7,11,15, ... 4 : 4,8,12,16, ... 5 : 17,21,25,29, ... 6 : 18,22,26, ... 7 : ...

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 6: IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.

IN4151 Introduction 3D graphics 6

Render architecture

interleaved frame buffer

Silicon Graphics IRIS 1988100.000 polygons/s

GA GE GE GE GE PP

x

y

z

r

g

b

a

SP

SP

SP

SP

SP

VP

VP

VP

VP

VP

IE IE IE IE

IE IE IE IE

IE IE IE IE

IE IE IE IE

IE IE IE IE

geometry subsystem

scan conversion subsystem

raster subsystem

display subsystem

polygon processor

image engines +VRAM

video processors

geometric engines

processors screen

geometric accelerator

edge processors

span processors

Access to texture memory is bottleneck

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

Page 7: IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.

IN4151 Introduction 3D graphics 7

• PC-graphics card• Game industry• 4-16 processors

parallel• SIMD machine• Larger texture

memory• Multiple passes• Programmable

GPU: vertex and fragment/pixel shaders

texture memory

frame buffer

vertex operationstransform, lighting

rasterizationcolor, texture interpolation

pixel operationsdepth compare,

alpha test, blending, filtering

polygon memory

Page 8: IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.

IN4151 Introduction 3D graphics 8

GPU processing / programming

• Bump mapping, shadow map, environment map

• BRDF shading, image based rendering• Image processing, filtering, segmentation

• Use texture memory as internal memory• Map functions to tables• Some limitations: source cannot be sink• Limited number of indirections• Getting data back from the graphics card is slow

Page 9: IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.

IN4151 Introduction 3D graphics 9

Bump mapping

Pertubate normal as a function of bump map

Page 10: IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.

IN4151 Introduction 3D graphics 10

Shadows

Alternative: shadow volumes

image

shadow map

light source

Page 11: IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.

IN4151 Introduction 3D graphics 11

Environment mapping

• Environment map represents incoming radiance for center point

• Can be stored in spherical map or cube

• Reflection is look-up in map• Approximation to ray

tracing!

Page 12: IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.

IN4151 Introduction 3D graphics 12

Diffuse environment shading

received radiance is function of accessability

specular reflection diffuse reflection

• Need integration over environment map

• For diffuse reflection scaled by cosinus

• Index in filtered versions of map

ambient occlusion

Page 13: IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.

IN4151 Introduction 3D graphics 13

Conclusions

• Viewing pipeline for polygon rendering is still alive but real-time ray tracing is approaching

• GPU programming is powerful tool: volume rendering, physically-based modeling, dynamics, etc.