NVIDIA CONFIDENTIAL Hardware Shading for Artists.

Slides:



Advertisements
Similar presentations
© Copyright Khronos Group, Page 1 COLLADA FX Update and FX Composer 2.0 Daniel Horowitz & Ignacio Castaño.
Advertisements

BY AHROORAN & CHRIS 3D Software. Blender Blender is a free open source software that is compatible with most operating systems for example GNU/Linux,
For over a decade Chaos Group’s flagship rendering software, V-Ray ®, has set the standard for speed, reliability, ease of use, and render quality. With.
Business and Computing Deanery 3D Modelling Tools Week 10 File formats and exporting models.
CS5500 Computer Graphics © Chun-Fa Chang, Spring 2007 CS5500 Computer Graphics April 19, 2007.
Business and Computing Deanery 3D Modelling Tools Week 8 Introduction to materials.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Introduction to Computer Graphics Ed Angel Professor of Computer Science, Electrical and.
Graphics Systems I-Chen Lin’s CG slides, Doug James’s CG slides Angel, Interactive Computer Graphics, Chap 1 Introduction to Graphics Pipeline.
CSE 381 – Advanced Game Programming Shading.
Shading Languages By Markus Kummerer. Markus Kummerer 2 / 19 State of the Art Shading.
Game Engines Non-game specific technology Game: – Engine – Assets (models, animations, sounds, AI, and physics) – Code (AI, Scripting, etc.)
Master Project Preparation Murtaza Hussain. Unity (also called Unity3D) is a cross-platform game engine with a built-in IDE developed by Unity Technologies.
Computer Science – Game DesignUC Santa Cruz Adapted from Jim Whitehead’s slides Shaders Feb 18, 2011 Creative Commons Attribution 3.0 (Except copyrighted.
Cross-Platform Development using FX Composer 2.0 Chris Maughan · Kevin Bjorke Alpha 4 · GDC 2006.
Cg Kevin Bjorke GDC NVIDIA CONFIDENTIAL A Whole New World with Cg Graphics Program Written in Cg “C” for Graphics Compiled & Optimized Low Level,
Klas Skogmar, Lund Institute of Technology Real-time Video Effects Using Programmable Graphics Cards Master of Science Thesis Klas Skogmar
Realtime 3D Computer Graphics Computer Graphics Computer Graphics Software & Hardware Rendering Software & Hardware Rendering 3D APIs 3D APIs Pixel & Vertex.
Under the Hood: 3D Pipeline. Motherboard & Chipset PCI Express x16.
Integrating Shaders into Your Game Engine Bryan Dudash NVIDIA Developer Technology.
Cg – C for Graphics Eric Vidal CS 280. History General graphics processing languages – Renderman shading language (1988) Assembly languages for graphics.
UFCEKT-20-33D Modelling and Animation 3D Modelling & Animation Materials and Textures Maps.
CS 480/680 Computer Graphics Course Overview Dr. Frederick C Harris, Jr. Fall 2012.
GPU Programming Robert Hero Quick Overview (The Old Way) Graphics cards process Triangles Graphics cards process Triangles Quads.
CHAPTER 4 Window Creation and Control © 2008 Cengage Learning EMEA.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Real-time Graphical Shader Programming with Cg (HLSL)
Games Development Practices 3D Model Import/Export CO2301 Games Development 1 Week 17.
GPU Shading and Rendering Shading Technology 8:30 Introduction (:30–Olano) 9:00 Direct3D 10 (:45–Blythe) Languages, Systems and Demos 10:30 RapidMind.
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.
A Crash Course in HLSL Matt Christian.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
reliability, ease of use, and render quality. Here are the
1 Angel and Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Introduction to Computer Graphics 靜宜大學 資訊工程系 蔡奇偉 副教授
1 Angel and Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Introduction to Computer Graphics Ed Angel Professor Emeritus of Computer.
1 Introduction to Computer Graphics SEN Introduction to OpenGL Graphics Applications.
Computer Graphics I, Fall 2008 Introduction to Computer Graphics.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 CS4610/7610: Introduction to Computer Graphics.
GRAPHICS PIPELINE & SHADERS SET09115 Intro to Graphics Programming.
CS662 Computer Graphics Game Technologies Jim X. Chen, Ph.D. Computer Science Department George Mason University.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
Shader Study 이동현. Vision engine   Games Helldorado The Show Warlord.
The Cg Runtime Cyril Zeller. Cg Pipeline Graphics programs are written in Cg and compiled to low-level assembly code... Cg Runtime API...
SIGGRAPH 2010 Course: Physically Based Shading Models in Film and Game Production SIGGRAPH 2010 Physically Based Shading Models in Film and Game Production.
NVIDIA FX Composer 2 Shader Authoring for Everyone Philippe Rollin Aravind Kalaiah.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
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.
ถ้าจะพูดถึง 3ds MAX  ทุกคนก็คงนึกถึงโปรแกรมทำ 3D อนิเมชั่น ซึ่งหลายๆคนคงรู้จักกัน  โดยปัจจุบันได้มีถึงเวอร์ชั่น 9 และล่าสุดคือ 2008 จึงจะมาบอกถึงความแตกต่างของเวอร์
Graphic Rendering Tasks 1. If Clipping was not in the Pipeline If the clipping step was not in the graphics pipeline then all objects or part of objects.
Local Illumination and Shading
From Turing Machine to Global Illumination Chun-Fa Chang National Taiwan Normal University.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
CgFX Sébastien Dominé, NVIDIA. Overview What is CgFX? CgFX runtime Production pipeline with CgFX CgFX Tools set Demo.
An Introduction to the Cg Shading Language Marco Leon Brandeis University Computer Science Department.
1© 2009 Autodesk Hardware Shade – Presenting Your Designs Hardware and Software Shading HW Shade Workflow Tessellation Quality Settings Lighting Settings.
Game Engines Game: – Engine – Assets (models, animations, sounds, AI, and physics) – Code (Rules, AI, Scripting, etc.)
From VIC (VRVS) to ViEVO (EVO) 3 years of experiences with developing of video application VIC for VRVS allowed us to develop a new video application.
Ying Zhu Georgia State University
Chapter 1 An overview on Computer Graphics
Programmable Pipelines
Graphics Processing Unit
The Graphics Rendering Pipeline
Interactive Computer Graphics
Introduction to Computer Graphics
Introduction to Computer Graphics
Game Engines Non-game specific technology Game: Engine
CS5500 Computer Graphics April 17, 2006 CS5500 Computer Graphics
RADEON™ 9700 Architecture and 3D Performance
Computer Graphics Introduction to Shaders
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
Games Development 2 Tools Programming
Presentation transcript:

NVIDIA CONFIDENTIAL Hardware Shading for Artists

NVIDIA CONFIDENTIAL Today’s Speakers Steve Burke NVIDIA John Versluis Inevitable Entertainment

NVIDIA CONFIDENTIAL Hardware Shaders in Games Hardware Shaders Bring Your Game Closer to Cinematic Quality Copyright Epic 2002

NVIDIA CONFIDENTIAL Cinematic Gaming on the Horizon Copyright Epic 2002

NVIDIA CONFIDENTIAL A Great time for Hardware Shading Convergence of film and real- time rendering Large number of high-end cards in market High-level shading languages; Cg and HLSL Next-generation graphics chips

NVIDIA CONFIDENTIAL Course Objective Discuss artist tools for using hardware shaders inside 3D applications. Provide artists with a better understanding of hardware shaders and the workflow of creating and editing shaders.

NVIDIA CONFIDENTIAL 1. Getting Started w/ Hardware Shaders Tools for 3ds max, Maya, and XSI Comparison of different software implementations Exporting to a Game Engine Other Tools

NVIDIA CONFIDENTIAL What Does Cg look like? Assembly … RSQR R0.x, R0.x; MULR R0.xyz, R0.xxxx, R4.xyzz; MOVR R5.xyz, -R0.xyzz; MOVR R3.xyz, -R3.xyzz; DP3R R3.x, R0.xyzz, R3.xyzz; SLTR R4.x, R3.x, { }.x; ADDR R3.x, { }.x, -R4.x; MULR R3.xyz, R3.xxxx, R5.xyzz; MULR R0.xyz, R0.xyzz, R4.xxxx; ADDR R0.xyz, R0.xyzz, R3.xyzz; DP3R R1.x, R0.xyzz, R1.xyzz; MAXR R1.x, { }.x, R1.x; LG2R R1.x, R1.x; MULR R1.x, { }.x, R1.x; EX2R R1.x, R1.x; MOVR R1.xyz, R1.xxxx; MULR R1.xyz, { , , }.xyzz, R1.xyzz; DP3R R0.x, R0.xyzz, R2.xyzz; MAXR R0.x, { }.x, R0.x; MOVR R0.xyz, R0.xxxx; ADDR R0.xyz, { , , }.xyzz, R0.xyzz; MULR R0.xyz, { , , }.xyzz, R0.xyzz; ADDR R1.xyz, R0.xyzz, R1.xyzz;... Cg … COLOR cSpec = pow(max(0, dot(Nf, H)), phongExp).xxx; COLOR cPlastic = Cd * (cAmbi + cDiff) + Cs * cSpec; Simple phong shader expressed in both assembly and Cg

NVIDIA CONFIDENTIAL How Does CgFX Relate to Cg?  CgFX describes an entire effect – Cg implements a particular function required by an effect  CgFX describes all the parameters (and their meaning or semantics) that the app has to provide – automatic parameter discovery  CgFX can describe complex multi-pass effects  CgFX can handle multiple techniques CgFX syntax is a superset of Cg syntax and can contain Cg code or assembly code

NVIDIA CONFIDENTIAL Tools for Hardware Shading 3ds max 5 CgFX Plug-in for 3ds max dds plugin for 3ds max Maya 4.5 Maya Cg Plug-in XSI 3.0 Built-in support for Cg The three most popular 3d apps all support hardware shaders in the viewports

NVIDIA CONFIDENTIAL Cg implementation: 3ds max 5 CgFX Viewport Manager Intuitive artist controls (sliders, color pickers, etc.) Supports.fx file format Multiple Techniques for fallbacks Dynamic, shader- specific GUI

NVIDIA CONFIDENTIAL Cg implementation: Maya 4.5 CgFX integrated with Maya’s Hypershade Sample shaders include: Bumpy Shiny, Toon, Anisotropic Metal, Ghostly, Refraction Dispersion, Rainbow Integrated with Maya’s lights Intuitive, shader-specific, artist controls Slider control over key real-time parameters (e.g., bump depth) Supports.fx file format

NVIDIA CONFIDENTIAL Cg implementation: Softimage|XSI 3.0 Cg Integration in XSI’s Render Tree Net View for help, samples & documentation Direct Cg code editing and compilation Interactive shader builder Shipping with XSI 3.0

NVIDIA CONFIDENTIAL Comparison of Cg Implementations Cg vs. CgFX Application-specific implementations DirectX and Open GL The different software implementations are more alike than not.

NVIDIA CONFIDENTIAL Exporting to Your Game Engine Shaders can be precompiled to assembly or compiled at run-time: assembly can be hand-tuned if necessary Shaders can be compiled to either DirectX or OpenGL Cg run-time available now You will need to create an exporter to use the shaders you create with these tools

NVIDIA CONFIDENTIAL CgFX Viewer The CgFX Viewer can be used as a production resource and a code example for implementing CgFX Main Application Window Connection Editor Window

NVIDIA CONFIDENTIAL 2. Hardware Shader Workflow Designing Shaders and Using Existing Shaders Artist-Configurable Parameters Editing Shader Parameters Exporting Shader Parameters to Game Engine

NVIDIA CONFIDENTIAL Cg Workflow Diagram Cg supports DirectX and OpenGL It runs on Windows and Linux It supports hardware from NVIDIA, ATI, Matrox and any other hardware that supports OpenGL or DirectX

NVIDIA CONFIDENTIAL Create or Acquire Shaders cgshaders.org Cg Browser In-house libraries Shaders written in assembly or Cg

NVIDIA CONFIDENTIAL Art / Programmer Relationship Graphics Programmer Creates the plumbing for shader Determines which parameters are configurable Both artist and programmer can work together for maximum efficiency. Each does what they do best. Artist Creates maps and tweaks parameters to achieve desired look Provides feedback to programmer

NVIDIA CONFIDENTIAL Customizing Shader Parameters Customizable Parameters are specific to each effect Bitmaps can be swapped Color and numeric values can be changed Shader changed by selecting a new fx file

NVIDIA CONFIDENTIAL Lights and Animation Shader reacts to changes in light position Animate parameters with standard 3ds max keyframe tools

NVIDIA CONFIDENTIAL Saving Shader Customizations Changes made to shader are saved in the 3ds max file Parameter settings can be exported to game engine Loading new shaders is as simple as selecting a new fx file

NVIDIA CONFIDENTIAL View Shader in Game Engine OpenGL Direct3D View the customized shader in either Direct3D or OpenGL Multiple Techniques can be used

NVIDIA CONFIDENTIAL 3. The Gritty Details of HW Shaders Overview of Shaders Hardware Shaders and Software Shaders Artist/ Programmer teamwork

NVIDIA CONFIDENTIAL Vertex and Pixel Shaders Model and texture data vertex shaders vertex shaders pixel shaders pixel shaders Final Surface Vertex and Pixel Shaders offer programmability so that surfaces can be made of unique and individual ‘stuff’

NVIDIA CONFIDENTIAL Vertex Shaders Vertex Shaders are both Flexible and Quick Linear Interpretation of vertex lighting values vertex shaders can be used to move/animate verts

NVIDIA CONFIDENTIAL Pixel Shaders Pixel shaders have limited or no knowledge of neighbouring pixels Each pixel is calculated individually

NVIDIA CONFIDENTIAL Software Shaders are not for Real-time Complexity Flexibility Quality over Speed Unused Texture Slots Conditional Code No relationship to Hardware

NVIDIA CONFIDENTIAL Hardware Shaders are Streamlined 1/60 th of a second Hardware- friendly techniques Interactivity Configurable shader parameters Reflection Level 0.89 Reflection Color RGB 188,254,122

NVIDIA CONFIDENTIAL Small Efficient Shaders Multiple, narrowly-targeted shaders are more efficient/faster than large all-purpose shaders Several shaders may share similar features and lighting models

NVIDIA CONFIDENTIAL Fallback Techniques high-end hardware Several versions of the same shader can be contained into a single fx file mid-range hardware low-end hardware

NVIDIA CONFIDENTIAL Lighting Models Texture only visible in highlights Texture visible in most areas but overall illumination is less Texture clearly visible BlinnMetalOren-Nayar Same textures and lighting conditions with different lighting models.

NVIDIA CONFIDENTIAL Lights are Part of the Shader Definition Lights (Number, kind, color, etc.) must be programmed into each shader Lights are not separate scene objects as they appear to be in software rendering.

NVIDIA CONFIDENTIAL Render to Texture Effects Speed Limitations Shadows and other complex rendering techniques Limitations CgFX works best for editing the look of materials.

NVIDIA CONFIDENTIAL Thanks! Questions? Steve Burke NVIDIA John Versluis Inevitable