CPSC 324, Spring 2004
Lab 14: Radiosity
THE FOCUS in this final lab of the course is on radiosity. You will be using Blender to take a brief look at this type of rendering. You will get six points by being present and completing the lab. I do not expect you to do any work for this lab outside of class. You can add a Web page for this lab to your Web site if you want, but it is not required. (It might, however, contribute to your final Web site grade.)
Radiosity in Blender
Blender can do radiosity renderings, although the radiosity feature is not completely integrated with the rest of Blender's features. And the interface is (surprise!) a little odd. Radiosity in Blender works only with mesh objects, and it does not deal with textures at all. The only thing that matters is the diffuse and emissive colors of meshes in the scene. Any object that has a non-zero emission acts as a light source. The radiosity calculation will spread this light around the rest of the scene. The calculation uses the "shooting" method we talked about in class: The patch with the most un-shot energy shoots its energy into the environment. This is repeated over and over until the total amount of un-shot energy in the scene is below some specified limit -- or until you stop the process by pressing ESC. A nice feature of Blender is that it shows you the process, so you get to see how the lighting changes as the process is iterated.
You will fins several Blender files set up for radiosity in the folder /home/cs324/lab14. These files came with the book The Blender Book, by Carsten Wartmann.
To begin, open the file conference_room04.blend. You will see several views of a conference room. Here is how to do the radiosity calculation for this room, or for any other scene:
- Point the mouse at one of the 3D windows, and press the A key once or twice to select all the objects in the scene. Only selected mesh objects will be part of the radiosity calculation.
- Go to the radiosity buttons, indicated in the Buttons Window Header by a little radiation symbol. We will ignore most of these buttons, and will use all the default settings.
- Click the "Collect Meshes" button. This collects the data needed for the radiosity calculation. The 3D windows will change in appearance Most of the Blender interface shuts down until you finish the radiosity calculation by clicking the "Free Radio Data" button (later, after the calculation).
- Click the "Go" button and watch the window in the upper right. After a few seconds of preliminary calculation, the whole scene will go dark except for the objects that emit light. This is the initial setup for the radiosity calculation. The computer will then start shooting energy from patches, and you will see how the shot energy lights the scene. The patches are outlined in green. This starts off pretty quickly, so watch carefully.
- The cursor shows the number of patches that have shot. The process will stop automatically, or you can stop it whenever you want by hitting the ESC key.
- To save the results of the calculation, click the "Replace Meshes" button. This replaces all your objects with one giant mesh that contains the radiosity information. Then click "Free Radio Data" to return Blender to normal operation. (If you click "Free Radio Data" without clicking "Replace Meshes", the results of the calculation are discarded. If you click "Add New Meshes", the data is applied to a newly created mesh which exists right on top of the original meshes. Ordinarily, you would immediately move the new mesh to another layer. This allows you to save the unmodified meshes as well as the new mesh.)
- You can now render the scene by pressing F12. If you want to save the image, you should first go to the Display Buttons and make sure that the image type is JPEG.
Note that Blender expects that you will usually use the radiosity data as a basis for further modeling. For example, you might add lighting to the scene or apply textures. However, this involves some complications, so we won't go into that here.
Next you can try one of the files radiosity_box00.blend or radiosity_boxRGB_00.blend or both. These are simpler scenes, which are similar except that the RGB version has red, blue, and green colored lights. Do the radiosity computation on one or both of these files.
To complete the lab to modify one of the sample files by adding and/or removing objects and lights. (Or, create a scene from scratch if you want.) You should spend some time trying different things. For a light, it's best to use objects with large faces, such as a cube or a plane. (The algorithm doesn't work well with small light-emitting faces because they don't contain a lot of energy individually. Another thing that I found out is that light is only emitted from the front faces of polygons. In particular, a mesh plane only emits light from one side. If that side is facing away from your objects, they won't be lit.)
Show me your rendered scene when you have finished something that you like.