SlideShare una empresa de Scribd logo
1 de 31
Implementing a modern, RenderMan compliant, REYES renderer Davide Pasca ribtools.com (contact: davide<at> ribtools.com) 1
About REYES Reyes or REYES (Renders Everything You Ever Saw) A flexible renderer, developed by Lucasfilm CG div. (“Pixar” from 1986) First used in 1984 in Start Trek II ..still used today in Pixar’s Photorealistic RenderMan 2 * Images, from top, are copyright of Paramount Pictures and Pixar (subsidiary of The Walt Disney Company)
RenderMan compliant ? Defines a renderer with some basic capabilities such as: A RenderMan graphics state machine Hidden surface elimination Pixel filtering and anti-aliasing User programmable shaders Texture mapping Etc… 3
REYES features Native support for high level surfaces Dynamic LOD Compact representation Subdivide per-frame based on size on screen Displace geometry from textures High quality filtering Easier to deal with translucency, motion-blur, etc. Can be used together with ray-tracing 4
REYES pipeline overview 5
Split (1) A parametric surface:        P = f(u,v) Split until “small enough” size (estimated) on screen 6
Split (2) Calculate the bounding box in screen-space …test against predetermined max screen area Here, the bounding box is too large.. 7
Split (3) When too large, split the patch It’s easy with parametric primitives: Pnew = f(unew, vnew) New split points 8
Split (4) Calculate the bounds of the new sub-patches Still too large 9
Split (5) Split recursively until every sub-patch is “small enough”… Small enough.. this is ready to be diced 10
What’s “Small Enough” ? When most sub-patches fit in a single bucket When dicing(see later) produces a suitable number of samples (sweet spot for performance) Sub-patch inside a single bucket Optimal Sub-patch touches two or more buckets Not Optimal A bucket 11
Dice Small enough sub-patches are diced Generate a dense grid of samples (1 pixel-per-sample or more..) 1 pixel Small enough n_samples <= max_samples max_samples is set for performance reasons and to avoid distortion 12
Displace Apply a displacement shader to the position of the samples myDisplace() {    mag = texture( “dispmap” ); P += normalize(N) * mag;    N = calculatenormal(P); } 13
Shade Apply surface and light shaders to get the color myShader() {    txcol = texture( “pigment” );    Ci = diffuse(N,txcol); Oi = 1; } 14
Sample – the micropolys Form virtualmicropolygons at the grid samples 1 pixel Virtual micropolygons 15
Sample – sample points Multiple sub-samples at every pixel …choose a sampling method: regular, multi-jittered (as shown), etc. 16
Sample – gather samples Samples get the color of the micropolygons they touch …each sample can have many values if the mpolys are translucent ! 17
Sample – convolution Mix the samples together… …choose a filter: box, triangular, Gaussian, Sinc, etc.. 18
Sample – final pixel color The resulting “average” color is assigned to the pixel …repeat for every pixel 8) 19
RibTools: A RenderMan-style renderer R&D 20 * Killeroo model from headus Ltd., used with permission.
RibTools’ key features RenderMan compliant(…almost (^^;)) Parse RIB scene files C-like shaders compiler and VM Parametric surfaces, etc. Sub-pixel displacement mapping Open Sourced (BSD License) Multi-threaded Network-distributed “Future proof” SIMD Scalability ! 21
Distributed bucket rendering Multi-core CPU Remote servers ,[object Object]
 Buckets are assigned to threads on the CPU or to remote servers via TCP/IP
 Geometry, shaders and textures are also transferred via TCP/IPWorks today ! …it’s only a start. Needs optimizations, esp. network. .............. 22
Shader system A shading system is an essential part of a renderer Shader.sl Shader.rrasm myShader() {    txcol = texture( “pigment” );    Ci = diffuse(N,txcol); Oi = 1; } RSL Compiler __main: mov.vv       $v4    N    normalize    $v5    $v4 mov.vv       $v6    $v5 mov.vv       $v3    $v6 mov.vv       $v7    I faceforward  $v8    $v3    $v7    […] ,[object Object]
 RRASM is assembled and executed by the ShaderVirtual Machine (VM) when renderingShader VM 23
