V-Ray RT: Photorealistic Raytraced Rendering on...
Transcript of V-Ray RT: Photorealistic Raytraced Rendering on...
V-Ray RT: A New Paradigm in Photorealistic Raytraced Rendering on
NVIDIA GPUs
Vladimir KoylazovChaos Software
www.chaosgroup.com
V-Ray RT GPU demonstration
● V-Ray RT GPU demonstration
www.chaosgroup.com
V-Ray RT GPU architecture overview
● Goals of V-Ray RT GPU– To allow faster iterations and to speed up lookdev– To produce final frame output
● Requirements– Interactive response to scene adjustment– Distributed rendering– Production-oriented features
● Motion-blur● Render elements● Various non-physical features (invisible objects, lights etc)
www.chaosgroup.com
V-Ray RT GPU architecture overview
● Distributed rendering architecture
Server machine
Client machine
Server machine
Modeling app
V-Ray translator
V-Ray renderer
Render server
V-Ray renderer
GPU
GPUTCP/IP
Render server
V-Ray renderer
GPU
GPU
TCP/IP
www.chaosgroup.com
V-Ray RT GPU architecture overview
● Render client– Performs initial scene translation to V-Ray plugins– Tracks user changes to the scene and records them– Holds and displays the frame buffer with the rendered image
● Render server– Downloads the initial scene– Receives scene changes and applies them to the local scene – Requests data to compute– Passes back the results
www.chaosgroup.com
GPU implementation details
● The smallest unit of work is an image sample● The render server requests a bunch of samples to compute from
the render client● The samples are uploaded on the GPU● GPU calculates the color values for these samples● The resulting colors are downloaded and sent back to the render client● The render client assembles the samples and displays the final image
www.chaosgroup.com
GPU implementation details
● Maximizing the GPU load– We need to keep the GPU busy as much as possible– We use multiple threads to prepare data for one GPU– Each thread uses a separate CUDA stream to work with the
GPU● Some tasks can be performed in parallel
www.chaosgroup.com
GPU implementation details● Maximizing the GPU load
– Multiple threads work independently with the same GPU
Render server
Render clientThread 0
Thread 1
Thread 7
GPU
www.chaosgroup.com
GPU implementation details● The result is that the GPU works constantly on full load
CPU
GPU
CPU
GPU
CPU0
GPU
CPU1
GPU
CPU2
GPU
CPU
GPU
CPU
GPU
GPU
GPU
CPU0
CPU1
GPU
CPU2
GPU
CPU0
GPU
CPU1
GPU
CPU2
www.chaosgroup.com
Raytracer model
● Algorithm– Unbiased path tracing
● We could do biased, but not much point in that– Adaptive image sampling guided by the CPU
(show adaptive mask)– Multibounce adaptive sampling is in the works
● Faster convergence for e.g. caustics● Ray intersections
– Binary kd-tree for non-instanced geometry– Motion kd-tree for non-instanced animated geometry (motion blur)– BVH + kd-trees for instanced geometry
www.chaosgroup.com
Raytracer model● Example of instanced geometry
www.chaosgroup.com
Raytracer model● Lights
– Fixed number of light sources (point lights, directional, area lights, dome lights with IBL)
● Layered BSDF model– Fixed number of physically plausible BSDF models
● Diffuse, Phong, Blinn, Ward, blurry refraction● SSS and volumetrics in the works
– BSDFs can be layered for complex materials● Car paint shaders● Plastics shaders● …
– BSDF properties are controlled through (procedural) textures
www.chaosgroup.com
Raytracer model● Complex car paint material with layered BRDFs
www.chaosgroup.com
Raytracer model● Textures
– In even simple scenes, texture trees can be very complex● Bitmaps, blends, color corrections etc.
– In C++, this is easy to implement through virtual functions● Virtual functions are available in CUDA, but peformance
is not very good● They are not available in OpenCL
– Our solution: a very simple stack-based high-level virtual machine which interprets texture shaders on the GPU
● A complex texture tree is compiled into a sequence of tex-ture VM instructions
● Each V-Ray texture plugin can provide its description as instructions for the texture VM
● A bitmap read is one single texture VM instruction
www.chaosgroup.com
Raytracer model● An example of a complex texture tree
www.chaosgroup.com
Raytracer model● One-pass render elements
– Utility elements:● Z-depth, normal
– Lighting elements:● Direct lighting, GI
– Material elements:● Diffuse, reflections, refractions
● Frame buffers are not stored on the GPU, so large resolution renders are possible
www.chaosgroup.com
Raytracer model● One-pass render elements
www.chaosgroup.com
Questions?
● ???
www.chaosgroup.com