Post-rendering Cel Shading & Bloom Effect

Slides:



Advertisements
Similar presentations
Exploration of advanced lighting and shading techniques
Advertisements

POST-PROCESSING SET09115 Intro Graphics Programming.
An Optimized Soft Shadow Volume Algorithm with Real-Time Performance Ulf Assarsson 1, Michael Dougherty 2, Michael Mounier 2, and Tomas Akenine-Möller.
Compositing and Blending Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics.
Parallax-Interpolated Shadow Map Occlusion
Frame Buffer Postprocessing Effects in DOUBLE-S.T.E.A.L (Wreckless)
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Announcements Project 2 due today Project 3 out today –demo session at the end of class.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Week 11 - Wednesday.  Image based effects  Skyboxes  Lightfields  Sprites  Billboards  Particle systems.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
1 Computer Graphics Chapter 9 Rendering. [9]-2RM Rendering Three dimensional object rendering is the set of collective processes which make the object.
Compositing and Blending Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Image Compositing Angel 8.11 Angel: Interactive Computer Graphics5E © Addison-Wesley
Fast GPU Histogram Analysis for Scene Post- Processing Andy Luedke Halo Development Team Microsoft Game Studios.
December 5, 2013Computer Vision Lecture 20: Hidden Markov Models/Depth 1 Stereo Vision Due to the limited resolution of images, increasing the baseline.
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
Master Thesis Lighting and materials for real-time game engines
(conventional Cartesian reference system)
Skin Rendering GPU Graphics Gary J. Katz University of Pennsylvania CIS 665 Adapted from David Gosselin’s Power Point and article, Real-time skin rendering,
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
Paper by Alexander Keller
CIS 681 Distributed Ray Tracing. CIS 681 Anti-Aliasing Graphics as signal processing –Scene description: continuous signal –Sample –digital representation.
Non-Photorealistic Rendering - This is the attempt to make a realistic scene or object look as if it were hand drawn.
Week 14 - Wednesday.  What did we talk about last time?  Collision handling  Collision detection  Collision determination  Collision response  BSPs.
CSS552 Final Project Demo Peter Lam Tim Chuang. Problem Statement Our goal is to experiment with different post rendering effects (Cel Shading, Bloom.
Computer Graphics Shadows
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
Computer Graphics Mirror and Shadows
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Visual quality techniques.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Chapter 6 Special Effects 강 신 진강 신 진
03/05/03© 2003 University of Wisconsin Last Time Tone Reproduction If you don’t use perceptual info, some people call it contrast reduction.
CS-378: Game Technology Lecture #4: Texture and Other Maps Prof. Okan Arikan University of Texas, Austin V Lecture #4: Texture and Other Maps.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
CHAPTER 8 Color and Texture Mapping © 2008 Cengage Learning EMEA.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
Realtime NPR Toon and Pencil Shading Joel Jorgensen May 4, 2010.
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
CSC508 Convolution Operators. CSC508 Convolution Arguably the most fundamental operation of computer vision It’s a neighborhood operator –Similar to the.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
The Lit Sphere: A Model for Capturing NPR Shading from Art Peter-Pike Sloan, William Martin, Amy Gooch & Bruce Gooch.
Maths & Technologies for Games Advanced Graphics: Scene Post-Processing CO3303 Week
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
Ambient Occlusion Patrick Cozzi University of Pennsylvania CIS Fall 2013.
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
Compositing and Blending Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Computer Graphics I, Fall 2008 Compositing and Blending.
Edges Edges = jumps in brightness/color Brightness jumps marked in white.
The Cathode Ray Tube Monitor
By: Rachel Yuen, Chad Van De Hey, and Jake Trotman
Miguel Tavares Coimbra
Shaders, part 2 alexandri zavodny.
Week 14 - Wednesday CS361.
Photorealistic Rendering vs. Interactive 3D Graphics
Computer Graphics Chapter 9 Rendering.
Week 11 - Wednesday CS361.
Distributed Ray Tracing
IMAGES.
3D Graphics Rendering PPT By Ricardo Veguilla.
The Graphics Rendering Pipeline
Understanding Theory and application of 3D
Static Image Filtering on Commodity Graphics Processors
UMBC Graphics for Games
Patrick Cozzi University of Pennsylvania CIS Fall 2012
Presentation transcript:

Post-rendering Cel Shading & Bloom Effect Peter Lam Tim Chuang

Problem Statement Expand the existing framework to support post-rendering. Render a scene by using Cel (Toon) Shading. Enhance the scene quality by applying the Bloom effect. (And possibly many other 2D filters on top of the 3D rendered result) Enable multi-threading for the post-rendering mechanism.

Cel Shading Cel shading is a method of rendering a three dimensional model so that it looks like a hand-drawn image, rather than a photorealistic rendering.

What are the steps? Techniques can be summarized to two major steps: Create the outline Reduce the colors Scene Description Scene rendered with Cel Shading

Creating Outline Silhouettes: an object or scene consisting of the outline and a featureless interior Crease Edges: edges that are sharp

Our Plan to Creating Object Outline Store a new ID specified depth map from the camera viewing direction. In post rendering, scan the depth map (sample with 3x3 kernel) similar to what how we create soft shadow with shadow depth map. Whenever there is a change of Object ID, turn the pixel black to create a border.

Creating (simplified) Color

Our Plan to Create Color… When N Dot L is positive, always set it to 1, in another word, just omit that. However, if it is negative, give it two sets of colors to give it some layer. Why? It looks better that way. When doing the V Dot R for specular, always set it to 0.5 (or less), so the surface doesn’t shine to much.

Example (on a familiar image)

Example (on a familiar image)

Bloom Effect Bloom (sometimes referred to as light bloom or glow) is a computer graphics effect used in computer games, demos and high dynamic range rendering (HDR) to reproduce an imaging artifact of real-world cameras. The effect produces fringes of light around very bright objects in an image. Basically, if an object has a light behind it, the light will look more realistic and will somewhat overlap the front of the object from the 3rd person perspective.

Bloom Effect (continues…) A bloom effect makes the image look brighter and have a "hazy" look to it.

How to implement Bloom? Post-rendering!! One algorithm for acheving bloom is: Apply a bright-pass filter on the image to keep only high luminance values. Apply a 3x3 Gaussian blur filter of small kernel size several times to blur the image. Additively blend the resulting texture on the screen.

Brightpass Filter A bright-pass filter is used to extract the bright pixels (including bright spots created from NDotL or specular). The brightpass filter will separate the brightest parts from the rest and the final texture will contain only a black image with those bright parts. Then we scale down this texture to a reasonable size and do some blurring on it. Do this on every pixel

Gaussian Blur It is also known as Gaussian smoothing, the result is an image with reduced detail and noise. A 3D version of the curve Following the the 2D equation of the bell curve:

Gaussian Blur (continues…) If the blurring is done in one pass the area that we have to blur is proportional to the blur diameter squared (d2). This is very expensive when the area becomes very large. It can instead be done in two separate passes (separable convolution) which will reduce the area that's needed to blur down to 2d instead, first blur along the x-axis (horizontally) and then blur the horizontal blur along the y-axis (vertically).

Gaussian Blur Examples

Down Sampling (Decimation) Instead of increasing the Gaussian filter kernel size, we can downscale the image and apply the same Gaussian filter to create more blur. Downscaling can be done with the a simple 3x3 kernel. It can be done really fast.

Down Sampling Examples

Our approach … We begin with a simple 3x3 kernel that approximates the Gaussian bell curve (see below). To add extra blur (like down sampling), we sample the 3x3 area and give each pixel the same color, instead of moving by one pixel at a time, we move by two pixels at a time so we jump from one 3x3 square to another. This effectively downscales the image while keeping the dimensions the same. When we repeat this process, we can increase the guasian blur coverage to more pixels Color Factor : The total weight you want to divide the summation by. Offset: When the factor is less than the total weight, it can be used to brighten or darken pixels. Code - new Vector3(Offset / 255f, Offset / 255f, Offset / 255f)

Other Filters at a Glance

Multi-Threading Support Integrated into the existing Ray-tracing frame work Increased the “Step” a thread takes when getting the next workload Threads have to proceed at the same pace in order to render different stages of post-rendering

Risk!? Proper scene that matches the implementation is required in order to observe good results. Multi-threading support does not increase performance proportional to the number of threads. (Bitmap objects are the bottlenecks) If the resolution of the rendering image is low, the output for toon will be poor, where as bloom will not be affected as much, since it is post-rendered.

Questions?

Sources Cel Shading Bloom Effect Gaussian Blur http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/ http://digitseven.com/celshader.aspx Bloom Effect http://kalogirou.net/2006/05/20/how-to-do-good-bloom-for-hdr-rendering/ http://lemoi-www.dvgu.ru/download/HDR/hdr_hdrr.pdf Gaussian Blur http://www-personal.engin.umd.umich.edu/~jwvm/ece581/21_GBlur.pdf http://nebelfront.org/articles/gaussianblur.html http://avisynth.org/mediawiki/Resampling#Example:_the_bilinear_resampling_filter_-_downsampling