CaZaBa

Home

About

Tutorial

Gallery

Download

Purchase

Contact

Czech

English

Render - Examples I.

Lighting and shadows - Glow - Depth of field and antialiasing - Motion blur - Toon shade

In this tutorial, we will show you a few examples of render settings to illustrate how the CaZaBa renderer works. It's very simple, let's get started. At the beginning, download here the scene we'll work with and open it in the program.

Lighting and shadows

We see a scene in which is the underlying surface and two ellipsoids, all with assigned material and two light sources. Now you can open the render settings window where you will press the Render button. A preview of the scene is rendered, where we should see two spheres above the surface, illuminated, and casting a shadow - as expected.

As you can see, more than one light source can also be placed in the scene and render responds accordingly. Lights also indicate shadow casting that is by default turned on by the Shadow casting checkbox under which the parameter section for this effect lies. In situations where casted shadows have too "jagged" edges, the first three parameters help. According to the Penumbra samples render will each light source multiply to the same number of sub-sources of light that are chaotically spaced around the original source position and renders shadows with them. The maximum distance of these sub-sources from the original position is given by the Penumbra distribution value given in the space units. Using only one sample, the shadow edges are sharp and coarse, but with more samples and appropriate distribution, shadows with soft edges can be achieved. The third parameter is Shadow map resolution, which also determines the fineness / roughness of the shadow edges. So the higher the resolution, the finer the shadows. However, up to value 4096.

The second group of three parameters is more focused on depth control of the shadow map. Since the shadow map is basically just a scene relief scanned from a light source perspective, when applicated it would actually cover the surface of the scene and render could not adequately determine which pixels are in the shadow and which are not. For this reason, the shadow map is slightly deepened according to the Depth ratio > 1.0, so there will be no mistakenly casted shadows on areas that are clearly on the illuminated side. Because the program renders by Z-buffer algorithm, the Alpha threshold parameter is used in the case of semi-transparent shadow-casting surfaces. This is especially useful when alpha texture is used on the surface with different values of transparency in different areas. Depending on the Alpha threshold value, it is determined whether the pixel of the alpha texture of the body is already so opaque to cast a shadow or not yet. Finally, the Shadow casting method option allows you to choose between two algorithms. The Shadow map uses only the depth map from the point of view of the light source that it compares with the surface of the scene. The Shadow volume creates from the shadow map a three dimensional model through which it projects the rays of view and detects their passages between areas in the shadow and outside the shadow.

Glow

Thanks to the glow, it is possible to create in the scene a body that looks like emitting light or energy by itself. Various light bulbs, fluorescent tubes, hot or radioactive objects, etc. around which the corona is drawn.

For the Glow getting working it requires the body to have set the Emission component in its material other than black. It is the emissive component that produces a glowing corona. When you open a material palette on the toolbar , you will see that the black ball's material has Emissive component set to shimmering green. This will make the whole body glow with the same green color. If the emission component is set to black, the body will not glow.

Tip: If we want only a certain pattern to glow on the body's surface such as an electric circuit, control buttons, magic runes, etc., we need to assign the Emission texture to the material. In the material palette for the material you want, press More... button and in the following window in the Emissive section, press the same named button. In the window that opens, you can set the emission texture with your pattern.

Tip: The second possible occurrence of the Glow is around specular reflections in interactions of the surface of the body and the incident rays of the light source. At that time, of course, the emission component is not necessary, and the characteristics of the glow corona depends on the properties of the surface, the light source and the angle of view.

If you have the Emission component of the material set up, you need on the other side - in the render settings window in the Z-Buffer section turn on the Emissive lighting by checking the checkbox with the same name, and then in the postprocesses section, turn on the Glow effect. Caution: Note that the emission component itself can also be processed without glow in the rendering. If you want to display the glow corona, both effects must be turned on.

The parameters of the glow are quite simple. Samples count and Sample range factor determines the total width of the effect in pixels. Sample range factor multiplies the Samples count and is here so that the processing of the number of samples - surrounding pixels (max. 50) does not take too long, and still to be possible to draw a wider corona. The remaining four parameters only control the effect's magnitude in the resulting image.

If you have set the Emission component of the material and Emissive lighting and Glow effects are turned on, we can press the green Render button. We should see a bright green corona around one of the spheres.

Depth of field and antialiasing

The Depth of field effect enables us to increase the realism of the rendering by simulation of the range of sharp vision at the focal point of the camera lens and blurring other parts of the image that are before or behind the focal point. Depth of field you can set either by parameters of the specific camera in the scene or for the entire render globally. The setting is easy again. DOF focus is the focal distance from the camera, DOF foreground is the distance of the front border of the sharp image zone, and DOF backgr. is the distance of the rear border of the same zone. All three parameters are in space units. The fourth parameter Blur factor determines the blur rate with increasing distance from the sharp image zone both in the background and in the foreground.

