Radiosity Juicy example
Prev | Chapter 18. Radiosity | Next

## Radiosity Juicy example

Relevant to Blender v2.31

To get definitely away from dry theory and shows what Radiosity Modelling can really achieve let's look at an example.

This will actually show you a true Global Illumination scene, with smoother results than the 'Dupliverted Spot Lights' technique shown in the Lighting Chapter to attain something like Figure 18.11, “Radiosity rendered Cylon Raider.”.

Figure 18.11. Radiosity rendered Cylon Raider.

### Setting up

We have only two elements in the scene at start up: a Raider (if you remember some Sci-Fi Movie...) and a camera. The Raider has the default grey material, except for the main cockpit windows which are black. For this technique, we will not need any lamps.

The first thing that we will want to add to the scene is a plane. This plane will be used as the floor in our scene. Resize the plane as shown in Figure 18.12, “Add a plane” and place it just under the Raider. Leave a little space between the plane and the Raider bottom. This will give us a nice "floating" look.

Figure 18.12. Add a plane

Next, you will want to give the plane a material and select a colour for it. We will try to use a nice blue. You can use the settings in Figure 18.13, “Plane colour” for it.

Figure 18.13. Plane colour

### The Sky Dome

We want to make a GI rendering, so the next thing that we are going to add is an icosphere. This sphere is going to be our light source instead of the typical lamps. What we are going to do is use its faces as emitters that will project light for us in multiple directions instead of in one direction as with a typical, single, lamp. This will give us the desired effect.

To set this up, add an icosphere with a subdivision of 3. While still in EditMode, use the BKEY select mode to select the lower portion of the sphere and delete it. This will leave us with our dome. Resize the dome to better fit the scene and match it up with your plane. It should resemble Figure 18.14, “Sky dome.”.

Figure 18.14. Sky dome.

Next, we want to make sure that we have all the vertices of the dome selected and then click on the EditButtons (F9) and select `Draw Normals`. This allows us to see in which direction the vertices are "emitting". By default it will be outside, so hit the `Flip Normals` button, which will change the vertex emitter from projecting outward to projecting inward in our dome (Figure 18.15, “Flipping the normals.”).

Figure 18.15. Flipping the normals.

Now that we have created our dome, we need a new material. When you create the material for the dome change the following settings in the MaterialButtons (F5):

`Add` = 0.000

`Ref` = 1.000

`Alpha` = 1.000

`Emit` = 0.020

The `Emit` slider here is the key. This setting controls the amount of light "emitted" from our dome. 0.020 is a good default. Remember that the dome is the bigger part of the scene! you don't want too much light! But you can experiment with this setting to get different results. The lower the setting here though the longer the "solve" time later. (Figure 18.16, “Sky dome material.”).

Figure 18.16. Sky dome material.

At this point we have created everything that we need for our scene. The next step will be to alter the dome and the plane from "double-sided" to "single-sided". To achieve this, we will select the dome mesh and then go back to the EditButtons (F9). Click the `Double Sided` button and turn it off (Figure 18.17, “Setting Dome and plane 'single sided'.”). Repeat this process for the Plane.

Figure 18.17. Setting Dome and plane 'single sided'.

### The Radiosity solution

Now the next few steps are the heart and soul of Global Illumination. Go to side view with NUM 3 and use AKEY to select all of the meshes in our scene. Next hold SHIFT and double click on your camera. We do not want this selected. It should look similar to Figure 18.18, “Selecting all Meshes.”.

Figure 18.18. Selecting all Meshes.

After selecting the meshes, go to camera view with NUM 0 and then turn on shaded mode with ZKEY so we can see inside our dome.

Now select the Shading Context (F5) and the Radiosity Buttons Sub-context (). In the `Radio Tool` Panel, click the `Collect Meshes` button. You should notice a change in the colours in your view. It should look similar to Figure 18.19, “Preparing the Radiosity solution.”.

Figure 18.19. Preparing the Radiosity solution.

Next, to keep the Raider smooth like our original mesh, we will want to change from `Solid` to `Gour`. This will give our Raider its nice curves back, in the same way `Set Smooth` would in the EditButtons. You'll also need to change the `Max Subdiv Shoot` to 1 (Figure 18.20, “Radiosity settings.”). Do not forget this step!

Figure 18.20. Radiosity settings.

After you have set `Gour` and `Max Subdiv Shoot`, click `Go` and wait. Blender will then begin calculating the emit part of the dome, going face by face, thus "solving" the render. As it does this, you will see the scene change as more and more light is added to the scene and the meshes are changed. You will also notice that the cursor in Blender changes to a counter much like if it were an animation. Let Blender run, solving the Radiosity problem.

