Radiosity to texture baking         Using Texture Baker for baking radiosity information into texturemap

I'm assuming the use of Blender 2.42a which I'm using myself. And I assume a bit of basic blender knowledge. Like where to find materials, and how to texturemap an object.

Simple scene

Start out with a simple scene for example with the omnipresent Blender cube. Press the material button and give the cube a material like "cube_mat". UV map the cube (enter face select 'F', select the edges where the cube should be cut with Ctrl-alt-right-mouse, press 'U' and select Unwrap). Examine the result in a UV/Image Editor, as shown on the right in the image below.


Adding other objects which should cast shadows

Add another object to the scene. This object is to show radiosity shadows cast on the target object. The other object doesn't need to be texturemapped. Here I've added a cylinder-like shape in close proximity to the cube ensuring shadows will be cast on the surface of the cube.


Adding light sources

When doing radiosity rendering, you can't use normal lights. Instead we will be using objects with a material that emits light. Add a ico-sphere with a subdivition of 3-4. The subdivision controls the quality of the emitted light onto the surfaces of the scene. 3-4 should be sufficient, if you use larger subdivisions the rendering will take longer, and probably not give much greater results.
Press the material button and give the icosphere a material like for example "light_mat". Set the desired color of the material (this controls the color of the emitted light) and most importantly set a non-zero value for the amount of light the material emits, in the image below you can see where the emit factor can be found (where the mouse pointer is).
In my example I've added a icosphere, with a greenish material, and set the emit to 0.05 (Play around with the value to see what gives the best result. A value between 0.02 and 0.08 should do just fine)


Now for the fun part

Press the radiosity button (looks like a atomic warning sign)
Select all meshes that should be in the rendering. Here we select cube, cylinder and icosphere.
Select Gour in the radiosity render settings.
Press collect meshes, and new menu appears. (Changing the settings for the rendering, can greatly affect the outcome of the render. But for this tutorial we'll leave them alone.
Now press 'Go'. And look at the rendering taking place. You'll see that the cube is colored green on one side, and hopefully there are a shadow cast by the cylinder on the cube.


When the render finishes by itself, or you prematurely cancelled it by pressing ESC, you should press "Add new meshes" in the radio tool menu. This creates a duplicate of the cube, icosphere and cylinder. Move this new object to a new layer, and press "Free radio data".

Cleaning up the mess

Go to the layer where you've put the new object. Notice that the cube, icosphere and cylinder has now merged into a single (rather highpoly) object, but don't fret, we'll soon clean this up.
Enter editing-mode, and press the editing button, we will start removing faces based on the material that they have assigned, leaving only the cube in our scene. First change the mesh material to "cube_mat" and press "Select" in Link and materials. Now separate the faces that has been selected. Now you have to objects: separated cube and cylinder+icosphere. You can delete the cylinder+icosphere as we don't need them anymore.


If you select the cube and enter UV face select mode you'll notice that the cube has been subdivided into many thousands subdivisions, but as you'll also notice the new subdivisions all lay within the original UV texture map, just the way as you left it. This behavior is just what we need. The subdivision takes place to make the most detailed radiosity render as possible with the settings in the the radiosity panel. Even thought its a completely new object with a couple of thousands more faces, it still obeys the boundaries of the original texturemap.

Now lets bake some texture

Before doing the actual baking, we will have to change the cube material to only use vertex colors.
Enter the material buttons, ensure only "VCol Pain" is selected.


Now change the bottom windows window-type to scripts window. Select "Scripts->UV->Texture Baker".


Say no to replace, and select the desired resolution. I've selected 256 for this example. After a couple of seconds the vertex color information is baked into the texturemap, which can be saved to disk by pressing F3.
The new cube that was the result of the radiosity rendering can now be deleted. And the texture can be applied to the original lowpoly cube.


Alias: Radiosity_to_texture_baking