Depth of field parameters in the render settings window will be used anytime when rendering through the viewport itself. Depth of field parameters of the camera located in the scene are used when assigning such a camera to an active viewport. This is done through the arrow in the top left corner of the viewport where you select the View - Camera... menu and select the desired camera from the list of models shown. You may notice that there is one camera in our scene. Assign it to the viewport as described above. The parameters are already set so that the view is focused on the ellipsoids and the background will be blurred. However, the underlying panel remains gray with no detail, which would not be too graphical to show the depth of field. Therefore, open the material palette and assign a diffuse texture containing some minor details to the panel's material (right the first material). For example, you can use the dirt texture you downloaded together with the example scene. In the material, click the Diffuse button and in the next dialog box, click the Open... button to find the texture. The material is already assigned to the panel, so the texture is automatically displayed on it.

In the render settings window scroll down to Postprocesses section and then turn on the Depth of field and antialiasing section. The depth of field in CaZaBa can also handle antialiasing. This is solved in CaZaBa by the FXAA algorithm, which searches for edges in the depth map of the image, and blurs it. The rest of the image remains without antialiasing. Therefore, there is a Source of parameters drop-down menu with five items covering all available options - combining the depth of field of the viewport or camera with antialiasing or letting to process only the antialiasing itself. If everything is set, we can press the Render button again, and after processing, we see that the background details are blurry while sharp in the foreground.

Motion blur

Motion blur, as the name says, lets you render blur of models caused by their motion, which can again increase the credibility of the resulting image. Its three parameters, which are in the Postprocesses section of the render settings window are mainly related to the fine smoothing of the effect between the individual frames of the animation. Blur is created by mixing the current frame with the previous frame, resulting in a completely new resulting image. Since the animated motion of a body in a scene can sometimes be too fast, the combination of the current and the previous frame itself would produce discrete transitions between the single positions of the moving body. The Static blur ratio in conjunction with Static samples count (the surrounding pixels tested) indicates the blur power in the current image. The Dynamic blur ratio indicates the blur power between the current and the previous image. For both parameters "Ratio", if their value is greater than 0.5 then the appearance of the body in the current image will prevail in the resulting image. In other words, when the motion blur is rendered, the current position of the body will be most visible in the image, while the earlier positions will leave a slowly disappearing track. This will go away faster, with value of parameters "Ratio" closer to 1.0.

Motion blur you can also try to render. To do this, we need a moving body. For example, select a black ball, enter the value 200 into the field Frame no. on the lower panel of the program's window, and then press Insert keyframe . Here, in the keyframe at position 200, move the sphere using the Translation transformation at the X = 6 coordinate. A blue sphere will stand in her way. For a purely aesthetic purpose, you can select this blue sphere, also insert a new keyframe at position 200 in the animation and move it to Y = 5. Now open the render setup window, in it go down, where under the Depth of field and antialiasing section, turn on the Motion blur section. You can leave the default values, which already provide the appropriate results or you can modify them with respect to the description above. Render output switch to Video, Animation to Whole, select the path and file name to save, and Video format. Finally, press the Render button.

Tip: Note that when rendering Motion blur it is necessary to consider the feature that at the beginning of the animation all models are standing on their place, so also the initial images of the render also show body unblurred. To render a videoshot in which the body appears blurry from the beginning, it is necessary to set the animation in such way that the beginning of the movement is rendered before the actual story of your videoshot starts. Then delete the startup part of a video in any video editing program.

Toon shade

So far we've been doing more of the realism effects. You may also be asking how to make render unrealistic drawing. A great and simple example is the Toon shade effect. In this case, it is actually a combination of two effects - contour rendering with thick lines and color palette degradation.

Thick contours we will create in CaZaBa with the Wireframe effect, i.e. by drawing the edges of the model. For the purpose of Toon shade, only the processing of the outwarded faces is set, which, after rendering the body itself, leaves just the thick contours as if the body was drawn with a pencil or a fix. In the render settings window turn on Wireframe and Rendered faces set to Facing outwards. The Color type parameter determines if the edge color will be global - according to the color square below - or whether to draw each model individually according to its Model color basic parameter. We can set Color type = Global and Black. The Edge width is considered in pixels. If you want the contours to be thicker, increase the Edge width value. The Consider wireframe even in the depth map check box would be useful if we wanted to render a purely "wirelike" body and we would require that its shadow would be "wirelike" too.

The second part of Toon shade - Palette degradation is made available below in the rendering settings . Below, in the Postprocesses section, turn on the Palette degradation effect. In essence, it's the image thresholding. In other words, a 16-million-color-palette recognisable by human eye is by this effect reduced to a smaller number which is determined by Thresholds count value. Parameter Distortion type then decides in what way we will understand the color palette during its thresholding. In HSL, the palette transforms according to the brightness of the colors while in the RGB is reduced directly according to the color values. Thresholds count = 6 and Distortion type = HSL is therefore good for us. After the previous example with motion blur, make sure that you have the render output set so that you do not overwrite the previous work on the hard drive and can lastly be rendered with the Render button.

Tip:Beware, unrealistic effects such as Toon shade may not always deliver the best results on realistic models. Therefore, for example of the Toon shade case is necessary to prepare the scene from the beginning with the corresponding comic design.

<< Return to topics

Copyright (c) 2013 - 2019

General terms and conditions

End user license agreement