Download - Graphics Topics in VR
![Page 1: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/1.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Graphics Topics in VRGraphics Topics in VR
By Shaun Nirenstein
![Page 2: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/2.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
OverviewOverview
• Impact of graphics/geometric algorithms on VR
• Visibility in VR
• Rendering Topics in VR
• Collision Detection• Animation (I won’t talk about this)
![Page 3: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/3.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Impact of graphics/geometric algorithms on VR
Impact of graphics/geometric algorithms on VR
• Constrains the VR• Visibility
• Scene complexity• Performance
• Shadows• Cues• Soft shadows offer more information about the light
source• Shadows are difficult(slow), soft shadows are more
difficult(slow)
![Page 4: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/4.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Impact of graphics/geometric algorithms on VR
Impact of graphics/geometric algorithms on VR
• Constrains the VR (cont.)• Illumination models
• Defines the set of surface materials available• Global vs. local illumination• What can be done at real-time?
– Global specular?– Global diffuse?– Arbitrary BRDF (Bidirectional Reflectance Distribution
Function)?
• Collision detection• How accurate?• How fast?
• (Agent/Avatar) Animation• Scripted, captured, simulated
![Page 5: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/5.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
VisibilityVisibility• Obvious application is to manage geometric
complexity• Don’t render what you cannot see
• Less obvious application is to manage global complexity• Don’t “simulate” invisible objects• Can X see Y (e.g. AI)• Don’t illuminate invisible objects• Predictive cache management!!!
• Could Y be visible from X soon– Invisible geometry, textures, bump maps, vertex/pixel
programs do not have to be resident
![Page 6: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/6.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Visibility AlgorithmsVisibility Algorithms
• From-point techniques:• What is visible from view point X
• From-region techniques:• What is visible from view region R• I.e. Y is visible from R, if there exists a
point P in R, which can see Y• Can bind a visible set to time
![Page 7: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/7.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
From Point VisibilityFrom Point Visibility
• Occluder shadow volumesInvisible
Occluder
![Page 8: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/8.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Occluder Fusion (from point)Occluder Fusion (from point)
• Occluder shadow volumesInvisible
Occluder
Invisible
Invisible???
![Page 9: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/9.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Occluder Fusion (from point)Occluder Fusion (from point)
• Cells and portals
![Page 10: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/10.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Occluder Fusion (from point)Occluder Fusion (from point)
• Cells and portals
![Page 11: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/11.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Occluder Fusion (from point)Occluder Fusion (from point)
• Cells and portals
![Page 12: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/12.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
ProblemsProblems• Cells and portals
• Only work (well) for “architectural scenes”
• Occluder Shadows• Fusion is difficult• Only works well for a small number of occluders
• Other techniques offer various improvements and trade-offs• Hierarchical Occlusion Maps• Occlusion bit testing• Hierarchical Z-Buffer• Many more…
![Page 13: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/13.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
From Region VisibilityFrom Region Visibility
• Occluder shadow volumesInvisible
Occluder
![Page 14: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/14.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
From Region VisibilityFrom Region Visibility
• Area light source analogy
Separating lines
Supporting lines
Umbra
Penumbra
Penumbra
![Page 15: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/15.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
From Region VisibilityFrom Region Visibility
• Area light source analogy
Umbra?
![Page 16: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/16.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Occluder Fusion (from region)Occluder Fusion (from region)
• Cells and portals
![Page 17: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/17.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Occluder Fusion (from region)Occluder Fusion (from region)
• Cells and portals
![Page 18: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/18.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Occluder Fusion (from region)Occluder Fusion (from region)
• Cells and portals (visible volume)
![Page 19: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/19.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Occluder Fusion (from region)Occluder Fusion (from region)
• Cells and portals (visible volume)
![Page 20: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/20.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Occluder Fusion (from region)Occluder Fusion (from region)
• Cells and portals (visible cell iff. stabbing line does exist)
![Page 21: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/21.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Finding a stabber (2D)Finding a stabber (2D)• Find a line which separates two set of points
![Page 22: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/22.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Finding a stabber (2D)Finding a stabber (2D)• Find a line which separates two set of points• Left and right sets (defined by orientation)
![Page 23: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/23.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Finding a stabber (2D)Finding a stabber (2D)• Find a line which separates two set of points• Left and right sets (defined by orientation)
![Page 24: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/24.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Finding a stabber (2D)Finding a stabber (2D)• Find a line which separates two set of points• Left and right sets (defined by orientation)• Solved using duality
![Page 25: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/25.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Finding a stabber (3D)Finding a stabber (3D)• Also solved with duality• Lines in 3D go to points in 5D Pluecker coordinates
![Page 26: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/26.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Constructing Cells/PortalsConstructing Cells/Portals• BSP Tree – Splits volume until leaves are convex• Portals are sides of leaf nodes which do not correspond to scene polygons
![Page 27: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/27.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Constructing Cells/PortalsConstructing Cells/Portals• Optimal portal finding is an open problem• Portals / Cells (sectors) are usually defined by hand
![Page 28: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/28.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Soft and Hard ShadowsSoft and Hard Shadows• Hard Shadows – small (points) or far• Soft Shadows – area/volume light source
Hard Soft
![Page 29: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/29.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Soft and Hard ShadowsSoft and Hard Shadows• Soft shadows != Blurring!!!
Light
Occluder
Ground
![Page 30: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/30.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Soft and Hard ShadowsSoft and Hard Shadows• Algorithms
• Point sources are easy!• Clip shadow volume against scene• Ray tracing• Shadow map• Shadow volume
• Soft shadows are difficult!• Soft shadow volumes• Point sampling of area light source• Ray tracing
• Hard and soft shadows may be pre-computed by sampling surface geometry and applying lightmaps
![Page 31: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/31.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
LightmapsLightmaps• Can be used for shadows, lighting, diffuse illumination• Need to be recomputed when geometry and/or lights move
* =
![Page 32: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/32.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Global vs. Local IlluminationGlobal vs. Local Illumination• Global looks better – local is faster• Trade offs between complexity, performance, ability to move
geometry, quality, etc.• What do games do?
• Radiosity preprocess into light maps• Light grid for dynamic objects• Bump mapping is applied in addition• Many passes: textures, bumps, lightmaps, shadow passes, etc.
• Doom III?• No global illumination• Not necessary for the “feel” of the game• Allows for dynamic hard shadows (cast BY everything ONTO
everything)• Photo-realism does not add as much to mood as shadows in this
context
![Page 33: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/33.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Photon MappingPhoton Mapping
![Page 34: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/34.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Photon MappingPhoton Mapping
![Page 35: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/35.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Photon MappingPhoton Mapping
![Page 36: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/36.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Collision DetectionCollision Detection
• Why?• Need to know if movement results in solid
bodies colliding• Physics• Visibility
![Page 37: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/37.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Collision DetectionCollision Detection
• Broad Phase• Conservative – only
test whether or not further testing(narrow phase) is required
• Uses bounding volumes and bounding hierarchies
![Page 38: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/38.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Collision DetectionCollision Detection
• Narrow Phase• Accurate• Triangle-triangle intersection• Segment-triangle intersection• Bounding-volume triangle
intersection
![Page 39: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/39.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Collision Detection(cont.)Collision Detection(cont.)
• What makes a good bounding box?• Easy to test for collision• Tightly represents the model – minimal
extraneous volume• More information implies better potential• What about moving objects?
• On the fly creation?• Conservative updates• Tracking nearest geometry
![Page 40: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/40.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Collision Detection(cont.)Collision Detection(cont.)
• AABB (Axially aligned bounding boxes)• Two points in 3D (6 scalars)
• BS (Bounding Sphere ) • Point and radius (4 scalars)
• Not always a good fit – may require OBB (Oriented bounding box)• Three points in 3D (9 scalars )• Principal component analysis
![Page 41: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/41.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Collision Detection(cont.)Collision Detection(cont.)
• Convex Hull• Accurate
• Conservative• bounding planes• faster, but less accurate
![Page 42: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/42.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Collision Detection(cont.)Collision Detection(cont.)
• k-dops (discrete oriented polytopes)• Accurate – more planes• AABB == 6-dop
![Page 43: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/43.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Collision Detection(cont.)Collision Detection(cont.)
• 8-dop
45o
![Page 44: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/44.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Collision Detection(cont.)Collision Detection(cont.)
• Hierarchies – AABB
• Test top down
![Page 45: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/45.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Collision Detection(cont.)Collision Detection(cont.)
• Hierarchies – OBBTree
• Test top down
![Page 46: Graphics Topics in VR](https://reader031.vdocument.in/reader031/viewer/2022012919/56814573550346895db2439e/html5/thumbnails/46.jpg)
Collaborative Visual Computing LabDepartment of Computer Science
University of Cape Town
Collision Detection(cont.)Collision Detection(cont.)• Polytope-polytope intersection (narrow
phase)• Assuming non-containment:
Intersection is equivalent to the existence of an edge of one polytope which intersects the face of another
Containment