SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Johan Andersson
 

What's hot (20)

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
 
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
More Performance! Five Rendering Ideas From Battlefield 3 and Need For Speed:...
 
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
 
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
 
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
 
Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016Optimizing the Graphics Pipeline with Compute, GDC 2016
Optimizing the Graphics Pipeline with Compute, GDC 2016
 
Shadows & Decals: D3D10 Techniques in Frostbite (GDC'09)
 	 Shadows & Decals: D3D10 Techniques in Frostbite (GDC'09) 	 Shadows & Decals: D3D10 Techniques in Frostbite (GDC'09)
Shadows & Decals: D3D10 Techniques in Frostbite (GDC'09)
 
An introduction to Realistic Ocean Rendering through FFT - Fabio Suriano - Co...
An introduction to Realistic Ocean Rendering through FFT - Fabio Suriano - Co...An introduction to Realistic Ocean Rendering through FFT - Fabio Suriano - Co...
An introduction to Realistic Ocean Rendering through FFT - Fabio Suriano - Co...
 
Checkerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCCheckerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOC
 
Triangle Visibility buffer
Triangle Visibility bufferTriangle Visibility buffer
Triangle Visibility buffer
 
Rendering Tech of Space Marine
Rendering Tech of Space MarineRendering Tech of Space Marine
Rendering Tech of Space Marine
 
Lighting the City of Glass
Lighting the City of GlassLighting the City of Glass
Lighting the City of Glass
 
DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3
 
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
 
Frostbite on Mobile
Frostbite on MobileFrostbite on Mobile
Frostbite on Mobile
 
Voxel based global-illumination
Voxel based global-illuminationVoxel based global-illumination
Voxel based global-illumination
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
 
Hair in Tomb Raider
Hair in Tomb RaiderHair in Tomb Raider
Hair in Tomb Raider
 
Precomputed Voxelized-Shadows for Large-scale Scene and Many lights
Precomputed Voxelized-Shadows for Large-scale Scene and Many lightsPrecomputed Voxelized-Shadows for Large-scale Scene and Many lights
Precomputed Voxelized-Shadows for Large-scale Scene and Many lights
 
Dx11 performancereloaded
Dx11 performancereloadedDx11 performancereloaded
Dx11 performancereloaded
 

Viewers also liked (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 to 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
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
amitsarda3
 

Similar to 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...
 
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
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
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...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
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
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

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

Editor's Notes

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