Manual/PartXI/Rendering Options

Wikipedia,自由的百科全书

User Manual: Contents | Guidelines | Blender Version 2.31

Contents

渲染选项

部分渲染

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. 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. 可以一点一点,一个接一个的渲染一个图形,而非同时渲染全部。这对极复杂的场景非常有用,

Rendering by parts buttons.
Rendering by parts buttons.
Note: Blender cannot handle more than 64 parts.

Panoramic renderings

全景渲染

To obtain nice panoramic renderings, up to a full 360° view of the horizon, Blender provides an automatic procedure. Blender提供了一个自动程序,能够获得很好的全景渲染,即完整的地平线视野上的360度视图。 If the Xparts is greater than 1 and the Pano button of the Render Panel is pressed (Panorama button.), then the rendered image is created to be Xparts times SizeX wide and SizeY high, rendering each part by rotating the camera as far as necessary to obtain seamless images. 如果Xparts大于1并且渲染面板中的Pano按钮被按下(Figure 5)时,渲染图将会创建为一个Xparts倍于SizeX宽,SizeY高的图像,渲染的每一部分都是由摄像机的转动来获取的,每次转动的必然会获得一个无缝链接的图像。

Panorama button.全景按钮
Panorama button.全景按钮

Panorama test set up. shows a test set up with 12 spheres surrounding a camera. By leaving the camera as it is, you obtain the rendering shown in Non-panoramic rendering.. By setting Xparts to 3 and selecting Pano the result is an image three times wider showing one more full camera shot to the right and one full to the left (Panoramic rendering.). Panorama test set up.展示的测试场景中安置了12个球体围绕摄像机周围,此时你得到的渲染结果是Non-panoramic rendering.。通过设置Xparts为3并且选择Pano得到的结果将是一个分别向左右各拍摄3次(3倍)宽度的图像 (Panoramic rendering.)。

Panorama test set up.全景测试的布置
Panorama test set up.全景测试的布置

To obtain something similar without the Panorama option, the only way is to decrease the camera focal length. For example Fish-eye rendering. shows a comparable view, obtained with a 7.0 focal length, equivalent to a very wide angle, or fish-eye, lens. Distortion is very evident. 若要获得类似的效果而不使用Pano选项时,那就只能够去减少摄像机焦距的长度了。示例(Figure 9)展示了一个可用来对比的视图,这是一个7.0焦距的图像,同样是非常宽的角度,通常称之为鱼眼效果,扭曲变形很明显。

Non-panoramic rendering.非全景渲染
Non-panoramic rendering.非全景渲染
Panoramic rendering.全景渲染
Panoramic rendering.全景渲染
Fish-eye rendering.鱼眼渲染
Fish-eye rendering.鱼眼渲染

To obtain a full 360° view some tweaking is necessary. It is known that a focal length of 16.0 corresponds to a viewing angle of 90°. Hence a panoramic render with 4 Xparts and a camera with a 16.0 lens yields a full 360° view, as that shown in Full 360° panorama with 16.0 lenses.. This is grossly distorted, since a 16.0 lens is a wide angle lens, and distorts at the edges. 要获得完整的360度视图时必然要做一些调整。我们都知道,16.0焦距的视角是90度,那么要产生一个全景的渲染就需要4Xparts和16.0焦距的摄像机。得到的图像是(Figure 10)。是一个很扭曲的图像,因为16.0焦距的广角镜头的边缘是扭曲的。

Full 360° panorama with 16.0 lenses.使用16.0镜头的完整360度广角视图
Full 360° panorama with 16.0 lenses.使用16.0镜头的完整360度广角视图

To have undistorted views the focal length should be around 35.0. Full 360° panorama with 38.5 lenses. shows the result for a panorama with 8 Xparts and a camera with a 38.5 lens, corresponding to a 45° viewing angle. 视角在35.0焦距左右才不会失真扭曲。(Figure 11)显示的是8 Xparts和一个38.5焦距摄像机的全景结果,符合45度视角。

Full 360° panorama with 38.5 lenses.使用38.5镜头的完整360度广角视图
Full 360° panorama with 38.5 lenses.使用38.5镜头的完整360度广角视图

The image is much less distorted, but special attention must be given to proportion. The original image was 320x256 pixels. The panorama in Full 360° panorama with 16.0 lenses. is 4 x 320 wide. To keep this new panorama the same width, the SizeX of the image must be set to 160 so that 8 x 160 = 4 x 320. But the camera viewing angle width occurs for the largest dimension, so that, if SizeX is kept to 256 the image spans 45° vertically but less than that horizontally, so that the final result is not a 360° panorama unless SizeXSizeY or you are willing to make some tests. 这幅图像的变形要少的多了,但要特别注意是比例的均衡。这个原图的尺寸是320x256象素,它的全景图是(Figure 10) 4 x 320宽。 想要保持原图和全景图相同宽度的话,SizeX就必定要设置为160,如此就是8 x 160 = 320。 但是,这时摄像机视角的最大宽度问题会发生,所以,如果X边保留到256 这个图像跨过45度垂直但比水平线低,那最终结果就不是一个360度全景图,除非是SizeX≥SizeY或者你乐于那样作些测试。

Motion Blur

Blender's animations are by default rendered as a sequence of perfectly still images. Blender的动画是被默认渲染成一系列的静态精美画面的. 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'. 为了获得动态的效果,Blender被设计成能够渲染流动的帧和一些更多的帧的,介于现实的帧之间,并融合其他的动态细节产生的模糊效果之间的以获得更好的效果。

Motion Blur buttons.
Motion Blur buttons.

To access this option select the MBLUR button next to the OSA button in the Render Panel (Motion Blur buttons.). 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. 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 1 of moving cube without Motion Blur.
Frame 2 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. 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=0.5.
Frame 1 of moving cube with Motion Blur, 8 samples, Bf=0.5.

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=1.0.
Frame 1 of moving cube with Motion Blur, 8 samples, Bf=3.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.

Better Anti-Aliasing:

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.

Depth of Field

Depth of Field (DoF) is an interesting effect in real world photography which adds a lot to CG generated images. It is also known as Focal Blur. The phenomenon is linked to the fact that a real world camera can focus on a subject at a given distance, so objects closer to the camera and objects further away will be out of the focal plane, and will therefore be slightly blurred in the resulting photograph. The amount of blurring of the nearest and furthest objects varies a lot with the focal length and aperture size of the lens and, if skilfully used, can give very pleasing effects. Blender's renderer does not provide an automatic mechanism for obtaining DoF, but there are two alternative way to achieve it. One relies solely on Blender's internals, and will be described here. The other requires an external sequence plugin and will be outlined in the Sequence Editor Chapter. The hack to obtain DoF in Blender relies on skilful use of the Motion Blur effect described before, making the Camera move circularly around what would be the aperture of the 'real world camera' lens, constantly pointing at a point where 'perfect' focus is desired. Assume that you have a scene of aligned spheres, as shown on the the left of Depth of Field test scene.. A standard Blender rendering will result in the image on the right of Depth of Field test scene., with all spheres perfectly sharp and in focus.

Depth of Field test scene.
Depth of Field test scene.

The first step is to place an Empty (SPACE>>Add>>Empty) where the focus will be. In our case at the center of the middle sphere (Setting the Focus Empty.).

Setting the Focus Empty.
Setting the Focus Empty.

Then, assuming that your Camera is already placed in the correct position, place the cursor on the Camera (Select the Camera, SHIFT-S>>Curs->Sel) and add a NURBS circle (SPACE>>ADD>>Curve>>NURBS Circle). Out of EditMode (TAB) scale the circle. This is very arbitrary, and you might want to re-scale it later on to achieve better results. Basically, the circle size is linked to the physical aperture size, or diaphragm, of your 'real world camera'. The larger the circle the narrower the region with perfect focus will be, and the more blurred near and far objects will be. The smaller the circle the less evident the DoF blurring will be. Now make the circle track the Empty whith a constraint or the old Tracking as in NURBS circle tracking the focus Empty.. Since the normal to the plane containing the circle is the local z-axis, you will have to set up tracking correctly so that the local z-axis of the circle points to the Empty and the circle is orthogonal to the line connecting its centre to the Empty.

