From BlenderWiki

Jump to: navigation, search

Rendering Big Hairy Scenes or Speeding Up Rendering

Expected Quality Render Times on an Octocore Machine

"A watched pot never boils" is the old saying, but you may wonder why your render takes so long to create, or worse, crashes mid-way through! Well, there is lots going on and lots you can do to speed up rendering or enable a complicated render to complete. Also, it is possible to render a very complicated scene on a mediocre PC by being "render-smart". Here's a "top ten" list of things to do or not do in order to speed up rendering or even avoid crashes on scene render. Some options may decrease the quality of your render, but for draft renders you may not care.

If you get the message "Malloc returns nil", in plain english that means the memory allocator tried to get more physical memory for Blender but came back empty-handed. This means that you do not have enough memory available to render the scene, and Blender cannot continue. You will need to do one or more of the following tasks on this page in order to render.

Hardware Improvements

  1. Get more RAM up to your PC's (motherboard and operating system) limit. Presently, Blender can use up to 8GG (giga-giga) of physical memory (64-bit address space), but most PC's can only handle 4G of RAM.
  2. Upgrade your CPU to a multi-core/multiprocessor
  3. Upgrade your OpenGL video drivers
  4. Get a faster memory bus
  5. Get faster memory, up to yor PC's motherboard limit. 667MHz memory is 30% slower than 800MHz.
  6. Use or set up a render farm using all available PC's in your house, or use a render farm such as BURP.

Operating System Configuration

  1. Increase the processing priority through your OS
  2. Increase your swap file space used by the OS for memory swapping. Also called virtual memory pagefile size, up to the size of your physical memory.
  3. Upgrade to a 64-bit operating system
  4. Exit or stop any background processes, like virus scanners, BOINC, Real, even "inactive" ones like Quicktime, as they can randomly start up to look for updates. They also take up RAM.
  5. Disable network connections to stop random pinging traffic and refresh traffic
  6. Stop listening to internet radio and close web browsers, especially any multi-media (audio/video/game) sites.
  7. Close down all other running applications, like Word
  8. Exit all TSRs (those icons on your system tray) and widgets, any background processes, and virus scanners

Blender Choices

  1. Increase the MEM Cache Limit in the User Preferences System & OpenGL tab
  2. Upgrade to an optimized Blender build, especially if you have a modern chip that supports SSE2 - render times are 30% faster using an optimized build.
  3. Switch to an Orthographic camera, and render your own "parts" of the scene as separate images, and then paste those parts together in GIMP. An old trick in making your own panoramic with a real camera is to take three or so pictures of a very wide (beach sunset) scene, where you take one picture, rotate to the right, snap another, then another, and when you get the pictures developed, you overlap them to make a very wide landscape image. Do the same in Blender; render out one shot to a file, then move the camera to look at a different area of the scene, and render that shot. Each shot will be of a smaller area and thus take in fewer polygons/faces. Be sure that when you position your camera that you snap overlapping shots, so that you can then match them up. If you don't want to use GIMP, you can use compositing nodes and the Translate node to match them up in Blender.
  4. Minimize the render window (and Blender if rendering to an internal window). ATI users report dramatic speedup on a per frame basis, which adds up over frame range.
  5. Use the Big Render script to render sub-sections of the overall image, and then paste them together.
  6. Make a customized build. For example, comment out calls to check_non_flat_quads in convertblender.c, in some cases can make a noticeable difference 20-40%

