Z-Buffer hold pixel's distance from camera. Z buffer

Similar documents
Computer Graphics 10 - Shadows

Computer Graphics II

Identifying those parts of a scene that are visible from a chosen viewing position, and only process (scan convert) those parts

Computer Graphics. Shadows

Creating soft shadows

Topics and things to know about them:

Real-Time Rendering of a Scene With Many Pedestrians

Computer Graphics. Lecture 9 Environment mapping, Mirroring

Hidden surface removal. Computer Graphics

Projection Matrix Tricks. Eric Lengyel

Computer Graphics. Bing-Yu Chen National Taiwan University

Rasterization Overview

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Bringing Hollywood to Real Time. Abe Wiley 3D Artist 3-D Application Research Group

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Drawing the Visible Objects

Shadows. COMP 575/770 Spring 2013

Graphics for VEs. Ruth Aylett

Adaptive Point Cloud Rendering

CEng 477 Introduction to Computer Graphics Fall 2007

Introduction to Visualization and Computer Graphics

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

Interactive Computer Graphics A TOP-DOWN APPROACH WITH SHADER-BASED OPENGL

RASTERISED RENDERING

CHAPTER 1 Graphics Systems and Models 3

Recall: Indexing into Cube Map

CS451Real-time Rendering Pipeline

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Spatial Data Structures

Assignment 6: Ray Tracing

Hidden Surface Removal

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

Computer Graphics Shadow Algorithms

Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

Getting fancy with texture mapping (Part 2) CS559 Spring Apr 2017

Computer Graphics. Lecture 9 Hidden Surface Removal. Taku Komura

CS 354R: Computer Game Technology

lecture 19 Shadows - ray tracing - shadow mapping - ambient occlusion Interreflections

LOD and Occlusion Christian Miller CS Fall 2011

CGS 3220 Lecture 17 Subdivision Surfaces

Computer Graphics (CS 543) Lecture 10: Normal Maps, Parametrization, Tone Mapping

Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts

Visibility and Occlusion Culling

Flowmap Generator River Tutorial

CSE 167: Introduction to Computer Graphics Lecture #9: Visibility. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018

Easy Decal Version Easy Decal. Operation Manual. &u - Assets

Advanced 3D-Data Structures

Shadows and Texture Mapping

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Real-Time Non- Photorealistic Rendering

Applications of Explicit Early-Z Culling

CS 563 Advanced Topics in Computer Graphics Culling and Acceleration Techniques Part 1 by Mark Vessella

Hemlock Folly v2 Notes

Spatial Data Structures

The Application Stage. The Game Loop, Resource Management and Renderer Design

3D Rasterization II COS 426

TSBK03 Screen-Space Ambient Occlusion

ULTIMATE Grass & Meadows Worldbuilder

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Terrain Rendering (Part 1) Due: Thursday November 30 at 10pm

Real-Time Rendering (Echtzeitgraphik) Dr. Michael Wimmer

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

Introduction to Computer Graphics with WebGL

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

COMP 175: Computer Graphics April 11, 2018

Com S 336 Final Project Ideas

Shadows in the graphics pipeline

4.5 VISIBLE SURFACE DETECTION METHODES

Models and Architectures

Graphics for VEs. Ruth Aylett

VEGETATION STUDIO FEATURES

Rendering Grass Terrains in Real-Time with Dynamic Lighting. Kévin Boulanger, Sumanta Pattanaik, Kadi Bouatouch August 1st 2006

Computergrafik. Matthias Zwicker. Herbst 2010

Many rendering scenarios, such as battle scenes or urban environments, require rendering of large numbers of autonomous characters.

Flowmap Generator Reference

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Optimisation. CS7GV3 Real-time Rendering

Spatial Data Structures

x ~ Hemispheric Lighting

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation

1 INTRoduCTIon to BLENDER 1. 3 PREPARATIon 19

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Game Graphics Programmers

Practical Shadow Mapping

Shadow Rendering EDA101 Advanced Shading and Rendering

VISIBILITY & CULLING. Don t draw what you can t see. Thomas Larsson, Afshin Ameri DVA338, Spring 2018, MDH

Chapter 7 - Light, Materials, Appearance

Spatial Data Structures

Water Simulation on WebGL and Three.js

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

More Visible Surface Detection. CS116B Chris Pollett Mar. 16, 2005.