NURBS circle tracking the focus Empty.
NURBS circle tracking the focus Empty.

Select the Camera and then the circle and parent the Camera to the circle (CTRL-P). The circle will be the Path of the Camera so you can either use a normal parent relationship and then set the circle CurvePath Toggle Button on, or use a Follow Path Parent relationship. With the circle still selected, open an IPO window select the Curve IPO type. The only available IPO is 'Speed'. CTRL-LMB twice at random in the IPO window to add an IPO with two random points. Then set these points numerically by using NKEY to Xmin and Ymin to 0, Xmax and Ymax to 1. To complete the IPO editing make it cyclic via the Curve>>Extend Mode>>Cyclic Menu entry. The final result should be as shown in Speed IPO for the NURBS circle path..

Speed IPO for the NURBS circle path.
Speed IPO for the NURBS circle path.

With these settings we have effectively made the Camera circle around its former position along the NURBS circle path in exactly 1 frame. This makes the Motion Blur option take slightly different views of the scene and create the Focal Blur effect in the end. There is still one more setting to perform. First select the Camera and then the focal Empty, and make the Camera track the Empty the way you prefer. The Camera should now track the Empty, as in Camera tracking the focal Empty..

Camera tracking the focal Empty.
Camera tracking the focal Empty.

If you press ALT-A now you won't see any movement because the Camera does exactly one full circle path in each frame, so it appears to be still, nevertheless the Motion Blur engine will detect these moves. The last touch is then to go to the rendering buttons window (F10) and select the MBLUR button. You most probably don't need the OSA button active, since Motion Blur will implicitly do some antialiasing. It is strongly recommended that you set the Motion Blur factor to 1, since this way you will span the entire frame for blurring, taking the whole circle length. It is also necessary to set the oversamples to the maximum level (16) for best results (Motion Blur settings.).

Motion Blur settings.
Motion Blur settings.

A rendering (F12) will yield the desired result. This can be much slower than a non-DoF rendering since Blender effectively renders 16 images and then merges them. Motion Blur final rendering. shows the result, to be compared with the one in Depth of Field test scene.. It must be noted that the circle has been scaled much less to obtain this picture than has been shown in the example screenshots. These latter were made with a large radius (equal to 0.5 Blender units) to demonstrate the technique better. On the other hand, Motion Blur final rendering. has a circle whose radius is 0.06 Blender units.

Motion Blur final rendering.
Motion Blur final rendering.

This technique is interesting and with it it's pretty easy to obtain small degrees of Depth of Field. For big Focal Blurs it is limited by the fact that it is not possible to have more than 16 oversamples.

Cartoon Edges

Blender's new material shaders, as per version 2.28, include nice toon diffuse and specular shaders. By using these shaders you can give your rendering a comic-book-like or manga-like appearance, affecting the shades of colours, as you may be able to appreciate in A scene with Toon materials..

A scene with Toon materials.
A scene with Toon materials.

The effect is not perfect since real comics and manga also usually have china ink outlines. Blender can add this feature as a post-processing operation. To access this option select the Edge button in the Output Panel of the Rendering (F10) Buttons (Toon edge buttons.). This makes Blender search for edges in your rendering and add an 'outline' to them.

Toon edge buttons.
Toon edge buttons.

Before repeating the rendering it is necessary to set some parameters. The Edge Settings opens a window to set these (Toon edge settings.).

Toon edge settings.
Toon edge settings.

In this window it is possible to set the edge colour, which is black by default, and its intensity, Eint which is an integer ranging from 0 (faintest) to 255 (strongest). The other buttons are useful if the Unified render is used (see next section). Scene re-rendered with toon edge set. shows the same image as A scene with Toon materials. but with toon edges enabled, of black colour and maximum intensity (Eint=255).

Scene re-rendered with toon edge set.
Scene re-rendered with toon edge set.
Previous: Manual/PartXI/Output Formats Contents Next: Manual/PartXI/The Unified Renderer
Personal tools