Lighting Simulation with Radiance
Radiance comes with a utility called rad that works like UNIX make. The input file to rad has a series of variables that tell it how you want to render a scene, and it figures out how to call the many other programs used to simulate the light. A commented sample is shown in Listing 6.
Most of the variables that take filenames can be defined as many times as there are files that apply. The view variable also can be defined many times. Each view definition causes the generation of a picture. You should include a name for the view, where you want to put your eyeball (-vp viewpoint), what direction you want to look (-vd view direction vector) and which way is up (-vu view up vector). I also like the -vt option for generating angular (fish-eye) views.
Using the H value with the various quality settings can take a long time (more than ten hours on 2GHz machines). Most times, the H setting is overkill, and M works fine. Use L for interactive rendering. The documentation and a little experimentation will help you figure out what is best for your scene.
To view a scene interactively, use the command:
$ rad -o x11 cabin.rif
The scene may appear bright and washed out when interactively viewing. Type e, press Enter, then click on a bright spot in the image to fix the exposure. You don't have to wait for the render to finish.
You can experiment with the exposure as much as you want. The dynamic range of Radiance image data far exceeds the dynamic range of your monitor. This means you can end up with a completely dark or completely white image that can be adjusted to your display without loss of data. This is drastically different from normal image files where adjusting the brightness too far can cause permanent loss of information.
You can load an alternate view from the rif file while interactively rendering with the L command. For example, if you have a view named interior in your rif file, typing L interior loads it. You can input a view manually by typing v and pressing Enter. Simply answer the prompts. Type q and press Enter to quit the interactive renderer.
To generate images of all of your views use:
$ rad cabin.rif
Then view the images with:
$ ximage *.picYou can adjust the exposure of an image in ximage by clicking on the image and pressing A for auto-exposure, H for human eye response or = to adjust based on the pixel you clicked.
Figures 5 and 6 show two completed daylight simulations of our cabin.
You can take light readings averaged over an area from ximage. Simply drag out a box and press L for luminance or Enter for radiance values. For a quick physics tutorial of the meaning of these numbers, see www.intl-light.com/handbook/rad.html. Press Q to quit an image.
I've covered a very small part of Radiance in this article due to space limitations. If you want to further populate your scenes with the clutter of daily life, be sure to check out the links from the Radiance web site for furniture and plants.
Anthony W. Kay is a computer programming consultant in Eugene, Oregon. When he's not simulating trees as building materials he goes hiking among the live ones.
|Nativ Disc||Sep 23, 2016|
|Android Browser Security--What You Haven't Been Told||Sep 22, 2016|
|The Many Paths to a Solution||Sep 21, 2016|
|Synopsys' Coverity||Sep 20, 2016|
|Naztech's Roadstar 5 Car Charger||Sep 16, 2016|
|RPi-Powered pi-topCEED Makes the Case as a Low-Cost Modular Learning Desktop||Sep 15, 2016|
- Android Browser Security--What You Haven't Been Told
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- The Many Paths to a Solution
- Nativ Disc
- Synopsys' Coverity
- Naztech's Roadstar 5 Car Charger
- Securing the Programmer
- RPi-Powered pi-topCEED Makes the Case as a Low-Cost Modular Learning Desktop
- Glass Padding
- Identity: Our Last Stand
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide