From BlenderWiki

Jump to: navigation, search

If you want to document Blender 2.5 features please edit pages under Doc:2.5/Manual.

If a "2.5" page doesn't exist please copy the text from 2.4x Manual and edit the new page (i.e. you should paste the wikitext from this 2.4x page to this new 2.5x page and then update the latter with 2.5 features)

We know that around the world, our users have PC's of widely varying power. Rendering is the process in CG that can chew up CPU and disk space like no tomorrow. Especially in corporate environments, it is easy to fill up terabyte servers by uploading ten hour-long DV tapes and doing some editing. So, there are lots of options try to shoehorn a big job into a small PC by providing you with multiple sets of options that chunk up the work as best we can, while still preserving image integrity.

This page discusses the main options found on the Render panel, and subsequent pages give you more.

[edit] Shadow

Enable this button to compute and render shadows. Shadows are cast by shadow-casting lights and are received by shadow-able materials. The results of this calculation are made available in the Shadow render pass. For more information on lights, materials, or render passes, please consult the application sections of the wiki.

[edit] EnvMap

Environmental mapping changes the background and color of objects based on the light cast by the world environment maps. Enable for more realistic rendering.

[edit] Raytracing

Raytracing is a more precise method of computing the color of a surface, especially reflective surfaces. It is enabled by clicking the Ray button.

[edit] Octree resolution

Mode: All Modes

Panel: Render Context → Render

Hotkey: F10

When raytracing a really big scene with small objects, render times can grow exponentially. To help keep render times down (but use more memory), you can increase the Octree memory allocation. When Raytracing is enabled (Ray button, next to Render button on the Render panel), the Octree select appears at the bottom of the panel, with selectable settings ranging up to 512.

The OctTree is a ray-tracing acceleration structure. It subdivides the whole scene into a regular 3D grid of cells and places every polys of every objects into their corresponding cell. When rendering, it is quicker to determine which cell a ray is intersecting and then test the polys in those cells instead of testing every polys in the scene.

When you have a large low-poly scene with a small high-poly model in the middle, if the octtree resolution is too small, most of the scene's poly that comes from the small high-poly model, end up in a very small number of cells. And so, even though it is relatively quick to figure which cell to test, when a cell contains a large number of polys, we gained nothing because all those polys must be tested.

On the other hand, if the octtree resolution is too large for a given scene, then the raytracer looses time checking for cells that contains no polys. That is why each scene have its own octtree resolution sweet spot that must be found experimentally.

So, use a high setting for a large open space with small areas that have high-poly structures, and low settings for scenes where the polys (faces) are evenly distributed. For more information, consult the Release Notes for Octree resolution

[edit] Radiosity

When light hits an object, some color spectrum of the light is absorbed and other colors are reflected to our eyes. Radiosity is when that light also hits an object close to it, giving color to it, which then in turn is sent to our eyes. Sometimes called color bleeding, because the color of one object bleeds onto the one next to it, radiosity gives much more photorealism.

[edit] Percentage Size

Calculating a full size image takes time. For interim renders, Click the 75%, 50% or 25% boxes to render a smaller image (which takes less time). When looking at the render window, you can always expand it and roll your mousewheel to zoom in / expand the image.

[edit] Parts Rendering

Mode: All Modes

Panel: Render Context → Render

Hotkey: F10

[edit] Description

It is possible to render an image in pieces, one after the other, rather than all at one time. This can be useful for very complex scenes, where rendering small sections one after the other only requires computation of a small part of the scene, which uses less memory.

On a multi-core CPU, each part is assigned to a CPU/core, so setting up multiple parts, coupled with increasing the number of threads, speeds up render time by using all of your PC's processing power.

[edit] Options

Rendering by parts buttons (F10).
By setting values different from 1 in the Xparts and Yparts NumButtons in the Render Panel (Rendering by parts buttons.), you force Blender to divide your image into a grid of Xparts times Yparts sub-images, which are then rendered one after the other and finally assembled together.

Memory is allocated per thread; with each thread doing a full tile render. Almost all geometry (render faces/vertices) is checked for each tile it renders, giving some extra overhead. There's also thread tables for AO and area-shadow lamp sampling, precalculated and allocated in advance. Lastly; there's still quite some locking going on, for each memory allocation call to the operating system (malloc) for example.

A quick rule-of-thumb is to make sure the total number of threads renders less than one quarter of the entire image, to prevent too much memory allocated:

8 threads: use 64 tiles (for example, X and Y Parts = 8) 16 threads: use 128 tiles 128 threads: use 1024 tiles

Whether such giant amount of tiles (1024) gives unacceptable overhead is unknown, but quite likely. If you use heavy raytracing on relatively simple scenes it might work though. Again, if the tiles are square in terms of pixels, then Save Buffers can be used to ease memory.

[edit] Limitations & Work-arounds

Blender cannot handle more than 64 parts in the Y direction

[edit] Panoramic Rendering

Mode: All Modes

Panel: Render Context → Render

Hotkey: F10


[edit] Description

To obtain nice panoramic renderings, up to 5 times (!) a full 360° view of the horizon, Blender provides an automatic procedure.

[edit] Options

"Pano" Button.

You can, by decreasing the focal length of your camera, get a wider field of view, up to 173° (length of 1mm), but at cost of huge distortions in the image ("fish-eye" effect); furthermore, you won't be able to get wider than these 173°.

But Blender is able to render an image showing a 1800° panorama (5 full rotations) of the scene, as if the camera was rotating around its Y axis, with few distortions. For rendering a "real" panorama, enable the Pano button. Henceforth, the behaviour of some render and camera settings are changed:

Camera
Lens:
A 5 (mm) lens setting gives a 360° pano. The horizontal field of view is now proportional to this setting: 10mm gives a 180° pano, 2.5mm gives a 720° pano (two turns), 1mm gives a 1800° pano (5 turns), etc...
This change only affects the horizontal field of view: the vertical one behaves as usual (i.e. it is locked to 173° at maximum!). This means that if you want to render a vertical pano, you have to lay the camera on its side.
Rendering
Xparts
Defines the number of "shots" aligned side by side: at minimum to 10 if you want a "correct" pano; the higher it is, the better is the result (lower distortions); the max number of shots is the width of the rendered picture, in pixels, divided by eight.
Yparts
Its behaviour isn't changed from a "standard" rendering.
SizeX, SizeY
As long as SizeX > SizeY, the horizontal field of view stays the same, as defined by Lens: (e.g., for a 5mm lens, 360°): the vertical field of view is proportional to the ratio height/width.
If SizeX < SizeY, the vertical field of view is locked to its maximum (173° for a Lens: of 1mm, 145° for a Lens: of 5mm, etc.): the horizontal field of view is proportional to the ratio width/height (e.g., for a rendered picture twice as high as wide, and a Lens: of 5, we have an horizontal 180° pano, rather than a 360° one).


[edit] Examples

All this is quite complex, so here are some examples, all based on the same scene, to try to clarify it:

Test scene.

[edit] Examples of non-panoramic rendering

Non-panoramic rendering with Lens: = 1mm (horizontal field of view: 173°).
Non-panoramic rendering with Lens: = 5mm (horizontal field of view: 145°).
Non-panoramic rendering with Lens: = 10mm (horizontal field of view: 116°).


[edit] Examples of panoramic rendering

Panoramic rendering with Lens: = 5mm, and Xparts = 1. There's no difference from a rendering with the same lens without the Pano option!
Panoramic rendering with Lens: = 5mm, and Xparts = 5. The distortions are still obvious, and the horizontal field of view is not yet full 360°...
Panoramic rendering with Lens: = 5mm, and Xparts = 10. Nearly perfect.
Panoramic rendering with Lens: = 5mm, and Xparts = 90. Compare with the previous one: very few differences...
Rendu panoramique avec Lens: = 5mm, and Xparts = 90, and twice as high as wide: we have a 180° pano instead of a 360° one, with a vertical field of view of 145 °!
Panoramic rendering with Lens: = 1mm, and Xparts = 90. Five complete turns (very useful!).
Panoramic rendering with Lens: = 2.5mm, and Xparts = 90. Two complete turns (very useful!).
Panoramic rendering with Lens: = 10mm, and Xparts = 90. 180° pano.


Author's note
Everything above about the panoramic rendering is written from my Blender user's experience: I've never looked at its renderer code...

[edit] Motion Blur Rendering

Mode: All Modes

Panel: Render Context → Render

Hotkey: F10

[edit] Description

Blender's animations are by default rendered as a sequence of perfectly still images. This is unrealistic, since fast moving objects do appear to be 'moving', that is, blurred by their own motion, both in a movie frame and in a photograph from a 'real world camera'. To obtain such a Motion Blur effect, Blender can be made to render the current frame and some more frames, in between the real frames, and merge them all together to obtain an image where fast moving details are 'blurred'.

[edit] Options

Motion Blur buttons (F10).
MBLUR
Enables multi-sample motion blur. This makes Blender render as many 'intermediate' frames as the oversampling number is set to (5, 8, 11 or 16) and accumulate them, one over the other, on a single frame. The number-button Bf: or Blur Factor defines the length of the shutter time as will be shown in the example below. Setting the OSA Button is unnecessary since the Motion Blur process adds some antialiasing anyway, but to have a really smooth image OSA can be activated too. This makes each accumulated image have anti-aliasing (becareful with the render time!).

[edit] Examples

To better grasp the concept let's assume that we have a cube, uniformly moving 1 Blender unit to the right at each frame. This is indeed fast, especially since the cube itself has a side of only 2 Blender units.

Frame 1 of moving cube without Motion Blur. shows a render of frame 1 without Motion Blur, Frame 2 of moving cube without Motion Blur. shows a render of frame 2. The scale beneath the cube helps in appreciating the movement of 1 Blender unit.

Frame 1 of moving cube without Motion Blur.
Frame 2 of moving cube without Motion Blur.
Frame 1 of moving cube with Motion Blur, 8 samples, Bf=0.5.
Frame 1 of moving cube with Motion Blur, 8 samples, Bf=0.5. on the other hand shows the rendering of frame 1 when Motion Blur is set and 8 'intermediate' frames are computed. Bf is set to 0.5; this means that the 8 'intermediate' frames are computed on a 0.5 frame period starting from frame 1. This is very evident since the whole 'blurriness' of the cube occurs on half a unit before and half a unit after the main cube body.

Frame 1 of moving cube with Motion Blur, 8 samples, Bf=1.0. and Frame 1 of moving cube with Motion Blur, 8 samples, Bf=3.0. show the effect of increasing Bf values. A value greater than 1 implies a very 'slow' camera shutter.

Frame 1 of moving cube with Motion Blur, 8 samples, Bf=1.0.
Frame 1 of moving cube with Motion Blur, 8 samples, Bf=3.0.

Better results than those shown can be obtained by setting 11 or 16 samples rather than 8, but, of course, since as many separate renders as samples are needed a Motion Blur render takes that many times more than a non-Motion Blur one.

[edit] Hints

If Motion Blur is active, even if nothing is moving on the scene, Blender actually 'jitters' the camera a little between an 'intermediate' frame and the next. This implies that, even if OSA is off, the resulting images have nice Anti-Aliasing. An MBLUR obtained Anti-Aliasing is comparable to an OSA Anti-Aliasing of the same level, but generally slower.

This is interesting since, for very complex scenes where a level 16 OSA does not give satisfactory results, better results can be obtained using both OSA and MBlur. This way you have as many samples per frame as you have 'intermediate' frames, effectively giving oversampling at levels 25,64,121,256 if 5,8,11,16 samples are chosen, respectively.

[edit] Stamp

Blender 2.46+
Stamps the render with key date/time and other info. See Reference Manual for more info.