Shader Study 2007.5.30 이동현. Vision engine   Games Helldorado The Show Warlord.

Slides:



Advertisements
Similar presentations
Real-Time Rendering of Cartoon Smoke and Clouds
Advertisements

CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
Stefan Roettger, VIS Group, University of Stuttgart Ingo Frick, Massive Development, Mannheim The Terrain Rendering Pipeline
COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
GAM532 DPS932 – Week 7 Introduction to shadows. Shadow Effects Light Surface No Shadows Shadows.
The Art and Technology Behind Bioshock’s Special Effects
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
Week 7 - Wednesday.  What did we talk about last time?  Transparency  Gamma correction  Started texturing.
Week 9 - Wednesday.  What did we talk about last time?  Fresnel reflection  Snell's Law  Microgeometry effects  Implementing BRDFs  Image based.
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
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,
3-D RENDERING Peter Moore Jackson Cwach. What 3-D Rendering is 3D rendering is the 3D computer graphics process of automatically converting 3D wire frame.
Week 14 - Wednesday.  What did we talk about last time?  Collision handling  Collision detection  Collision determination  Collision response  BSPs.
Pre Production I.Concept II.Story Development III.Visual Development IV.Technical Direction V.Production Management.
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
Modelling and Simulation Types of Texture Mapping.
CS 638, Fall 2001 Today Light Mapping (Continued) Bump Mapping with Multi-Texturing Multi-Pass Rendering.
GPU Programming Robert Hero Quick Overview (The Old Way) Graphics cards process Triangles Graphics cards process Triangles Quads.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Visual quality techniques.
Computer Graphics Texture Mapping
Shading. What is Shading? Assigning of a color to a pixel in the final image. So, everything in shading is about how to select and combine colors to get.
Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures Vision, Modeling, Visualization Erlangen, Germany November 16-18,
Chris Kerkhoff Matthew Sullivan 10/16/2009.  Shaders are simple programs that describe the traits of either a vertex or a pixel.  Shaders replace a.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
TERRAIN SET09115 Intro to Graphics Programming. Breakdown  Basics  What do we mean by terrain?  How terrain rendering works  Generating terrain 
09/11/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Graphics Pipeline Texturing Overview Cubic Environment Mapping.
Emerging Technologies for Games Alpha Sorting and “Soft” Particles CO3303 Week 15.
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
3D Graphics for Game Programming Chapter IV Fragment Processing and Output Merging.
Tiger Woods 2008: Advancements in Environments Peter Arisman Technical Art Director Tiger Woods 2008.
Multi-pass Rendering. © 2002 James K. Hahn, N.H. Baek2 Multi-pass Rendering Repeat: image  Rendering pass  result imageRepeat: image  Rendering pass.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
CS-378: Game Technology Lecture #4: Texture and Other Maps Prof. Okan Arikan University of Texas, Austin V Lecture #4: Texture and Other Maps.
COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Game Programming 06 The Rendering Engine
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.
BUMP-MAPPING SET09115 Intro to Graphics Programming.
- Laboratoire d'InfoRmatique en Image et Systèmes d'information
Digital Media Dr. Jim Rowan ITEC 2110 Vector Graphics II.
Global Illumination. Local Illumination  the GPU pipeline is designed for local illumination  only the surface data at the visible point is needed to.
Cel shading By jared brock.
UV Mapping After a 3D object has been modeled it must be prepared for texturing. 3D surfaces can be “unwrapped” into a 2D representation with. This process.
Maths & Technologies for Games Graphics Optimisation - Batching CO3303 Week 5.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
RENDERING : Global Illumination
Postmortem: Deferred Shading in Tabula Rasa Rusty Koonce NCsoft September 15, 2008.
1 Geometry for Game. Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Week 14 - Wednesday CS361.
Week 7 - Monday CS361.
Deferred Lighting.
Chapter 6 GPU, Shaders, and Shading Languages
The Graphics Rendering Pipeline
Computer Animation System Overview
UMBC Graphics for Games
Lecture 13 Clipping & Scan Conversion
Last Time Presentation of your game and idea Environment mapping
Presentation transcript:

Shader Study 이동현

Vision engine   Games Helldorado The Show Warlord

Shaders in the Vision Engine  Multi-platform game engine

Shaders in the Vision Engine  Effects  Fallback Fallbacks are alternative, usually simpler, versions of a complex shader that are used whenever the hardware requirements for a shader version higher up in the hierarchy are not met.

Shader tool in V.6.0

Assigning Shaders to Geometry  Static Effects Statically assigned by the artists. Do not need to be updated, removed, or replaced in runtime.  Dynamic Effects Volumetric fog Dynamic lighting

Dynamic Effects – point light Do not want to assign the shader to all the objects in a scene

Shader assignment types  Shaders that are statically assigned by artists in the production tools: material properties, rendering styles.  Shaders that are dynamically assigned in the game code – for example, when highlighting selected objects.  Volume-based shader assignments-useful for dynamic lights, volumetric effects, and the like.

Rendering order  Base pass Base texture * static lighting Ex) Objects that do not have dynamic light  Zcull Save pixel processing power  Opaque objects front-to-back in order to improve early Z rejection.  Translucent objects Sorted back-to-front, to minimize visual artifacts.  Addition rendering passes The problem of finding the right rendering order gets a little more complex.

Rendering order – cont  There are shaders which have to be drawn before the usual base*lighting pass is rendered. Cartoon outline shader – use vertex program to extrude the rendered geometry along the normal vectors.  Drawn as an additive blend pass after the base*lighting pass. Such as additional rendering passes for dynamic lights.  Should be rendered after almost everything else. For effect Not properties of the rendered surface itself, but rather properties of the space between the rendered surface and the camera.

Rendering order – cont  A bad idea  If static geometry is actually behind the translucent primitives? All effects on translucent primitives would have to be rendered right after rendering the primitive itself. – not very feasible due to performance reason.( too many state changes ) Render the effects passes separately for opaque and translucent primitives.

Rendering order – cont  As long as the artists know how to handle translucent geometry and are aware of the fact that there are limitations to be considered, a loop like the above one will be sufficient.  The problem that still has to be solved is the rendering order between the base pass and the shaders applied to the same geometry. Multi-pass rendering with multiple shaders. Render pass property is set to each fallbacks. This way, it is possible to render to render the cartoon outlines mentioned above before the base pass is drawn, and if the geometry is illuminated by a light source, a lighting shader can be rendered on top of the base pass. Using a sorting key ensures that the fog is always rendered last.

Shader Callback Functions  Per-frame callback function.  Per-primitive callback function. Called for each single triangle but rather on batches of triangles. Fur shader. – the shader loops through each single shell and increases the normal extrusion distance in each iteration.

Reducing Overhead for State Setup  Shader-based rendering pipeline Batching triangles with the same shader setup Reducing state setup changes.  A sorting key encoded into a single 64-bit value. Int64 iKey = (iUserKey<<48) | (iDistance<<16) | iStateSetupID;  The batches might differ in their individual diffuse base texture

Textures  Procedurally generated textures into the shader system of the Vision Engine.  Custom modifier functions have to be implemented and registered and can finally be accessed in the shader definition.  Examples Converting height maps to vector maps( though for fine details, using dedicated art tool plugins is recommended) Normalization cubemaps. All kinds of gradients and characteristic functions for texture lookups. Cel shading lookups with dedicated mipmap levels. Creating texture alpha channels for texture “color key” emulation.