Scene and Specific Objects

  1. Remove lamps, or move them to un-rendered layers, or tie them to layers
  2. Turn off some lamp's shadows, using only one or two main sun lamps to cast shadows. A few "shadows only" lights will render faster than every light having shadows on.
  3. Use Buffer Shadows rather than Raytraced Shadows
  4. Bake your shadows using Render Baking Full Render bake on surfaces that do not move. Using that texture for that mesh, then disable shadows for that material.
  5. Simplify meshes (remove polygons). The more vertices you have in camera, the more time it takes to render.
  6. Remove Doubles, or use the Decimator mesh edit feature.
  7. Remove Subsurf and Multires modifiers
  8. Delete backsides of meshes (removing unseen vertices)
  9. Render just a few objects at a time; in the beginning of your project, render the background objects and set that will not change and will always be in the background.
  10. Put the buildings on another layer, and through renderlayers, don't render them. Then composite them back in later.
  11. Make the camera static so that you can better accomplish the above two ideas.
  12. Avoid use of Area lights
  13. Make materials Shadeless
  14. Render Bake AO and textures, and then make those materials Shadeless
  15. Decrease the Clip distance for spot lights
  16. Decrease the Clip distance for the camera
  17. Turn off world AO
  18. Turn off Material SSS
  19. Use smaller image textures. A 256x256 image takes only 1% of the memory that a 2k image does, often with no loss of quality in the ulitmate render.
  20. Reduce Subsurf. Each level quadruples (4x) the number of faces from the previous level.
  21. Reduce Multires
  22. Make a matte render of background objects, like buildings, and put the image of them on a billboard in the scene instead of the object themselves. This will reduce vertex/face count
  23. if you have lots of linked instances of an object - use DupliFaces, as these are instanced. If you have 100 of them, Blender will only store the geometry for 1 (Instances themselves take a small amount of memory).

Render Settings

  • Output Panel
    1. Disable Edge rendering.
    2. Save Buffers
    3. Render to an Image Editor window, not a popup Render Window.
    4. Use multiple Threads on a multi-core CPU (with multiple Parts).
  • Render Layers Panel
    1. Render only the Layers of interest.
    2. Render with all lights set to one simple spot (enter its name in the Light: field)
    3. Render with one material override (enter its name in the Mat: field)
    4. Disable unnecessary Render Passes, such as Z, or only render the pass of interest, such as Diffuse.
  • Render Panel
    1. Turn off Shadows
    2. Turn off Environment Mapping
    3. Turn off Panoramic Rendering
    4. Turn off Raytracing
    5. Turn off Radiosity
    6. Turn off SSS Subsurface Scattering
    7. Turn off or lower oversampling/aliasing OSA
    8. Turn off or lower Motion Blur
    9. Render in Parts. This will also allow you to render HUGE images on a weak PC. On a multi-core PC, it will assign a thread to each part as well.
    10. Increase the octree resolution
    11. Render at a percentage size of your final resolution (like 25%)
    12. Turn off Fields rendering.
    13. Use Border rendering to render a subset of the full image.
  • Anim Panel
    1. Decrease the frame count of the animation (and use a lower framerate for the same duration of animation). For example, render 30 frames at 10 frames per second for a 3-second animation, instead of 75 frames at 25 frames per second.
  • Bake Panel
    1. Bake Full Render - create a UV Texture that colors the objects based on materials, and then use that UV Texture shadeless instead of the material - 7x faster:


    2. Bake Ambient Occlusion only
    3. Bake textures for objects
    4. Baking Normals or Displacement does not speed up render time, and are used for other things.
  • Format Panel
    1. Render at a lower resolution. Smaller pictures take less time to render.
    2. Choose a faster CODEC or CODEC settings
    3. Render in black and white (BW button)
    4. If using FFMPEG, do not activate Multiplex audio
    5. If using FFMPEG, Autosplit Output (Video panel button)
    6. Render only RGB if you need color; the A channel (RGBA button) takes more memory and is unused when saving a movie file.

Another Way To Do It: Compositing

