Visibility CS 446: Real-Time Rendering - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

Visibility CS 446: Real-Time Rendering

Description:

Happy Valentines Day! Bittersweets: Dejected sayings. I MISS MY EX. PEAKED AT 17. MAIL ORDER ... Cells and Portals: History. Teller (1993): view-independent ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 35
Provided by: csVir
Category:

less

Transcript and Presenter's Notes

Title: Visibility CS 446: Real-Time Rendering


1
Visibility CS 446 Real-Time Rendering Game
Technology
  • David Luebke
  • University of Virginia

2
Happy Valentines Day!
3
Bittersweets Dejected sayings
  • I MISS MY EX
  • PEAKED AT 17
  • MAIL ORDER
  • TABLE FOR 1
  • I CRY ON Q
  • U C MY BLOG?
  • REJECT PILE
  • PILLOW HUGGIN
  • ASYLUM BOUND
  • DIGNITY FREE
  • PROG FAN
  • STATIC CLING
  • WE HAD PLANS
  • XANADU 2NITE
  • SETTLE 4LESS
  • NOT AGAIN

4
Bittersweets Dysfunctional sayings
  • RUMORS TRUE
  • PRENUP OKAY?
  • HE CAN LISTEN
  • GAME ON TV
  • CALL A 900
  • P.S. I LUV ME
  • DO MY DISHES
  • UWATCH CMT
  • PAROLE IS UP!
  • BE MY YOKO
  • UMEGRIEF
  • I WANT HALF
  • RETURN 2 PIT
  • NOT MY MOMMY
  • BE MY PRISON
  • C THAT DOOR?

5
Demo Time Ken Arthur
6
Homework
  • The pitch, round 2
  • Many ideas way too hard
  • Art assets
  • (Much) character animation
  • Elaborate AI/gameplay
  • Some of my favorites so far
  • Gallery
  • Mariokart
  • Pirates (but just the ships)
  • Combat billiards
  • Orb (a la marble madness)
  • Waverace
  • Too hard
  • Total War
  • (Full-blown) RPG
  • Ninjas
  • UVA v. VaTech
  • Yes to
  • Terrain LOD, mocap data, NPR, Shadows
  • No to
  • Combat animations, AI, big worlds
  • Out-of-the-box ideas?

7
Project preview
  • Next 48 hours
  • Pitch a few more ideas on forum
  • Submit signup sheet by e-mail
  • List 3 project ideas youd be happy to work on
  • I assign groups on Thursday based roughly on
    interest overlap
  • Note I assign groups, not project ideas!
  • Assignment 3
  • Groups build a basic engine
  • Groups propose their final idea
  • Later may reorganize groups, allow 3rd-party
    engines

8
5 Steps to Efficient Rendering
  • Step 1 reduce vertices/triangle
  • Step 2 reduce overhead of each vertex
  • Step 3 recognize the existence of the vertex
    cache
  • Step 4 display lists (deprecated re
    performance)
  • Step 5 learn about the hardware
  • Meta-step 0 profile and analyze code

9
Other things you should know
  • Most interesting stuff in OpenGL isnt in red
    book
  • Extension registry
  • http//oss.sgi.com/projects/ogl-sample/registry/
  • Extensions you should know
  • ARB_multitexture
  • EXT_framebuffer_object
  • ARB_occlusion_query
  • ARB_point_sprite
  • ARB_texture_rectangle
  • ARB_draw_buffers
  • ARB_texture_float (_framebuffer_float,
    _half_float_pixel, etc)
  • ARB_depth_texture
  • ARB_vertex_buffer_object (_pixel_buffer_object)

10
Other things you should know
  • Most interesting stuff in OpenGL isnt in red
    book
  • Extension registry
  • http//oss.sgi.com/projects/ogl-sample/registry/
  • Developer sites
  • http//developer.nvidia.com
  • http//www.ati.com/developer
  • Find demos, tools, tutorials, presentations,
    white papers

11
Visibility Calculations
  • Motivation
  • Avoid rendering redundant geometry
  • Complements LOD, potentially even more powerful
  • Basic idea dont render what cant be seen
  • Off-screen view-frustum culling
  • Occluded by other objects occlusion culling

12
Motivation
  • The obvious question why bother?
  • Off-screen geometry solved by clipping
  • Occluded geometry solved by Z-buffer
  • The (obvious) answer efficiency
  • Clipping and Z-buffering take time linear to the
    number of primitives

13
The Goal
  • Our goal quickly eliminate large portions of the
    scene which will not be visible in the final
    image
  • Not the exact visibility solution, but a
    quick-and-dirty conservative estimate of which
    primitives may be visible
  • Z-buffer clip this for the exact solution
  • This conservative estimate is called the
    potentially visible set or PVS