Hidden Surface Elimination Raytracing. Pre-lecture business. Outline for today. Review Quiz. Image-Space vs. Object-Space

Scalable multi-gpu cloud raytracing with OpenGL

Spring 2009 Prof. Hyesoon Kim

CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014

CS 498 VR. Lecture 18-4/4/18. go.illinois.edu/vrlect18

CSE528 Computer Graphics: Theory, Algorithms, and Applications

GLOBAL EDITION. Interactive Computer Graphics. A Top-Down Approach with WebGL SEVENTH EDITION. Edward Angel Dave Shreiner

Transcription:

Z-Buffer hold pixel's distance from camera Z buffer

Frustrum Culling and Z-buffering insufficient Given a large enough set of polygons, no matter how fast the graphics card, sending it too many hidden polygons will overwhelm it. Need algorithms for occlusion culling

Occlusion Culling Octrees Divides space into a tree of octants Interior nodes contain a count of object in node Leaves record objects in node BSP trees (KD trees) Uses Planes (hyperplanes) to divide space into two parts and then repeats Interior nodes and leaves as in Octrees

Polygonal Ordering Painter's Algorithm: Paint the polygons that may be covered by other polygons first. Establishes a partial ordering: A is in front of B if A may cover part of B. Necessary for transparency

Using BSP Trees for Polygonal Ordering Back to front order: G, C, F, A, E, B, D V is the view position.

Polygon Aligned BSP Using polygons to determine planes: Select a polygon. The plane containing the polygon divides space in half. If another polygon is cut by the plane, replace it with two new polygons one on each side of the plane. For each half space repeat the above procedure until there are no more polygons.

Sky SkyBoxes - A SkyBox is basically a giant cube that surrounds all of the objects in the scene.

Sky SkyDomes - SkyDomes are very similar to SkyBoxes, and you use them by calling setskydome. A giant cube is created around the Camera and rendered onto, but the biggest difference is that the texture is "projected" onto the SkyBox in a spherical manner. SkyPlanes - SkyPlanes are very different from SkyBoxes and SkyDomes. Instead of a cube to render the sky texture on, we use just a single plane.

Sky Which sky to use depends entirely on your application. If you have to see all around you, even in the negative y direction, then really your only real choice is to use a SkyBox. If you have terrain, or some kind of floor which blocks the view of the negative y direction, then using a SkyDome seems to give more realistic results. For areas where you cannot see to the horizon (such as a valley surrounded by mountains on all sides, or the inner courtyard of a castle), a SkyPlane will give you very good looking results for very little GPU costs.

Shadow Maps

Shadow Maps Contain the Z depth of all points visible to a light. Any point with a greater distance from the light is in a shadow cast by that light. Point coordinates must be converted from a light specific frame to a camera frame. Requires a matrix multiply for each point One for each light. In general only movable objects need to be considered.

Soft Shadows If light is a point source, hard shadow Otherwise soft shadow.

Shadows Other topics Soft shadows. Shadows on curved surfaces Shadow Volumes See Real-Time Rendering, Akenine-Moller, Eric Haines

Terrains Static meshes and height maps. Static meshes allow more freedom with terrain as you can have overhangs. You will need to implement collision detection however if you wish to have entities interact correctly with the terrain Record heights as pixel values

Height Maps Heightmaps are more limiting in that you cannot have overhangs in the terrain. For further terrain details such as bridges for example - you will need to add these as meshes on top of the height map. If you wish to have a cave you would need to leave a hole in the height map in order place meshes later at the appropriate locations. Heightmaps are better suited for large maps and can be further optimised by using the paging scene manager Scene Managers can provide an optimized getheight function which allows entities to be easily snapped to the terrain. There would still need to be further collision code implemented for any terrain related meshes on the landscape.

Shaders Use texture memory to store data Vertex Shaders apply programs to vertices of polygons, before interior of polygon is rendered Fragment Shaders apply programs to points of polygons (fragments). Can use textures for data and masks.

Lighting Equation Can be handled in fragment shader. If point in shadow for a light, skip that light.

More Info http://www.ogre3d.org/wiki/index.php/terrainhowto http://www.ogre3d.org/tikiwiki/ogrebullet http://www.ogre3d.org/wiki/index.php/ogreode http://www.ogre3d.org/tikiwiki/nxogre