render optimization & renderfarmtoi.bk.tudelft.nl/downloads/ar0771/ar0771_wk6... · render...
TRANSCRIPT
1
Render Optimization & Renderfarm Optimizing your scene for rendering and Using the renderfarm
Design Informatics
2 12 March 2014
Render Optimization& Renderfarm
• To model or not to model? • Modeling alternatives • Geometry detail • Cleaning your scene • Textures • Lighting strategy • Render Settings • Post-production vs Render-time
• BK Renderfarm
Lecture outline
3 12 March 2014
Render Optimization& Renderfarm
To model or not to model?
• Determine camera position(s) • Don’t model what you can’t see
• Don’t forget reflections • Consider simple textures for reflections
• Don’t model details that won’t be distinguished • Distance and size
4 12 March 2014
Render Optimization& Renderfarm
Modeling alternatives
• Using Textures • Color map • Bump map • Displacement map *
22 polygons with bump- and color map Total render time: 1 minute 58 seconds
52110 polygons Total render time: 3 minutes 6 seconds
5 12 March 2014
Render Optimization& Renderfarm
Geometry detail
• Try to keep the polycount as low as possible
• Relation to distance • Soften edges
Cylinders with 8 subdivisions Cylinders with softened vertical edges
6 12 March 2014
Render Optimization& Renderfarm
Instanced Geometry
• Use instances instead of normal copies where possible
7 12 March 2014
Render Optimization& Renderfarm
• Remove objects that are not needed • E.g. curves from AutoCAD
• Make sure there are not two or more objects in the same place
• Delete construction history
• Always keep an original version of your scene. Save your (stripped) render version using a different name
Cleaning your scene
8 12 March 2014
Render Optimization& Renderfarm
• Optimize Scene Size • Make a backup of your scene!
Cleaning your scene
9 12 March 2014
Render Optimization& Renderfarm
Shaders
• Glossy reflections are even more expensive • Especially when you need many ‘Glossy
Samples’
10 12 March 2014
Render Optimization& Renderfarm
• Use JPG images • RGB (CMYK won’t work) • Non-progressive
• Resolution
• Keep images as small as possible • Using ‘binary’, square sizes is most efficient
(e.g.: 64x64, 128x128, … 1024x1024 pixels)
• Consider distance. Textures on distant objects can be less detailed
Textures
11 12 March 2014
Render Optimization& Renderfarm
Optional for Mental Ray: • Convert large textures to .map files
• Faster to render • Allows Mental Ray to free memory when
needed (prevents out of memory errors)
Textures
12 12 March 2014
Render Optimization& Renderfarm
• TOI shelf -> TOI Texture tools
TOI Texture Tools
13 12 March 2014
Render Optimization& Renderfarm
• Conform texture locations • Fix problems with texture locations when
you forgot to set your Project once • Clean sourceimages folder
• Removes unused files; can reduce the total size of your project
TOI Texture Tools
14 12 March 2014
Render Optimization& Renderfarm
When using Mental Ray: 1. Convert images to .map 2. Update filenodes to use the new .map images
• Don’t forget to update the .map textures when
you change your textures.
TOI Texture Tools
15 12 March 2014
Render Optimization& Renderfarm
• Exterior day scene: Final Gather only • Exterior night scene: Global Illumination • Interior: Final Gather or Global Illumination
• When you need secondary diffuse bounces with several levels of extra reflections, Final Gather gets very inefficient: » Use Global Illumination
• When you’re using mainly artificial light or you need accurate artificial light behavior » Use Global Illumination
• Otherwise: » Use Final Gather
Lighting Strategy
16 12 March 2014
Render Optimization& Renderfarm
• Use ‘Additional Color’ instead of lights where possible
• It can be found in the ‘Advanced’ section
Lighting Strategy
17 12 March 2014
Render Optimization& Renderfarm
• Tuning Raytracing settings Raytracing is used by Global Illumination, Final Gather, Caustics,
reflections, refractions and in most cases to calculate shadows
• There is much to gain (or loose) Too conservative may yield inaccurate results Too aggressive may take too long to render
Render Settings - Raytracing
18 12 March 2014
Render Optimization& Renderfarm
• Reflections: Maximum number of times a ray will reflect
when calculating reflections
Render Settings - Raytracing
Images courtesy of Mental Images
0 reflections
1 reflections
2 reflections
19 12 March 2014
Render Optimization& Renderfarm
• Refractions: Maximum number of times a ray will refract
when calculating refractions Refractions occur when a ray goes through a
(semi-) transparent surface.
Render Settings - Raytracing
Image courtesy of Mental Images
20 12 March 2014
Render Optimization& Renderfarm
• Max Trace Depth: Maximum number of times of:
reflections + refractions
for a single ray
Render Settings - Raytracing
21 12 March 2014
Render Optimization& Renderfarm
• Shadows: Maximum number of times a ray will reflect
when calculating shadows This setting determines whether a shadow
appears in a reflection (of a reflection of a …)
Render Settings - Raytracing
Shadows 1
Shadows 2
22 12 March 2014
Render Optimization& Renderfarm
General • Don’t forget more specific Raytracing settings
for: • Lights • Global Illumination • Final Gather • Etc…
Render Settings - Raytracing
23 12 March 2014
Render Optimization& Renderfarm
• Optimizing your Final Gather settings can make a big difference
• Start with low settings and adjust as needed, constantly making test renderings
Render Settings – Final Gather
Image courtesy of Mental Images
24 12 March 2014
Render Optimization& Renderfarm
Accuracy • Start with 20 • Increase when image is full of spots • Use steps of 10 • Keep ‘in sync’ with Point Interpolation
Render Settings – Final Gather
25 12 March 2014
Render Optimization& Renderfarm
Point Density • Start with 0.6 for test renderings • Set to around 1.0 for final renderings • > 1.2 should normally not be needed • Use 0.8 for test rendering when results are very poor with
low Accuracy
Render Settings – Final Gather
26 12 March 2014
Render Optimization& Renderfarm
Point Interpolation • Pro: Cheap smoothening • Con: Not very accurate
• Set to about half of the Accuracy • Increase to 1x or 2x the Accuracy as desired
(if more accurate results aren’t required)
Render Settings – Final Gather
27 12 March 2014
Render Optimization& Renderfarm
Accuracy: 20 Point Density: 0.6 Point Interpolation: 10 Render time: 0m47
Render Settings – Final Gather
28 12 March 2014
Render Optimization& Renderfarm
Accuracy: 40 Point Density: 0.6 Point Interpolation: 20 Render time: 1m09
Render Settings – Final Gather
29 12 March 2014
Render Optimization& Renderfarm
Accuracy: 40 Point Density: 1.0 Point Interpolation: 20 Render time: 1m27
Render Settings – Final Gather
30 12 March 2014
Render Optimization& Renderfarm
Accuracy: 40 Point Density: 0.8 Point Interpolation: 40 Render time: 1m26
Render Settings – Final Gather
31 12 March 2014
Render Optimization& Renderfarm
Accuracy: 60 Point Density: 0.8 Point Interpolation: 40 Render time: 1m48
Render Settings – Final Gather
32 12 March 2014
Render Optimization& Renderfarm
Secondary Diffuse bounces • ‘expensive’ • Only enable it when it’s really necessary:
make test renderings
Render Settings – Final Gather
33 12 March 2014
Render Optimization& Renderfarm
Filter • Set to 1 if you have some very distinctive
bright spots in your image • Caused by reflections (and low accuracy)
Render Settings – Final Gather
34 12 March 2014
Render Optimization& Renderfarm
Going to ‘final resolution’: • Remember where the difficult parts of your
image are when rendering low resolution • Set the Render Settings to final resolution • Make a region rendering of the difficult
part(s) and adjust settings as required
Render Settings – Final Gather
35 12 March 2014
Render Optimization& Renderfarm
Anti-Aliasing is a process where jagged edges are smoothed to get nice results.
This is done by considering neighboring pixels and/or calculating ‘sub-pixels’ (sampling)
Render Settings – Anti-Aliasing
36 12 March 2014
Render Optimization& Renderfarm
• Sampling
Render Settings – Anti-Aliasing
37 12 March 2014
Render Optimization& Renderfarm
• Samples are at the corner of pixels
Render Settings – Anti-Aliasing
Images courtesy of Mental Images
38 12 March 2014
Render Optimization& Renderfarm
• Sampling
Render Settings – Anti-Aliasing
Images courtesy of Mental Images
39 12 March 2014
Render Optimization& Renderfarm
• Samples for Unified Sampling
• Test render: 0.25 – 0.8 • Final Render: 0.8 – 2.0
Render Settings – Anti-Aliasing
40 12 March 2014
Render Optimization& Renderfarm
• Samples for Adaptive Sampling
• Test render: -2 0 or -1 1 • Final Render: 0 2 with Contrast 0.05 – 0.01
Render Settings – Anti-Aliasing
41 12 March 2014
Render Optimization& Renderfarm
Contrast Treshold (Legacy mode Adaptive Sampling)
Mental Ray dynamically increases the sampling accuracy (up to the max value) when the contrast between samples is greater than a set value. This increases the sampling accuracy only when it’s needed.
Test render: default (0.1) Final Render: 0.05
Render Settings – Anti-Aliasing
42 12 March 2014
Render Optimization& Renderfarm
Multi-Pixel Filtering Samples need to be aggregated and translated
into pixels somehow. The Multi-Pixel Filter determines how this is done.
Render Settings – Anti-Aliasing
Image courtesy of Mental Images
43 12 March 2014
Render Optimization& Renderfarm
Multi-Pixel Filtering Box and triangle: simple but fast Gauss: very smooth Mitchell: sharper version of gauss (more ‘crispy’) Lanczos: even sharper (high contrast, often too sharp) Test render: Box or Triangle Final Render: Gauss, Mitchell or Lanczos
Render Settings – Anti-Aliasing
Box Triangle Gauss Mitchell Lanczos
44 12 March 2014
Render Optimization& Renderfarm
• Depth of Field (using Z-depth)
• Glow • Motion Blur • Color and level corrections • Finishing touches
Post-production vs Render-time
Color channel Z-depth channel
45 12 March 2014
Render Optimization& Renderfarm
• Set Mental Ray verbosity level to “progress messages” to see what MR is doing. This can help you to determine how to optimize your rendertime. » Render > Render Current Frame > Option Box
• Mental Ray diagnostic functions: • Diagnose Final Gather • Photon-map visualizer • BSP diagnostics
Mental Ray messages
46 12 March 2014
Render Optimization& Renderfarm
New addition to our farm: 2x Intel 10-core Xeon E5-2680v2 2.80 GHz processors Combined: 40 threads, 112 GHz
64 Gigabyte DDR3 memory
Using the Renderfarm
47 12 March 2014
Render Optimization& Renderfarm
Workflow: • Prepare your scene • Configure the renderfarm connector • Publish your scene • Submit the job(s) • Wait until your job has been processed • Get the results
Using the Renderfarm
48 12 March 2014
Render Optimization& Renderfarm
Image slicing: Pro: you can split the rendering of a single images
across multiple comuters: sometimes faster Con: Maya has to do the preprocessing and a part
of the main rendering process (such as calculating
Final Gather) multiple times instead of once: ‘waste’ of resources You can get some artifacts along the borders of the slices. Slicing does not work with post-processing effects such as glow.
Using the Renderfarm