Shading and SIMD (1) Values in a grid are treated as arrays… … myDisplace() { P += N * mag; } … N = { RSL P = { RSL Compiler mul $v1 N  mag add PP  $v1 RRASM Shader VM v1 = SIMD_Mul( N, mag ); P= SIMD_Add(P, v1 ); C 24
Shading and SIMD (2) Vector SIMD_Add_FPU(Vector a, Vector b ) {    for (i=0; i < vec_size; i += 1)    { result[i] = a[i] + b[i];    }    return result; } 1x No hardware SIMD SIMD_Add() Vector SIMD_Add_SSE(Vector a, Vector b ) {    for (i=0; i < vec_size; i += 4)    { SSE_Add( &result[i], &a[i], &b[i] );    }    return result; } SSE SIMD_Mul() 4x … LRBni Vector SIMD_Add_LRB(Vector a, Vector b ) {    for (i=0; i < vec_size; i += 16)    { LRB_Add( &result[i], &a[i], &b[i] );    }    return result; } OpenCL, CUDA, ? 16x 25
…not fun to debug ! 26
Prospects for RibTools What role will REYES play for real-time ? The architecture bodes well with multi-core, vector processors or even GPGPU Displacement and curved surfaces are best with smaller-than-a-pixel polygons anyway Develop, learn and innovate Don’t let the others decide for you..Fully programmable graphics hardware is coming Off-line rendering ? Much more complex, but no real-time constraints DX11 tessellation ..almost micro-polygons! * RenderAnts: REYES on GPGPU Siggraph 2008, 2009 ** 27 * From Unigine’s Direct3D 11 tech demo  ** Image from RenderAnts renderer
Cons and problems Requires highly programmable hardware (best if with a flexible texture unit) The “RenderMan interface” is a fairly deep standard to follow Shader compilers, optimizers.. complex stuff Comes with other issues: Cracks when tessellating, non-planar micropolys, front plane clipping, etc. ..but someone’s got to try it 8) 28

Más contenido relacionado

La actualidad más candente

A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3
guest11b095
 
Real-Time Global Illumination Techniques
Real-Time Global Illumination TechniquesReal-Time Global Illumination Techniques
Real-Time Global Illumination Techniques
Jangho Lee
 
Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based Rendering
Electronic Arts / DICE
 

La actualidad más candente (20)

SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
SPU-Based Deferred Shading in BATTLEFIELD 3 for Playstation 3
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3
 
Stochastic Screen-Space Reflections
Stochastic Screen-Space ReflectionsStochastic Screen-Space Reflections
Stochastic Screen-Space Reflections
 
Terrain in Battlefield 3: A Modern, Complete and Scalable System
Terrain in Battlefield 3: A Modern, Complete and Scalable SystemTerrain in Battlefield 3: A Modern, Complete and Scalable System
Terrain in Battlefield 3: A Modern, Complete and Scalable System
 
Rendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderRendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb Raider
 
Star Ocean 4 - Flexible Shader Managment and Post-processing
Star Ocean 4 - Flexible Shader Managment and Post-processingStar Ocean 4 - Flexible Shader Managment and Post-processing
Star Ocean 4 - Flexible Shader Managment and Post-processing
 
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
 
Massive Point Light Soft Shadows
Massive Point Light Soft ShadowsMassive Point Light Soft Shadows
Massive Point Light Soft Shadows
 
Frostbite on Mobile
Frostbite on MobileFrostbite on Mobile
Frostbite on Mobile
 
DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3
 
Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in Frostbite
 
Real-Time Global Illumination Techniques
Real-Time Global Illumination TechniquesReal-Time Global Illumination Techniques
Real-Time Global Illumination Techniques
 
FrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in FrostbiteFrameGraph: Extensible Rendering Architecture in Frostbite
FrameGraph: Extensible Rendering Architecture in Frostbite
 
Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)
 