Letting Blender go to somewhere between 50-500 depending on the scene can do, for most cases. The solving time depends on you and how long you decide to let it run... remember you can hit ESC at any time to stop the process. This is an area that can be experimented with for different results. This can take from 5 to 10 minutes and your system speed will also greatly determine how long this process takes. Figure 18.21, “Radiosity solution.” is our Raider after 100 iterations.

Figure 18.21. Radiosity solution.

After hitting the ESC key and stopping the solution, click `Replace Meshes` (or `Add New Meshes`) and then `Free Radio Data`. This finalizes our solve and replaces our previous scene with the new solved Radiosity scene.

### Note

Adding rather than Replacing meshes is a form of Undo. You still have old meshes and you can re-run Radiosity again! But you must move these new meshes to a new layer and hide the old layers before rendering!

Now we are ready for F12 and render (Figure 18.22, “Rendering of the radiosity solution.”).

Figure 18.22. Rendering of the radiosity solution.

### Texturing

There you go folks! You now have a very clean looking render with soft 360 degree lighting using Radiosity. Very nice... But the next thing we want to do is add textures to the mesh. So go back to our main screen area.

Now try selecting your mesh and you will notice that it selects not only the Raider but the plane and dome as well. That is because Radiosity created a new single mesh through the solution process. To add a texture though, we only want the Raider.

So, select the mesh and then go into EditMode. In EditMode we can delete the dome and plane since they are no longer needed. You can use the LKEY to select the proper vertices and press XKEY to delete them. Keep selecting and deleting until you are left with only the Raider. It should look like in Figure 18.23, “The Raider's mesh.”. If we were to render it now with F12, we would get just a black background and our Raider. This is nice... but again, we want textures!

Figure 18.23. The Raider's mesh.

To add textures to mesh, we must separate out the areas that we are going to apply materials and textures to. For the Raider, We want to add textures to the wings and mid-section. To do this select the Raider mesh, and go back into EditMode. Select a vertex near the edge of the wing and then hit the LKEY to select linked vertices. Do the same on the other side. Next, click on the mid section of the ship and do the same thing. Select the areas shown in Figure 18.24, “Separating the Raider parts to be textured.”. When you have those, hit the PKEY to separate the vertices selected.

Figure 18.24. Separating the Raider parts to be textured.

We now have our wing section separate and are ready to add the materials and textures. We want to create a new material for this mesh. To get a nice metallic look, we can use the settings in Figure 18.25, “"Metallic" material.”.

Figure 18.25. "Metallic" material.

Time to add the textures. We want to achieve some pretty elaborate results. We will need two bump-maps to create grooves and two mask for painting and 'decals'. There are hence four textures for the Raider wings to be created, as shown in Figure 18.26, “Four textures, from upper left corner, clockwise: RaiderBM, RaiderDI, Markings, Raider.”.

Figure 18.26. Four textures, from upper left corner, clockwise: RaiderBM, RaiderDI, Markings, Raider.

The textures should be placed in four material channels in the raider top mesh. 'RaiderBM' and 'RaiderDI' should be set to a negative `Nor` (Figure 18.27, “Texture set-ups.” bottom - click `Nor` twice, it will turn yellow). 'Raider' should be set up as negative `Ref` (Figure 18.27, “Texture set-ups.” middle).

### Which material?

A Mesh coming from a Radiosity solution typically has more than one material on it. It is important to operate on the right "original" material.

Figure 18.27. Texture set-ups.

The result is the desired metallic plating for the hull of the Raider. Finally the fourth texture, 'Markings', is set to `Col` in the MaterialButtons (Figure 18.27, “Texture set-ups.” top). This will give the Raider its proper striping and insignia. Our raider is quite flat, so the `Flat` projection is adequate. Were it a more complex shape some UV mapping would have been required to attain good results. The material preview for the mesh should look like Figure 18.28, “Complete material preview.”.

Figure 18.28. Complete material preview.

Our textures to won't show up in the rendering right now (except markings) because Nor and Ref type texture reacts to lighting, and there is no light source in the scene! Hence will now need to add a lamp or two, keeping in mind that our ship is still lit pretty well from the Radiosity solve, so lamps energy should be quite weak. Once you have your lamps, you try a test render. Experiment with the lamps until you get the results you like.

The final rendering (Figure 18.11, “Radiosity rendered Cylon Raider.”) shows a nice well lit Raider with soft texturing.

Prev | Up | Next
Radiosity as a Modelling Tool | Home | Chapter 19. Raytracing