Another strategy that can be used to address the problem of long (re-)render times is to structure your workflow from the ground up so that you make aggressive use of compositing, as described in the "Post-Production" section. In this approach, you break down each shot into components that can be rendered separately, then you combine those separately-rendered elements to achieve the finished clip. For instance:

  • If the camera isn't moving, then neither is the background: only a single frame is needed. (The same is true of any non-moving object within the frame.) These individual elements, having been generated once, can be re-used as many times as necessary over as many frames as necessary.
  • Both shadows and highlights can be captured separately from the objects that are being illuminated or shadowed, such that the intensity, color, and depth of the effect can be adjusted later without re-rendering.
  • Start by using lights that do not cast shadows. (Shadow calculations are big time-killers.) Then, use "shadow-only" lights (which cast shadows, but do not cast light) to create shadows only where you judge that they are actually necessary. (It is very often the case that only a few of the shadows which could exist in the scene actually matter, and that the rest of them simply won't be noticed.)
  • Tricky lighting situations can be avoided by handling the objects separately, then combining the individually-rendered clips and "tweaking" the result.

This is a very familiar idea. Modern sound-recordings, for example, always use a "multi-track" approach. Individual components of the song are captured separately and in isolation, then the components are "mixed" together. The "final mix" then goes through additional processing stages, called mastering, to produce the finished product(s). (In fact, the features and design of modern sound-processing software are directly comparable to that of Blender's node-based compositor.)

There are compelling advantages to this approach:

  • You have options. If something is "not quite right," you don't necessarily have to start over from scratch.
  • In practice, the deadline-killer is re-rendering, which ordinarily must be done (in its entirety) just because "'one little thing' about the shot is wrong." Compositing helps to avoid this, because (ideally...) only the specific parts that are found to be in error must be repeated. (Or, maybe, the error can be blocked-out with a "garbage matte" and a corrected version can be inserted in its place. No one will ever know!)
  • It's also possible that you find yourself saying, "okay, that's almost what I wanted, but now I'd like to add this and maybe take away that." A compositing-based approach enables you to do just that, and furthermore, to do so non-destructively. In other words, having generated the "addition" (or the "mask") as a separate channel of information, you can now fine-tune its influence in the overall "mix," or even change your mind and remove it altogether, all without permanently altering anything.
  • By and large, these stages work two-dimensionally, manipulating what is by that time "a raster bitmap with R, G, B, Alpha (transparency...) and Z-Depth information," so they're consistently fast.
  • Since each discrete rendering task has been simplified, the computer can carry them out using much less resources.
  • The tasks can be distributed among several different computers ... even less-powerful ones (like the two older machines that are sitting in your closet right now because you can't get rid of them).
  • "After all, the scene doesn't actually have to be physically perfect, to be convincing." A compositing-based approach lets you take full advantage of this. You can focus your attention (and Blender's) upon those specific aspects of the scene which will actually make a noticeable difference. It is possible to save a considerable amount of time by consciously choosing to exclude less-important aspects which (although "technically correct") probably won't be noticed.

Of course, this approach is not without its own set of trade-offs. You must devise a workable asset-management system for keeping track of exactly what material you have, where it is, whether it is up-to-date, and exactly how to re-create it. You must understand and use the "library linking" features of Blender to allow you to refer to objects, nodes, materials, textures and scenes in a carefully-organized collection of other files. You need to have a very clear notion, in advance, of exactly what the finished shot must consist of and what the task-breakdown must be. You must be a scrupulous note-taker and record-keeper. But sometimes this is the best way, if not the only way, to accomplish a substantial production.



Introduction
What is Blender?
Introduction
Blender’s History
License
Blender’s Community
About this Manual
What's changed with Blender 2.4
Installing Blender
Introduction
Python
Installing on Windows
Installing on GNU/Linux
Installing on Mac
Installing on other Operating Systems
Configuring Blender
Directory Layout
Starting
The Interface
Introduction
Keyboard and Mouse
Window System
Arranging frames
Headers
Console window
Window Types
Screens (Workspace Layouts)
Scenes
Configuration
Modes
Contexts
Menus
Panels
Buttons and Controls
Internationalization
Your First Animation
1/2: A static Gingerbread Man
2/2: Animating the Gingerbread Man
The Vital Functions
Quick render
Undo and Redo
Default scene
Screenshots
Help!
Setting Preferences
Configuring Preferences
Interface
Editing
Themes
File
System
Interaction in 3D
Introduction
Introduction
Navigation
Introduction
3D View
3D View Options
3D View Usage
Camera View
Layers
Local or Global View
Sketch in 3D Space
Introduction to Grease Pencil
Drawing sketches
Layers and Animation
Converting sketches to geometry
Transformations
Introduction
Basics
- Grab/Move
- Rotate
- Scale
- Gestures
Advanced
- Mirror
- To Sphere
- Shear
- Warp
- Push/Pull
Transform Control
Introduction
Precision of Transformations
Numeric Transformations
Transform Properties
Reset Object Transforms
Manipulators
Transform Orientations
Axis Locking
Pivot Point
- Active object
- Individual Centers
- 3D Cursor
- Median Point
- Bounding Box Center
Snapping
Snap to Mesh
Proportional Edit
Data System and Files
Blender's Data System
Blender's Library and Data System
Blender's Datablocks
Scenes
Working with Scenes
The Outliner Window
Appending and Linking
File operations
Introduction
Opening blender files
Saving blender files
Modeling
Introduction
Introduction
Objects
Objects
Selecting Objects
Editing Objects
Groups and Parenting
Tracking
Duplication
- DupliVerts
- DupliFaces
- DupliGroup
- DupliFrames
Mesh Objects
Meshes
- Mesh Structures
- Mesh Primitives
Selecting
- Selectable Elements
- Selection Basics
- Advanced Selecting
- Selecting Edges
- Selecting Faces
Editing
Basic Editing
- Translation, Rotation, Scale
- Adding Elements
- Deleting Elements
- Creating Faces and Edges
- Mirror editing
Vertex Editing
Edge Editing
Face Editing
Deforming Tools
- Mirror
- Shrink/Fatten Along Normals
- Smooth
- Noise
Duplicating Tools
- Duplicate
- Extrude
- Extrude Dup
- Spin
- Spin Dup
- Screw
Subdividing Tools
- Subdivide
- Subdivide fractal
- Subdivide smooth
- Loop Subdivide
- Knife Subdivide
- Bevel
Miscellaneous Tools
Retopo Tool
Sculpt Mode
Multi Resolution Mesh
Vertex Groups
Weight Paint
Mesh Smoothing
Curve Objects
Curves
Selecting
Editing
Advanced Editing
Surface Objects
Surfaces
Selecting
Editing
Text Objects
Texts
Editing
Meta Objects
Metas
Editing
Empty Objects
Empties
Group Objects
Groups
Scripts
Modeling Scripts
Modifiers and Deformation
Introduction
Introduction
Modifiers Stack
Modify
UVProject
Generate
Array
Bevel
Booleans
Build
Decimate
EdgeSplit
Mask
Mirror
Subsurf
Deform
Armature
Cast
Curve
Displace
Hooks
Lattice
MeshDeform
Shrinkwrap
SimpleDeform
Smooth
Wave
Simulate
Cloth
Collision
Explode
Fluid
Particle Instance
Particle System
Soft Body
Lighting
Introduction
Introduction
Lights
Introduction
Light Properties
Light Attenuation
Light Textures
What Light Affects
Lights In Other Contexts
Shadows
Introduction
Shadow Properties
Raytraced Shadow Properties
Volumetric Lights
Introduction
Lamps
Introduction
Lamp Light
- Raytraced Shadows
Spot Light
- Raytraced Shadows
- Buffered Shadows
- Halos
Area Light
- Raytraced Shadows
Hemi Light
Sun Light
- Raytraced Shadows
- Sky & Atmosphere
Lighting Rigs
Radiosity
Introduction
Rendering
Baking
Scene Light
Ambient Light
Ambient Occlusion
Exposure
Exposure
Materials
Introduction
Introduction to Shading
Materials Introduction
Usage
Assigning a material
Material Preview
Material Options
Multiple Materials
Properties
Diffuse Shaders
Specular Shaders
Ambient Light Effect
Color Ramps
Raytraced Reflections
Raytraced Transparency
Subsurface Scattering (SSS)
Strands
Node Materials
Material Nodes
Nodes Editor
Node Controls
Nodes usage
Nodes Groups
Material Node Types
- Input Nodes
- Output
- Color
- Vector
- Convertor
- Dynamic
Vertex Paint
Using Vertex Paint
Halos
Halos
Textures
Introduction
Introduction
UV/Image Editor
Common Options
Texture Stack
Texture Types
Texture Types
Procedural Textures
Image Textures
Video Textures
Texture Nodes
- Nodes Editor
- Node Controls
- Nodes usage
- Nodes Groups
-- Textures Input Nodes
-- Textures Output Nodes
-- Textures Color Nodes
-- Textures Patterns Nodes
-- Textures Textures Nodes
-- Textures Convertor Nodes
-- Textures Distort Nodes
Texture Plugins
Texture Painting
Painting the Texture
- Projection Paint
Mapping
Mapping
Environment Maps
UV Unwrapping Explained
- Unwrapping a Mesh
- Managing the UV Layout
- Editing the UV Layout
- Applying an Image
Influence
Influence
- Material
-- Bump and Normal
-- Displacement
- Particles
- World
World and Ambient Effects
World
Introduction
World Background
Ambient Effects
Mist
Stars
Rigging
Introduction
Introduction to Rigging
Armatures
Armature Objects
Panels overview
Bones
Visualization
Structure
Selecting
Editing
- Bones
- Properties
- Sketching
- Templating
Skinning
Introduction
Linking Objects to Bones
Skinning to Objects’ Shapes
Retargeting
Posing
Introduction
Visualization
Editing Poses
Pose Library
Using Constraints
Inverse Kinematics
Constraints
Introduction
Introduction
Constraints Common Interface
Constraints’ Stack
Transform Constraints
Copy Location
Copy Rotation
Copy Scale
Limit Distance
Limit Location
Limit Rotation
Limit Scale
Transformation
Tracking Constraints
Clamp To
IK Solver
Locked Track
Stretch To
Track To
Relationship Constraints
Action
Child Of
Floor
Follow Path
Null
Rigid Body Joint
Script
Shrinkwrap
Animation
Introduction
Introduction
The Timeline
Markers
3D Views
Animation Editors
Animation Editors
Ipo Editor
Ipo Curves and Keyframes
Ipo Datablocks
Ipo Types
Ipo Editor Interface
Editing
- Ipo Curves
- Keyframes
Ipo Drivers
Action Editor
Editing Action Channels
NLA Editor
Editing NLA Strips
Strip Modifiers
Animation Techniques
Introduction
Animating Objects
- Using Constraints
- Moving Objects on a Path
Animating Shapes
- Shape Keys
- Editing Shape Keys
- Animating Shape Keys
- Shape Keys Examples
Indirect Shape Animation
Animating Armatures
- Stride
Animating Lamps
Animating Cameras
Animating Materials
Animating Textures
Animating World
Physical Simulation
Introduction
Introduction
Dynamics
Force Fields
Collisions
Particles
Particles
Types
Physics
- Newtonian
- Keyed
- Boids
Visualization
Controlling Emission, Interaction and Time
Cache & Bake
Hair
Children
Vertex Groups
Particle Mode
Soft Body
Introduction
Exterior Forces
Interior Forces
Collisions
Simple Examples
Combination with Armatures
Combination with Hair Particles
Reference
Cloth
Introduction
Fluids
Fluid
Using the Game Engine
Using the Game Engine
Rendering
Introduction
Introduction
Camera
The Camera
Perspective (Vanishing points)
Depth Of Field
Render
Displaying Renders
Basic Options
Antialiasing (Oversampling)
Rendering Animations
Panoramic
Render Baking
Using the Command Line
Output
Output
Video Output
Effects and Post Processing
Introduction
Render Layers
Render Passes
Edges & Toon
Stamp
Color Management & Exposure
Depth Of Field
Motion Blur
Render Performance
Rendering Performance
Distributed Rendering
External Render Engines
Introduction
YafRay
Compositing with nodes
Composite Nodes
Introduction
Nodes Editor
Node Controls
Nodes usage
Nodes Groups
Composite Node types
Composite Node types
Input Nodes
Output Nodes
Color Nodes
Vector Nodes
Filter Nodes
Convertor Nodes
Matte Nodes
Distortion Nodes
Editing Sequences
Introduction
Introduction
The sequencer
Usage
Sequencer Modes
Sequence Screen Layout
Effects
Built-in Effects
Plugin Effects
Audio
Audio Sequences
Extending Blender
Introduction
Introduction
Python Scripting
Python Scripting in Blender
Setting up Python
The Text Editor
A working example
References
Python Scripts
Script Catalog
Bundled Scripts
Plugins
Blender's Plugins System
Texture plugins specifications
Sequence plugins specifications
Game Engine
Introduction
Introduction
The Logic Editor
Usage
Game Properties
Sensors
Introduction
Sensor Types
Controllers
Introduction
Expressions
Actuators
Introduction
Action
Camera
CD
Constraint
Edit Object
Ipo
2D Filters
Game
Message
Motion
Parent
Property
Random
Scene
Shape Action
Sound
State
Visibility
Cameras
Cameras
Dome Camera
Physics
Physics Engine
Material Physics
Object Types
- Static
- No Collision
- Dynamic
- Rigid Body
- Soft Body
- Occluder
- Sensor
Python API
Bullet physics
VideoTexture
Various resources
List of Features
External resources
Game Engine Basics (BSoD Tutorial)
FAQ