parallel rendering - university of new mexicoangel/cs534.s04/lectures/angelcg... · 2018. 5....

32
Parallel Rendering Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University of New Mexico

Upload: others

Post on 01-May-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

Parallel Rendering

Ed AngelProfessor of Computer Science,

Electrical and Computer Engineering, and Media Arts

Director, Arts Technology CenterUniversity of New Mexico

Page 2: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

2Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Introduction

• In many situations, a standard rendering pipeline might not be sufficient

- Need higher resolution display- More primitives than one pipeline can handle

•Want to use commodity components to build a system that can render in parallel

•Use standard network to connect

Page 3: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

3Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Power Walls

• Where do we display large data sets?- CRTs have low resolution (1 Mpixel)- LCD panels improving but still expensive- Need resolution comparable to data set to see detail

• CT/MRI/MEG• Ocean data

• Solution?- Multiple projectors

• Commodity • High-end• See IEECE CG & A (July)

Page 4: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

4Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Tiled Display

Page 5: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

5Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

CS Power Wall

•6 dual processor Intellestations•G Force 3 Graphics cards•6 commodity projectors (1024 x 768)•Gigabit ethernet•Back projected screen•Shared facility with scalable system group

- Investigate OS and network issues

Page 6: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

6Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

CS Power Wall

Page 7: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

7Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

CS Power Wall

Page 8: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

8Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Power Wall

• Inexpensive solution but there are some problems

- Color matching- Vignetting- Alignment

• Overlap areas

- Synching- Dark field

Page 9: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

9Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Graphics Architectures

•Pipeline Architecture- SGI Geometry Engine- Geometry passes through pipeline- Hardware for

• clipping • transformations• texture mapping

Project/SortClipTransform Rasterize Screen

Page 10: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

10Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Building Blocks

•Graphics processors consist of geometric blocks and rasterizers

•Geometric units: transformations, clipping, lighting

•Rasterization: scan conversion, shading•Parallelize by using mutiple blocks•Where to do depth check?

R

G G G

R R

Page 11: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

11Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Sorting Paradigm

•We can categorize different ways of interconnecting blocks using a sorting paradigm: each projector is responsible for one area of the screen. Hence, we must sort the primitives and assign them to the proper projector

•Algorithms can be categorized by where this sorting occurs

Page 12: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

12Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Three Rendering Methods

Sort-First Rendering Sort-Middle Rendering Sort-Last Rendering

R

G G G

R R

Sort G G G

R R R

Sort R

G G G

R R

Composite

Page 13: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

13Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Sort First

•Each rasterization unit assigned to an area of the screen

•Each geometric unit coupled to its own rasterizer

•Must sort primitives first•Can use commodity cards

R

G G G

R R

Sort

Page 14: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

14Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Sort-First Rendering for a Random Triangles Application

Page 15: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

15Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Sort Middle

• Geometric units and rasterization units decoupled

• Each geometric unit can be assigned any group of objects

• Each rasterizer is assigned to an area of the screen

• Must sort between stagesG G G

R R R

Sort

Page 16: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

16Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Sort Last

•Couple rasterizers and geometric units•Assign objects to geometric units to load balance or via application

•Composite results at end

R

G G G

R R

Composite

Page 17: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

17Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Tree Compositing

•Composite in pairs•Send color and depth buffers•Each time half processors become idle

P1 P3

P3

display

application

P3P0 P1 P2

Page 18: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

18Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Binary Swap Compositing

•Each processor responsible for one part of display

•Pass data to right n times

display

PNP0 P1 P2 ........

Page 19: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

19Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Sort-Last Rendering for a Random Triangles Application

Page 20: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

20Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Comparison

•Sort first- Appealing but hard to implement

•Sort middle- Used in hardware pipelines- More difficult to implement with add-on

commodity cards

•Sort last- Easy to implement with a compositing stage- High network traffic

Page 21: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

21Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Mapping to Clusters

•Different architectures- Shared vs distributed memory- Communication overhead- Parallel vs distributed algorithms

•Easy to do sort last•Must evaluate communication cost•Standard visualization strategies are incorrect if transparency used

Page 22: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

22Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Vista Azul

•Experimental architecture from IBM donated to AHPCC

•Half Intel nodes, half AIX nodes•Only one (PCI) graphics card per four processors

•Contained a Scalable Graphics Engine (SGE): high speed-high resolution color buffer that is accessible by all processors

Page 23: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

23Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Vista Azul

Page 24: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

24Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Comparison Between Sort-First and Sort-Last

Sort Last Rendering vs. Sort First Rendering

05

101520253035

0 2 4 6 8 10 12

Number of Processors

CPU

Tim

e (s

econ

ds)

Sort Last RenderingSort First Rendering

Page 25: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

25Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Performance on a PC Cluster

•Following experiments were done by Ye Cong on the CS cluster

- 6 Intellestations- Gigabit Ethernet- GForce 3 graphics

•Show the effect of network

Page 26: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

26Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Sort-First vs Sort LastRandom Triangles

Page 27: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

27Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Sort First vs Sort LastTeapot

Page 28: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

28Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Azul vs Intellistations

Page 29: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

29Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Software for Parallel Rendering

•Write your own sort-first sort-last•WireGL/Chromium (Stanford)•Embed inside package (VTK)

Page 30: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

30Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

WireGL: A Distributed Graphics System

• A software-based parallel rendering system that unifies the rendering power of a collection of cluster nodes

• Scalability is achieved by integrating parallel applications into its sort-first parallel renders

• Each node in the cluster can be either a rendering client or a rendering server

• Clients submit OpenGL commands concurrently to servers, which render the final physical image

Page 31: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

31Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Chromium

•Successor toWireGL•Allows both sort first and sort last rendering

• Implemented on CS cluster•Most of gain in performance is bacauseChromium and WireGL can group state-changing commands separately from rendering commands

Page 32: Parallel Rendering - University of New Mexicoangel/CS534.s04/LECTURES/AngelCG... · 2018. 5. 29. · Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and

32Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002

Chromium vs Sort First

MRI rotation