Shading Languages

Post on 25-Feb-2016

113 views 1 download

Tags:

description

Shading Languages. By Markus Kummerer. State of the Art Shading. Overview. RenderMan Interface Shape vs. Shading Types of Shaders Shading Language Examples Interactive Multi-Pass Shading. RenderMan Interface. Powerful set of primitive surface types Quadric surfaces Polygons - PowerPoint PPT Presentation

transcript

Shading LanguagesShading Languages

By Markus KummererBy Markus Kummerer

2 / 19Markus Kummerer

State of the Art ShadingState of the Art Shading

3 / 19Markus Kummerer

OverviewOverview RenderMan InterfaceRenderMan Interface Shape vs. ShadingShape vs. Shading Types of ShadersTypes of Shaders Shading LanguageShading Language ExamplesExamples Interactive Multi-Pass ShadingInteractive Multi-Pass Shading

4 / 19Markus Kummerer

RenderMan InterfaceRenderMan Interface Powerful set of primitive surface typesPowerful set of primitive surface types

Quadric surfacesQuadric surfaces PolygonsPolygons Parametric surfacesParametric surfaces

Hierarchical modeling, geometryHierarchical modeling, geometry Constructive solid geometryConstructive solid geometry Camera modelCamera model Generalized shading modelGeneralized shading model

5 / 19Markus Kummerer

Shape vs. ShadingShape vs. Shading ShapeShape

Geometric configuration of objectsGeometric configuration of objects ShadingShading

Calculates the appearance of an object in a Calculates the appearance of an object in a scene under a set of light sourcesscene under a set of light sources

Result defined byResult defined by Colors of the surface and the light source(s)Colors of the surface and the light source(s) Position and orientation of the surface relative to Position and orientation of the surface relative to

the lightthe light Roughness of the surfaceRoughness of the surface

6 / 19Markus Kummerer

Shading PipelineShading Pipeline Three basic parts of the shading processThree basic parts of the shading process

Emission at the light sourceEmission at the light source Interaction of the light with the surfaceInteraction of the light with the surface Atmospheric effects between the surface Atmospheric effects between the surface

and the viewpointand the viewpoint

7 / 19Markus Kummerer

Types of ShadersTypes of Shaders RenderMan Interface supportsRenderMan Interface supports

Light source shadersLight source shaders Surface shadersSurface shaders Volume shadersVolume shaders Transformation shadersTransformation shaders Displacement shadersDisplacement shaders Imager shadersImager shaders

8 / 19Markus Kummerer

Light Source ShaderLight Source Shader Calculates the intensity and color of light Calculates the intensity and color of light

sent by the light source to a point on a sent by the light source to a point on a surfacesurface

9 / 19Markus Kummerer

Surface ShaderSurface Shader Determines the color of light reflecting from Determines the color of light reflecting from

a point on a surface in a particular directiona point on a surface in a particular direction

10 / 19Markus Kummerer

Volume ShaderVolume Shader Generalizes the idea of atmosphere Generalizes the idea of atmosphere

affecting light passing through space affecting light passing through space between a surface and the eyebetween a surface and the eye

11 / 19Markus Kummerer

Shading LanguageShading Language Orthogonal definitionOrthogonal definition Rendering environmentRendering environment Special data typesSpecial data types Uniform and varying variablesUniform and varying variables Integration constructsIntegration constructs Filtered map accessFiltered map access Function libraryFunction library

12 / 19Markus Kummerer

ExamplesExamples

13 / 19Markus Kummerer

Example: Surface ShaderExample: Surface Shader

14 / 19Markus Kummerer

Example: Surface ShaderExample: Surface Shader

15 / 19Markus Kummerer

Example: Displacement ShaderExample: Displacement Shader

16 / 19Markus Kummerer

Interactive Programmable ShadingInteractive Programmable Shading OpenGL acts as an assembly language for OpenGL acts as an assembly language for

shader executionshader execution Compiler is introduced between the Compiler is introduced between the

application and the graphics libraryapplication and the graphics library

17 / 19Markus Kummerer

Interactive Programmable ShadingInteractive Programmable Shading ResultsResults

18 / 19Markus Kummerer

ConclusionConclusion Shading in softwareShading in software

Common technique for production animationCommon technique for production animation Offers generalized shading modelsOffers generalized shading models Provides a highly flexible approachProvides a highly flexible approach But is not interactive...But is not interactive...

Shading in hardware is needed for Shading in hardware is needed for interactivityinteractivity

19 / 19Markus Kummerer

Hope you are delighted, tooHope you are delighted, too