Moving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based RenderingMoving Frostbite to Physically Based Rendering
Moving Frostbite to Physically Based Rendering
 
Optimizing the graphics pipeline with compute
Optimizing the graphics pipeline with computeOptimizing the graphics pipeline with compute
Optimizing the graphics pipeline with compute
 
Lighting you up in Battlefield 3
Lighting you up in Battlefield 3Lighting you up in Battlefield 3
Lighting you up in Battlefield 3
 
OpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering TechniquesOpenGL 4.4 - Scene Rendering Techniques
OpenGL 4.4 - Scene Rendering Techniques
 
Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...
Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...
Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...
 

Destacado (12)

Pixar studio research
Pixar studio researchPixar studio research
Pixar studio research
 
Pixar Animation Studio
Pixar Animation StudioPixar Animation Studio
Pixar Animation Studio
 
Rendering crowds with Pixar’s RenderMan
Rendering crowds with Pixar’s RenderManRendering crowds with Pixar’s RenderMan
Rendering crowds with Pixar’s RenderMan
 
Ida Art
Ida ArtIda Art
Ida Art
 
Chinese warfare
Chinese warfareChinese warfare
Chinese warfare
 
Disney &amp; pixar merger
Disney &amp; pixar mergerDisney &amp; pixar merger
Disney &amp; pixar merger
 
Disney Pixar
Disney PixarDisney Pixar
Disney Pixar
 
Disney Pixar M&A
Disney Pixar M&ADisney Pixar M&A
Disney Pixar M&A
 
Disney pixar ppt.332194447
Disney pixar ppt.332194447Disney pixar ppt.332194447
Disney pixar ppt.332194447
 
Pixar
PixarPixar
Pixar
 
Disney Pixar case study
Disney Pixar case studyDisney Pixar case study
Disney Pixar case study
 
Disney & pixar
Disney & pixar Disney & pixar
Disney & pixar
 

Similar a Implementing a modern, RenderMan compliant, REYES renderer

Minko stage3d workshop_20130525
Minko stage3d workshop_20130525Minko stage3d workshop_20130525
Minko stage3d workshop_20130525
Minko3D
 
D3 D10 Unleashed New Features And Effects
D3 D10 Unleashed   New Features And EffectsD3 D10 Unleashed   New Features And Effects
D3 D10 Unleashed New Features And Effects
Thomas Goddard
 
Efficient LDI Representation (TPCG 2008)
Efficient LDI Representation (TPCG 2008)Efficient LDI Representation (TPCG 2008)
Efficient LDI Representation (TPCG 2008)
Matthias Trapp
 

Similar a Implementing a modern, RenderMan compliant, REYES renderer (20)

Advanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APIAdvanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics API
 
Introduction to Computer graphics
Introduction to Computer graphicsIntroduction to Computer graphics
Introduction to Computer graphics
 
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeksBeginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
 
Creating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector GraphicsCreating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector Graphics
 
"Moving CNNs from Academic Theory to Embedded Reality," a Presentation from S...
"Moving CNNs from Academic Theory to Embedded Reality," a Presentation from S..."Moving CNNs from Academic Theory to Embedded Reality," a Presentation from S...
"Moving CNNs from Academic Theory to Embedded Reality," a Presentation from S...
 
Custom SRP and graphics workflows - Unite Copenhagen 2019
Custom SRP and graphics workflows - Unite Copenhagen 2019Custom SRP and graphics workflows - Unite Copenhagen 2019
Custom SRP and graphics workflows - Unite Copenhagen 2019
 
Minko stage3d workshop_20130525
Minko stage3d workshop_20130525Minko stage3d workshop_20130525
Minko stage3d workshop_20130525
 
The Technology behind Shadow Warrior, ZTG 2014
The Technology behind Shadow Warrior, ZTG 2014The Technology behind Shadow Warrior, ZTG 2014
The Technology behind Shadow Warrior, ZTG 2014
 
