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.

Figure 5. Perspective view of the cabin in daylight with some trees added for interest. Rendering at 3300 × 2200 for publishing quality took about five hours on a 1.7GHz laptop.

Figure 6. An angular view of the cabin interior lit only by window daylight. Rendering at 3300 × 2200 for publishing took about five hours on a 1.7GHz laptop.
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.
- « first
- ‹ previous
- 1
- 2
- 3
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
- RSS Feeds
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- Dynamic DNS—an Object Lesson in Problem Solving
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Download the Free Red Hat White Paper "Using an Open Source Framework to Catch the Bad Guy"
- Tech Tip: Really Simple HTTP Server with Python
- Roll your own dynamic dns
1 hour 32 min ago - Please correct the URL for Salt Stack's web site
4 hours 44 min ago - Android is Linux -- why no better inter-operation
6 hours 59 min ago - Connecting Android device to desktop Linux via USB
7 hours 28 min ago - Find new cell phone and tablet pc
8 hours 26 min ago - Epistle
9 hours 55 min ago - Automatically updating Guest Additions
11 hours 3 min ago - I like your topic on android
11 hours 50 min ago - This is the easiest tutorial
18 hours 25 min ago - Ahh, the Koolaid.
1 day 4 min ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
Any luck with Gentoo?
No go at getting this to compile with gentoo.
Re: Lighting Simulation with Radiance
I'm curious if you considered using POVRAY or other rendering programs and if so what criteria led you choose to use Radiance. -- paul
Re: Lighting Simulation with Radiance
POVRAY doesn't do a physical simulation. If you want to take "light meter" readings from the image that would be the same as what you would get in the real world, then you've got to use something that simulates the physics...read the intro to the article again :)
Re: Lighting Simulation with Radiance
I fail to understand how it can be physically accurate with out taking into consideration the material bounce etc. From the image it seems that we are dealling with super smooth and super clean surfaces...so it may be accurate for the scene data...with more info in the scene the physical simulation seems flawed.
Re: Lighting Simulation with Radiance
Five hours - whoa! 3DSMax with mental ray or some other radiosity plugin would have done it in one
Re: Lighting Simulation with Radiance
... and would be physically inaccurate.
Re: Lighting Simulation with Radiance
Not if real world data were used. You can achieve highly accurate results with Radiosity which ships free with 3ds max 5. And 3rd party renderers can achieve even better results. I have a hard time believing that the author actually tried ACAD, max or numerous other off the shelf packages seriously.
Re: Lighting Simulation with Radiance
Does 3DMax or any other renderer actually work with Lux, Lumens or other real world lighting units? Can you create a model, then actually build it and compare measured light levels of both? I've never seen any of those renderes produce such predictions. The packages are in different arenas. You'd never produce a film with 5 hour (minimum) render times. On the other hand, if you are designing an art gallery, you want to know the precise light levels before you spend millions to build it. Radiance will do this. I'm new to Radiance, and not a lighting designer, but these images show the measurable results that can be predicted.
Re: Lighting Simulation with Radiance
If you read paragraph two of the article, the author clearly states that Radiance is LIKE several off-the-shelf programs that do physically accurate simulations (but I doubt any others are free). He never claimed that Radiance was the only capable package.
In para three he says that the animation packages like 3DS are not interested in doing lab quality simulations, they are interested in making pictures, which is true.
Re: Lighting Simulation with Radiance
"The package produces great-looking images that are output in a special format that records both the texture and physical lighting of a scene, much like the professional products LightScape and VIZ 4 by Autodesk."
An improved version of the LightScape and Viz 4 Rendering enginge ships standard with 3DS max 5. True, animation programs sell mainly to people wanting to make pretty pictures, but lighting simulations are not difficult with max 5 and they are accurate.
"None of them provided the realistic output or easy support for dealing with the log walls I desired."
Also a questionable statement considering his logs are perfect cylanders... is the author suggesting that the above packages can't handle cylanders well?
Re: Lighting Simulation with Radiance
Hey, author here.
Thought I'd take a minute and respond to some of the feedback. Thanks for the interest everyone!
I started doing my log home projects back in 1997/8, which is when I tried out 3DS, ACAD, and a few other modelling systems. Actually, I already knew that I wanted to use Radiance for the rendering, because I was wanting to do lighting design, and it was the only free package that would do it (and still is). It also has so many cool features for materials and lights that deal with light in a realistic fashion that it was fun to play with.
As far as commercial stuff goes, the plugins for ACAD made it pretty easy to export geometry to Radiance, but I did find that generating all the cylinders by hand was pretty time consuming. All of the modellers supported cylinders (well, 3DS didn't at the time, it used polygons to approximate, but that is neither here nor there). My comment on ease of use in the article had to do with going from a floor plan to a finished wall with proper holes for windows and doors. It was simply not easy to manually make each blessed log by hand, size it, and position it. With MAXScript, or Maya's MEL it would have been possible to make a script that would have done what my Perl scripts ended up doing, but in the end, it was just so fast and easy to be able to plop one text line in a file, with a few short hole descriptions and have a hole mess of properly sized and positioned cylinders in my scene. Try making a 50 foot log wall with three windows and two doors in any of your GUI packages in 45 seconds. Just can't be done without writing SOME kind of extra code. So, I'm not saying they CAN'T do it. I'm saying that a little Perl code happened to be the quickest and cheapest route for me. YMMV
In terms of accuracy. Many commercial packages do an excellent job now. How much do they cost? More than Radiance. Are they open source? No. Are they easier to use? Yes, for the most part (I like being able to write utilities to dump geometry in Perl, but I'm wierd). Are they faster? Most of the time. They are commercial products with large development budgets. They are aimed at industry users. I am not an industry user with big pockets. The commercial products that I tried for modelling (3DS Max, ACAD, Maya, Rhino), except for ACAD, were all evaluation copies that I had limited time with. Some of the other commercial products to which I was referring were "3D Home Design" and such $50 packages...no competition at all.
So, if you are a commercial developer, where time is more costly that software, by all means use the excellent commercial lighting packages. If you're a hobbiest like me, save the money and have some fun with Radiance.
- Tony
Re: Lighting Simulation with Radiance
Mhmmm nice i never have heard of pov ray before
THANX GUYZ
take a look to a plugin for 3
take a look to a plugin for 3dmax called lightstudio..i cecked it has a real structure radiance i mean bin..lib etc..
I cecked Rayfront too is good and work with bin file of Radiance..but those r not free, if u wont a free gui for Radiance on win u could find Conrad..i dont know if it still online!!!!it work with bin file of Radiance desktop other plugin for autocad 2000
There r lots other prog working with radiance...Dialux .......
Im looking for smart people interested on cecking lighting simulation sistems...
I worked an linux with Radiance...damn very hard time!!!!
Worked on shell compiling manually...rview..rpict..oconv...too slow!!
Some gui are interesting u can find it on Radiance mainsite..but those dont work so well...
Any of u know Blender???...yes it work on win but on Linux too it is free on i suppose opensource too...some Good people r working on a development of Radinance on Blender...http://www.dream.unipa.it/dream/pub/dot/anselmo/radiance/06.php...take a look....!!!!
If noone of those way is for u u can compile a your on pyton!!!
TOSH
is this guy serious? his
is this guy serious? his renderings looked like plastic dipped in pure RGB paint. if this is what physically accurate lighting will do to my renderings. . . i might as well use notepad to render them. AWK! ACK!
It's a simulation, not a pretty picture maker!
Radiance allows you to do physical simulation. You can actually ask for the light levels from at every point in the picture (i.e., like using a camera light meter in the real world). Important for lighting design.
If you want really nice materials, spend a couple of extra days making pretty materials, then play with fake lights to stage it up...then go get a job at Pixar, where they make pretty pictures for entertainment.
If you want to do quick mock-ups of something you really want to build, and want to know how the lighting is going to be for, say, reading in that room, or hanging art work, then use a simulation.
Dialux
I work in lighting design, has anyone here considered Dialux?? free download, professional lighting tool, accurate output in a multitude of formats, plugin's downloadable from most major lighting manufacturers, accurate daylight calc's
I believe the phrase is 'a no-brainer'
Tutorials
Are there any tutorials to teach you how to use the more advanced features of dialux? Ive tried googling it but there are none.
Do you have a Dialux version
Do you have a Dialux version that runs in Linux? Where can i download it?
Dialux on a Linux box
If you run linux, the only way I've found to get Dialux rolling is with virtualbox ose running XP within linux. It runs faster than under a standard XP instal but I cannot make directx work in my virtual machine so i'm stuck with crappy looking opengl while modeling.
P.S. If you use Dialux, you can send renders straight to pov-ray from the dialux GUI to produce fantastic presentation quality images that are acurate - though I would only ever take figures from within dialux or relux - not apretty picture, no matter what kind of black magic created it!!