Skip to content

💻 Rendering, lighting and materials

Open the rlm_assignment.blend file and you'll see several objects in the scene: a ground plane, a plateau, Suzanne (the monkey head) and 3 knots.

The goal of this assignment is to place some lights, set the camera parameters to your liking, add materials to the objects and render the final image. We'll do this in steps.

Tip

To view your result with realistic lighting and materials use the Shading pie menu, which opens with the Z key:

  • Option Rendered shows realistic lighting and materials, with slower interaction
  • Option Solid shows simple colors and lighting, with faster interaction

Lighting - Creating light sources

To see what we are doing in Rendered shading (Z-Rendered) we first need to add the lighting.

  1. Add one or two sun lights by either using the 3D view menu in the header (Add > Light > Sun) or use Shift-A > Light > Sun in the 3D view
  2. Try to position and rotate the lights so that they light the objects under a bit of an angle (G and R keys).
  3. Before we change the appearance of the lights we need to switch to Rendered using the Shading pie menu (Z > Rendered)
  4. Now adjust the Color and Strength settings under the Object Data properties tab in the Properties panel, perhaps try to give one the lights a warm yellowish sun-like color and the other a more less strong blueish and cold color.
  5. In the same properties panel tab, try to adjust the Angle (or Radius or Size for the other light types) of the sun light and see how it affects the shadows. Small angles (or radii or sizes) create hard shadows, which are ideal to see minor details and large angles (or radii or sizes) create soft shadows, which is more suited to reduce the overall contrast and make it less straining on the eye.
  6. Now in the same properties editor tab, try out some different lamp types (Point, Sun, ...) to experiment with the different lighting effects they produce.

Bonus: If setting up the lamps is too cumbersome, you can go to the World tab in the properties editor and click the little globe drop-down menu button at the top and select the HDRIWorldLighting. This will enable predefined environment lighting using a 360 image of somebody's living room. Do make sure that you de-activate the lamps ( in the Outliner) or remove them to see the full effect.

Camera - Setting the starting point of the light paths (or rather camera paths)

With the lighting setup, we can now see what each of the camera settings does. Or from the light ray paths perspective: configure the starting point of the light rays.

  1. First you need to be in the camera view to be able to see the changes of the camera settings by selecting with the View pie menu (` button) the View Camera option or through the 3D view menu in the header (View > Viewpoint > Camera). The former way is a toggle interaction so when you are already in the camera view you will toggle it off.
  2. Try changing the camera's focal length. For this, select the camera Camera and go the Lens settings in the Object Data properties tab in the properties panel. There you can find the Focal Length setting, try for example values 18, 50 and 100 and see what effect this has. Notice that when you set the Focal Length to a lower value you might see clipping (the scene is cut off from a certain distance). This can be changed by setting the Clip Start in the same Lens section to a lower value, e.g. 0.01. Finally set the focal length to the desired value.
  3. Next we are going to bring the focus to a chosen object in the scene with the depth of field settings. For this, select the camera, scroll down in the Object Data properties tab in the properties panel to the Depth of Field settings. Check the check-box before Depth of Field to activate the depth of field. Now try to set the Focus on Object value to the Suzanne object and test different values for the Aperture > F-Stop setting.
  4. When you are done, disable depth of field again. This makes the material editing easier.

If the lighting gives the desired effect looking through the configured camera then you can give the objects the look you want with materials in the next section.

Materials - How will the light paths bounce?

To design how the light is reflected or refracted off the objects you are going to give each object a different material.

  1. For each object (including ground plane and plateau):
    • Select the object and go to the Material tab in the properties editor.
    • In the Material tab click the New button.
    • Then under the Surface section set the Surface parameter to either Diffuse BSDF, Glossy BSDF or Principled BSDF.
  2. Try to play with the material settings Roughness and Color (the latter is called Base Color for the Principled BSDF)

Bonus: When you feel that the roughness and the color alone didn't give you the look that you want with the Principled BSDF then also try and have a look at the other, in the slides, mentioned settings, Metallic, Transmission, IOR and Subsurface.

Rendering - Creating your final image

Lights, camera, (materials,) set aaaaaaand action!... Now you will set the desired render settings to generate the final image!

  1. Go to the properties editor and set the following settings:
    • Render properties tab
      • Set Device to GPU Compute. If your device doesn't have a (powerful) GPU set it to CPU.
      • Sampling section: set Render > Samples to 128
      • Light Paths section: set Clamping > Indirect Light to 1.0
    • Output tab
      • Format section: set Resolution to 1920x1080, 100%.
  2. If everything is set, press F12.

Now the Image editor will replace the 3D view and your image will slowly be rendered in parts called "tiles".

  1. Finally when the image looks the way you want don't forget to save it! In the Image editor go to the Image menu and click on Save As... and choose a location and save the image.

Performance - Speed up those renders

Now that we know how to improve the look of the scene and save the final render we will improve the speed of the render.

  1. Write down the render time shown in the upper left corner of the Image editor (Example: Frame:1 | Time:00:09:84 | Mem:6.09M, Peak: 164.29M).
  2. Close the Image editor if it is still open.
  3. Change the following settings in the Render properties tab :
    • Sampling section: set Render > Samples to 32
    • Sampling section: turn on the denoiser with, Render > Denoise.
  4. Now press F12 again to render another image.
  5. As you can see when comparing the render time of our previous render and this one, this one is significantly faster.

Render quality when using denoise features

One thing to keep in mind is that when you are using the denoise feature you will lose a little detail.

Noise Threshold

Blender 3.0 introduced another feature to reduce the render times called Noise Threshold. Turning it on and giving it a value between 0.1 to 0.001 will prematurely terminated the sampling when a pixel reaches a certain noise threshold and by doing so reduces the render time.


Last update: 09 April 2024 17:54:55