Computer Graphics Part1
Computer Graphics Part1Computer Graphics Part1
Computer Graphics Part1
 
Point cloud mesh-investigation_report-lihang
Point cloud mesh-investigation_report-lihangPoint cloud mesh-investigation_report-lihang
Point cloud mesh-investigation_report-lihang
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
 
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
Beginning direct3d gameprogramming01_thehistoryofdirect3dgraphics_20160407_ji...
 
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time Raytracing
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time RaytracingSIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time Raytracing
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time Raytracing
 
Graphics pipelining
Graphics pipeliningGraphics pipelining
Graphics pipelining
 
D3 D10 Unleashed New Features And Effects
D3 D10 Unleashed   New Features And EffectsD3 D10 Unleashed   New Features And Effects
D3 D10 Unleashed New Features And Effects
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 
Efficient LDI Representation (TPCG 2008)
Efficient LDI Representation (TPCG 2008)Efficient LDI Representation (TPCG 2008)
Efficient LDI Representation (TPCG 2008)
 
lecture4 raster details in computer graphics(Computer graphics tutorials)
lecture4 raster details in computer graphics(Computer graphics tutorials)lecture4 raster details in computer graphics(Computer graphics tutorials)
lecture4 raster details in computer graphics(Computer graphics tutorials)
 
Rendering basics
Rendering basicsRendering basics
Rendering basics
 

Último

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 

