Download - Shading Languages

Transcript
Page 1: Shading Languages

Shading LanguagesShading Languages

By Markus KummererBy Markus Kummerer

Page 2: Shading Languages

2 / 19Markus Kummerer

State of the Art ShadingState of the Art Shading

Page 3: Shading Languages

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

Page 4: Shading Languages

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

Page 5: Shading Languages

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

Page 6: Shading Languages

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

Page 7: Shading Languages

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

Page 8: Shading Languages

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

Page 9: Shading Languages

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

Page 10: Shading Languages

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

Page 11: Shading Languages

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

Page 12: Shading Languages

12 / 19Markus Kummerer

ExamplesExamples

Page 13: Shading Languages

13 / 19Markus Kummerer

Example: Surface ShaderExample: Surface Shader

Page 14: Shading Languages

14 / 19Markus Kummerer

Example: Surface ShaderExample: Surface Shader

Page 15: Shading Languages

15 / 19Markus Kummerer

Example: Displacement ShaderExample: Displacement Shader

Page 16: Shading Languages

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

Page 17: Shading Languages

17 / 19Markus Kummerer

Interactive Programmable ShadingInteractive Programmable Shading ResultsResults

Page 18: Shading Languages

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

Page 19: Shading Languages

19 / 19Markus Kummerer

Hope you are delighted, tooHope you are delighted, too


Top Related