1 KIPA Game Engine Seminars Jonathan Blow Seoul, Korea November 30, 2002 Day 5.

Slides:



Advertisements
Similar presentations
Optimized Stencil Shadow Volumes
Advertisements

Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
10/10/02 (c) 2002 University of Wisconsin, CS 559 Last Time Finished viewing: Now you know how to: –Define a region of space that you wish to view – the.
Visibility in Games Harald Riegler. 2 / 18 Visibility in Games n What do we need it for? u Increase of rendering speed by removing unseen scene data from.
David Luebke5/11/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Two Methods for Fast Ray-Cast Ambient Occlusion Samuli Laine and Tero Karras NVIDIA Research.
CAP4730: Computational Structures in Computer Graphics Visible Surface Determination.
Part I: Basics of Computer Graphics
CSE 381 – Advanced Game Programming Scene Management
Visibility Culling. Back face culling View-frustrum culling Detail culling Occlusion culling.
Visibility Culling using Hierarchical Occlusion Maps Hansong Zhang, Dinesh Manocha, Tom Hudson, Kenneth E. Hoff III Presented by: Chris Wassenius.
Object-Space Visibility Culling Anthony Steed University College London Based upon material presented by Claudio T. Silva at Eurographics 1999 Slides,
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
1 Advanced Scene Management System. 2 A tree-based or graph-based representation is good for 3D data management A tree-based or graph-based representation.
Underlying Technologies Part Two: Software Mark Green School of Creative Media.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
Hidden Surface Removal
1 Occlusion Culling ©Yiorgos Chrysanthou, , Anthony Steed, 2004.
Chapter 5.2 Character Animation. CS Overview Fundamental Concepts Animation Storage Playing Animations Blending Animations Motion Extraction Mesh.
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
Erdem Alpay Ala Nawaiseh. Why Shadows? Real world has shadows More control of the game’s feel  dramatic effects  spooky effects Without shadows the.
Shadow Algorithms Ikrima Elhassan.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 4, 2002 Day 8.
Ray Tracing and Photon Mapping on GPUs Tim PurcellStanford / NVIDIA.
1 KIPA Game Engine Seminars Jonathan Blow Seoul, Korea November 29, 2002 Day 4.
© Copyright Khronos Group, Page 1 Harnessing the Horsepower of OpenGL ES Hardware Acceleration Rob Simpson, Bitboys Oy.
Polygon Scan Conversion and Z-Buffering
Collision and Animation Systems in Games Jani Kajala Lead Programmer / Chief Technology Officer, Pixelgene Ltd (0)
CSE 381 – Advanced Game Programming Basic 3D Graphics
NVIDIA PROPRIETARY AND CONFIDENTIAL Occlusion (HP and NV Extensions) Ashu Rege.
The Visibility Problem In many environments, most of the primitives (triangles) are not visible most of the time –Architectural walkthroughs, Urban environments.
TERRAIN SET09115 Intro to Graphics Programming. Breakdown  Basics  What do we mean by terrain?  How terrain rendering works  Generating terrain 
Computer Graphics 2 Lecture 8: Visibility Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
So far we have covered … Basic visualization algorithms Parallel polygon rendering Occlusion culling They all indirectly or directly help understanding.
Real-Time Rendering SPEEDING UP RENDERING Lecture 04 Marina Gavrilova.
IT253: Computer Organization
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
Collaborative Visual Computing Lab Department of Computer Science University of Cape Town Graphics Topics in VR By Shaun Nirenstein.
2 COEN Computer Graphics I Evening’s Goals n Discuss application bottleneck determination n Discuss various optimizations for making programs execute.
Real-time Graphics for VR Chapter 23. What is it about? In this part of the course we will look at how to render images given the constrains of VR: –we.
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 6, 2002 Day 10.
Interactive Rendering With Coherent Ray Tracing Eurogaphics 2001 Wald, Slusallek, Benthin, Wagner Comp 238, UNC-CH, September 10, 2001 Joshua Stough.
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 2, 2002 Day 6.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
10/07/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Spatial data structures.
CSCE 552 Spring D Models By Jijun Tang. Triangles Fundamental primitive of pipelines  Everything else constructed from them  (except lines and.
Emerging Technologies for Games Deferred Rendering CO3303 Week 22.
Maths & Technologies for Games Graphics Optimisation - Batching CO3303 Week 5.
Fast SLAM Simultaneous Localization And Mapping using Particle Filter A geometric approach (as opposed to discretization approach)‏ Subhrajit Bhattacharya.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
Hierarchical Occlusion Map Zhang et al SIGGRAPH 98.
Graphics, Modeling, and Textures Computer Game Design and Development.
Unreal Lighting Clark Kromenaker. Unreal Lightmass UE3’s new lighting system is called Lightmass. Simulates bouncing light in an environment.
Memory Design Principles Principle of locality dominates design Smaller = faster Hierarchy goal: total memory system almost as cheap as the cheapest component,
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
CHC ++: Coherent Hierarchical Culling Revisited Oliver Mattausch, Jiří Bittner, Michael Wimmer Institute of Computer Graphics and Algorithms Vienna University.
Visible-Surface Detection Methods. To identify those parts of a scene that are visible from a chosen viewing position. Surfaces which are obscured by.
SHADOW CASTER CULLING FOR EFFICIENT SHADOW MAPPING JIŘÍ BITTNER 1 OLIVER MATTAUSCH 2 ARI SILVENNOINEN 3 MICHAEL WIMMER 2 1 CZECH TECHNICAL UNIVERSITY IN.
Scene Manager Creates and places movable objects like lights and cameras so as to access them efficiently, e.g. for rendering. Loads and assembles world.
So far we have covered … Basic visualization algorithms
Jim X. Chen George Mason University
CSCE 441: Computer Graphics Hidden Surface Removal
Graphics, Modeling, and Textures
UMBC Graphics for Games
Frame Buffer Applications
Presentation transcript:

1 KIPA Game Engine Seminars Jonathan Blow Seoul, Korea November 30, 2002 Day 5

2 Stencil Shadow Visibility Culling (clarification from yesterday…) There are two rendering passes, “shadow” and “normal”, and visibility detection is separate for each, but there are dependencies

3 GameCube rendering source code example (Wanted to show one yesterday but didn’t have it available)

4 Explanation of double-sort algorithm for networking Use a global sorted list for the server, along with one list for each client (on whiteboard: show how to use combined information to speed up object search) These lists only change incrementally, so keeping them sorted should be cheap

5 Further Work on Filtered Variance for Networking (quick summary of yesterday’s subjects) Presentation of solution that I said I hadn’t figured out yet, yesterday –Easy to rotate variance matrix into the frame of the viewpoint –No loner need approximation for z

6 Raycasting against The World First navigate a BSP tree or something. Then you need to collide against meshes in the world, probably. Mesh representation can make for some interesting issues…

7 Triangle Strip Meshes Want to iterate over the whole mesh, ignoring degenerate faces Since you want to do this frequently, it’s good to abstract that into an iterator class (looking at code)

8 PC vs. UMA Console On a PC, vertex buffers may be stored in video RAM (if application is high- performance) On a UMA console (e.g. Xbox), vertex buffers exist in common memory

9 PC Version is Less Efficient Maybe you have two copies of all vertex data –Expensive in terms of RAM Maybe you lock the vertex/index buffers to traverse them. –Expensive in terms of CPU

10 Cross-Platform Issues Looking at mesh geometry is very common –Raycasting, decals, dynamic bounding volumes… So it needs to be done from many places in the engine So we need to be able to inspect mesh geometry in a cross-platform way –Because we don’t want to write all that code several times… too much complication!

11 This makes me sad It means we need to introduce abstractions that are forced by the PC… All applications get access to vertex memory by calling a lock / unlock function. –But on consoles this usually is not necessary! –So console games are a little bit more complicated than they would be otherwise

12 Looking at the code… In the engine, the class “Fast_Rendering_Vertex_Data” provides this abstraction. Systems deep in the engine like skeletal animation, lock this buffer in order to save the deformed vertices On some platforms, the lock is a “no-op”

13 But it gets worse… Because locking the buffers may be expensive on a platform like the PC You want to try to optimize the core engine to minimize locks, even though locks are “no-ops” on some platforms –Example: Animating vertices, then updating vertex normals … sometimes we don’t need normals!

14 Difference in Philosophy: Xbox vs. GameCube Xbox wants you to lock vertex buffers –So that it can invalidate cache on the graphics processor –But software is more complicated due to lock/unlock calls GameCube lets you modify vertex and index buffers freely –But you must remember to invalidate the cache memory yourself Though it is easy to get this wrong as well I am not sure which is better

15 Visibility

16 Three main categories of visibility algorithms “Blind” –PVS View Space –Portals, occluders, horizon computation Screen Space –Span buffer, coverage mask, hierarchical z-buffer

17 Indoor vs Outdoor Rendering Different techniques applicable to each Indoor engine: Half-Life –Counter-Strike screenshot examples of “fake outdoors” Outdoor engine: Starsiege TRIBES –Screenshots

18 Indoor vs Outdoor Rendering But of course we want to make worlds that have both indoors and outdoors Some games have engines that switch between them (like Tribes) This is not a good thing; we want a unified rendering method.

19 High Average Frame Rate vs. Consistent Frame Rate Consistent frame rate is more important! If I am standing in some place and looking in some direction and I get 60fps, that is not very good if my frame rate drops to 15fps when I turn left –Example: a room in a first person shooter with a lot of objects in one corner (quick demo)

20 Some Outdoor Renderers Try to Use Visibility Culling Occluders Horizon detection-based culling (examples)

21 But, Occlusion Culling does not make much sense for outdoors Outdoor scenes are relatively uncontrolled; Definition of an outdoor engine is that you can go up on top of a big mountain and look around If frame rate must be fast in that situation, what is the point of trying to make it faster? Trying to make things faster in occluded cases will make the mountain case slower

22 But, Occlusion Culling is critical for indoors It’s the only way modern games like Doom 3 are fast What this means is…

23 Unification won’t really happen for a while. Until we come up with an occlusion culling method that is simple, and fast in the case where nothing is occluded; Or we come up with a way to render indoor areas without occlusion culling, and without suffering any speed losses.

24 Screenspace Method: Span Buffer Something we used a lot in software rendering Unreal used this (newer Unreal-engine games do not) –It did not scale well with hardware rendering –I think Unreal actually used span portal visibility (explained after we talk about portals)

25 Screenspace Method: Triage Coverage Masks Proposed by Ned Greene, paper: “Hierarchical Polygon Tiling with Coverage Masks”

26 Screenspace Method: Hierarchical Z-Buffer Also proposed by Ned Greene, paper: “Hierarchical Z-Buffer Visibility” Uses frame coherence for increased speed I do not like frame coherence

27 Why I Dislike Frame Coherence Games want a stable frame rate (not just a fast frame rate!) If the frame rate becomes slightly slower, the viewpoint moves further = less coherence Because there’s less coherence, the next frame will draw even slower This causes a feedback loop (the frame rate plummets)

28 Frame Coherence Frame Coherence is relied upon heavily by many of the algorithms I like to pick on –(like the ROAM terrain rendering algorithm)

29 Academic Research Frame coherence is thought of as a standard way to speed up algorithms in the academic world This is one of several ways in which the academic community is “out to lunch” Frame coherence is good for batch rendering; it is not suitable for most interactive rendering!

30 My Recommendations For runtime visibility in games, use an algorithm like PVS or portals. Don’t use a screenspace method. Screenspace methods are better for software rendering. These days we are making some tools that effectively do software rendering, so screenspace methods may apply –The normal map generation algorithm Actually doesn’t need occlusion culling, but it’s an example of software rendering “coming back” in preprocessing tools