Implementing a modern, RenderMan compliant, REYES renderer

  • 1. Implementing a modern, RenderMan compliant, REYES renderer Davide Pasca ribtools.com (contact: davide<at> ribtools.com) 1
  • 2. About REYES Reyes or REYES (Renders Everything You Ever Saw) A flexible renderer, developed by Lucasfilm CG div. (“Pixar” from 1986) First used in 1984 in Start Trek II ..still used today in Pixar’s Photorealistic RenderMan 2 * Images, from top, are copyright of Paramount Pictures and Pixar (subsidiary of The Walt Disney Company)
  • 3. RenderMan compliant ? Defines a renderer with some basic capabilities such as: A RenderMan graphics state machine Hidden surface elimination Pixel filtering and anti-aliasing User programmable shaders Texture mapping Etc… 3
  • 4. REYES features Native support for high level surfaces Dynamic LOD Compact representation Subdivide per-frame based on size on screen Displace geometry from textures High quality filtering Easier to deal with translucency, motion-blur, etc. Can be used together with ray-tracing 4
  • 6. Split (1) A parametric surface: P = f(u,v) Split until “small enough” size (estimated) on screen 6
  • 7. Split (2) Calculate the bounding box in screen-space …test against predetermined max screen area Here, the bounding box is too large.. 7
  • 8. Split (3) When too large, split the patch It’s easy with parametric primitives: Pnew = f(unew, vnew) New split points 8
  • 9. Split (4) Calculate the bounds of the new sub-patches Still too large 9
  • 10. Split (5) Split recursively until every sub-patch is “small enough”… Small enough.. this is ready to be diced 10
  • 11. What’s “Small Enough” ? When most sub-patches fit in a single bucket When dicing(see later) produces a suitable number of samples (sweet spot for performance) Sub-patch inside a single bucket Optimal Sub-patch touches two or more buckets Not Optimal A bucket 11
  • 12. Dice Small enough sub-patches are diced Generate a dense grid of samples (1 pixel-per-sample or more..) 1 pixel Small enough n_samples <= max_samples max_samples is set for performance reasons and to avoid distortion 12
  • 13. Displace Apply a displacement shader to the position of the samples myDisplace() { mag = texture( “dispmap” ); P += normalize(N) * mag; N = calculatenormal(P); } 13
  • 14. Shade Apply surface and light shaders to get the color myShader() { txcol = texture( “pigment” ); Ci = diffuse(N,txcol); Oi = 1; } 14
  • 15. Sample – the micropolys Form virtualmicropolygons at the grid samples 1 pixel Virtual micropolygons 15
  • 16. Sample – sample points Multiple sub-samples at every pixel …choose a sampling method: regular, multi-jittered (as shown), etc. 16
  • 17. Sample – gather samples Samples get the color of the micropolygons they touch …each sample can have many values if the mpolys are translucent ! 17
  • 18. Sample – convolution Mix the samples together… …choose a filter: box, triangular, Gaussian, Sinc, etc.. 18
  • 19. Sample – final pixel color The resulting “average” color is assigned to the pixel …repeat for every pixel 8) 19
  • 20. RibTools: A RenderMan-style renderer R&D 20 * Killeroo model from headus Ltd., used with permission.
  • 21. RibTools’ key features RenderMan compliant(…almost (^^;)) Parse RIB scene files C-like shaders compiler and VM Parametric surfaces, etc. Sub-pixel displacement mapping Open Sourced (BSD License) Multi-threaded Network-distributed “Future proof” SIMD Scalability ! 21
  • 22.
  • 23. Buckets are assigned to threads on the CPU or to remote servers via TCP/IP
  • 24. Geometry, shaders and textures are also transferred via TCP/IPWorks today ! …it’s only a start. Needs optimizations, esp. network. .............. 22
  • 25.
  • 26. RRASM is assembled and executed by the ShaderVirtual Machine (VM) when renderingShader VM 23
  • 27. Shading and SIMD (1) Values in a grid are treated as arrays… … myDisplace() { P += N * mag; } … N = { RSL P = { RSL Compiler mul $v1 N mag add PP $v1 RRASM Shader VM v1 = SIMD_Mul( N, mag ); P= SIMD_Add(P, v1 ); C 24
  • 28. Shading and SIMD (2) Vector SIMD_Add_FPU(Vector a, Vector b ) { for (i=0; i < vec_size; i += 1) { result[i] = a[i] + b[i]; } return result; } 1x No hardware SIMD SIMD_Add() Vector SIMD_Add_SSE(Vector a, Vector b ) { for (i=0; i < vec_size; i += 4) { SSE_Add( &result[i], &a[i], &b[i] ); } return result; } SSE SIMD_Mul() 4x … LRBni Vector SIMD_Add_LRB(Vector a, Vector b ) { for (i=0; i < vec_size; i += 16) { LRB_Add( &result[i], &a[i], &b[i] ); } return result; } OpenCL, CUDA, ? 16x 25
  • 29. …not fun to debug ! 26
  • 30. Prospects for RibTools What role will REYES play for real-time ? The architecture bodes well with multi-core, vector processors or even GPGPU Displacement and curved surfaces are best with smaller-than-a-pixel polygons anyway Develop, learn and innovate Don’t let the others decide for you..Fully programmable graphics hardware is coming Off-line rendering ? Much more complex, but no real-time constraints DX11 tessellation ..almost micro-polygons! * RenderAnts: REYES on GPGPU Siggraph 2008, 2009 ** 27 * From Unigine’s Direct3D 11 tech demo ** Image from RenderAnts renderer
  • 31. Cons and problems Requires highly programmable hardware (best if with a flexible texture unit) The “RenderMan interface” is a fairly deep standard to follow Shader compilers, optimizers.. complex stuff Comes with other issues: Cracks when tessellating, non-planar micropolys, front plane clipping, etc. ..but someone’s got to try it 8) 28
  • 33. References RibTools’ web site http://ribtools.com “The RenderMan Interface Specification” (aka RISpec) https://renderman.pixar.com/products/rispec/ “Rendering with REYES” (from Pixar) https://renderman.pixar.com/products/whats_renderman/2.html “Production Rendering” (Ian Stephenson Ed.) http://amazon.com/dp/1852338210 “Advanced RenderMan” (by A.Apodaca and L.Gritz) http://amazon.com/dp/1558606181 “The RenderMan Companion” (by Steve Upstill) http://amazon.com/dp/0201508680 30

Notas del editor

  1. Adaptive  てきおう 適応High quality こうひんしつ 高品質