14
View-Frustum Culling
  • An old idea (Clark 76)
  • Organize primitives into clumps
  • Before rendering the primitives in a clump, test
    a bounding volume against the view frustum
  • If the clump is entirely outside the view
    frustum, dont render any of the primitives
  • If the clump intersects the view frustum, add to
    PVS and render normally

15
Efficient View-Frustum Culling
  • How big should the clumps be?
  • Choose minimum size socost testing bounding
    volume ltlt cost clipping primitives
  • Choose minimum size so primitives can be rendered
    efficiently
  • At least 500 triangles/clump on todays hardware
  • Organize clumps into a hierarchy of bounding
    volumes for more efficient testing
  • If a clump is entirely outside or entirely inside
    view frustum, no need to test its children

16
Efficient View-Frustum Culling
  • What shape should bounding volumes be?
  • Spheres and axis-aligned bounding boxes simple
    to calculate, cheap to test
  • Oriented bounding boxes converge asymptotically
    faster in theory
  • Lots of other volumes have been proposed
  • Capsules, ellipsoids, k-DOPs
  • but most use spheres or AABBs.

17
Cells Portals
  • Goal walk through architectural models
    (buildings, cities, catacombs)
  • These divide naturally into cells
  • Rooms, alcoves, corridors
  • Transparent portals connect cells
  • Doorways, entrances, windows
  • Notice cells only see other cells through portals

18
Cells Portals
  • An example

19
Cells Portals
  • Idea
  • Cells form the basic unit of PVS
  • Create an adjacency graph of cells
  • Starting with cell containing eyepoint, traverse
    graph, rendering visible cells
  • A cell is only visible if it can be seen through
    a sequence of portals
  • So cell visibility reduces to testing portal
    sequences for a line of sight

20
Cells Portals
A
D
E
F
C
B
G
H
E
A
B
C
D
F
G
H
21
Cells Portals
A
D
E
F
C
B
G
H
E
A
B
C
D
F
G
H
22
Cells Portals
A
D
E
F
C
B
G
H
E
A
B
C
D
F
G
H
23
Cells Portals
A
D
E
F
C
B
G
H
E
A
B
C
D
F
G
H
24
Cells Portals
A
D
E
F
C
B
G
H
E
A
B
C
D
F
G
H
25
Cells Portals
A
D
E
?
F
C
B
G
H
E
A
B
C
D
F
G
?
H
26
Cells Portals
27
Cells Portals
  • View-independent solution find all cells a
    particular cell could possibly see
  • C can only see A, D, E, and H

A
D
E
H
28
Cells Portals
  • View-independent solution find all cells a
    particular cell could possibly see
  • H will never see F

A
D
E
C
B
G
29
Cells and Portals
  • Questions
  • How can we detect whether a given cell is visible
    from a given viewpoint?
  • How can we detect view-independent visibility
    between cells?
  • The key insight
  • These problems reduce to eye-portal and
    portal-portal visibility

30
Cells and Portals History
  • Airey (1990) view-independent only
  • Portal-portal visibility determined by
    ray-casting
  • Non-conservative portal-portal test resulted in
    occasional errors in PVS
  • Slow preprocess
  • Order-of-magnitude speedups

31
Cells and Portals History
  • Teller (1993) view-independent view-dependent
  • Portal-portal visibility calculated by line
    stabbing using linear program
  • Cell-cell visibility stored in stab trees
  • View-dependent eye-portal visibility stage
    further refines PVS at run time
  • Slow preprocess
  • Elegant, exact scheme

32
Cells and Portals History
  • Luebke Georges (1995) view-dependent only
  • Eye-portal visibility determined by intersecting
    portal cull boxes
  • No preprocess (integrate w/ modeling)
  • Quick, simple hack
  • Now-archaic public-domain library pfPortals

33
pfPortals Algorithm
  • Depth-first adjacency graph traversal
  • Render cell containing viewer
  • Treat portals as special polygons
  • If portal is visible, render adjacent cell
  • But clip to boundaries of portal!
  • Recursively check portals in that cell against
    new clip boundaries (and render)
  • Each visible portal sequence amounts to a series
    of nested portal boundaries
  • Kept implicitly on recursion stack

34
pfPortals Algorithm
  • Recursively rendering cells while clipping to
    portal boundaries is not new
  • Visible-surface algorithm (Jones 1971) general
    polygon-polygon clipping
  • Elegant, expensive, complicated
  • Conservative overestimate (pfPortals) use
    portals cull box
  • Cull box x-y screenspace bounding box
  • Cheap to compute, very cheap to intersect
Write a Comment
User Comments (0)
About PowerShow.com