Putting the Light in LightWave, Part 2
How to fake radiosity for fun and profit
It's been quite some time (six months, which might as well have been during the Nixon administration) since the first installment of this series, so there's no time like the present to press on with our whirlwind tour of various lighting features in LightWave. Today, we're going to go through a fairly simple technique that can add a hint of radiosity to your scenes without the usual associated rendering hit. Intrigued? Of course you are. So let's begin...
Couple things before we start
For those who may be new to 3D and unfamiliar with radiosity, here's the 10,000 foot view: radiosity is a type of rendering solution that calculates "how light works" comparably to the way light behaves in the real world, offering extremely photorealistic results when applied correctly. Radiosity rendering bounces all the lights in a scene, even ambient lights, off of every object until the result is the nice, soft graduated lighting you're accustomed to seeing in the world around you. Figure 1 shows the result of the three-point lighting setup I introduced in part one of this series (which you can read here if you need to catch up), rendered with radiosity:

Figure 1: Radiosity rendering can give even the mostest boringest of scenes that nice touch of extra realism.
Now, on the flip side, Figure 2 shows the same scene, only this time with radiosity turned off:

Figure 2: Uh, I don't think so. What to do, what to do...
About the only plus Figure 2 has going for it is that it rendered in 2.9 seconds as opposed to the 4+ minutes that Figure 1 took (yeah, I've got a slow machine. Dual-G5 PowerMac donations will be happily accepted). So the challenge becomes this: how does one go about approximating some of the subtler things that make radiosity what it is while not eating up so much time on the rendering end? The answer can be staggeringly simple, which is the kind of answer I, as a lazy person, do so enjoy.
What's going on
In order to begin to fake radiosity, let's take a quick look at what's happening when you use radiosity to render. Now, keep in mind here that while I am many things, a physicist ain't one of them. Therefore, I'd appreciate not being beaten up too much if some of the actual scientificalness (to invent/butcher a word) is off. I'll also state that while there are some things you can do to approximate radiosity (which is why we're even here in the first place), it only goes so far. But where we can go is often enough to give your scenes a little more of that realistic pop, so it's definitely worth the trip. And with all that said, let's compare Figures 1 and 2 side by side, in what I'll now call Figure 3:

Figure 3: One of these things is not like the other.
Same shapes, same scene, same shaders, same lights, but vastly different results. Let's address the elephant in the room first: the radiosity-less rendering on the right is waaaaayyyyy darker than the one on the left. That's because radiosity lighting is, for lack of a better term, additive, meaning that since the lights are calculated bouncing around the scene (rather than just "stopping" as they would in a normal 3D lighting environment), the light doesn't just "fizzle out" after hitting something. Less is more when it comes to radiosity, the same way that the early pre-dawn light can still have a tendency to illuminate a room enough for you to see everything in it (and wake you up, and your kid up, and your dogs up, and it's only 5:30 in the damn morning and what is everyone waking up so early for...). But I digress.
The second main thing that's happening is that the colors from the objects in the scene are thrown into the equation in a radiosity setup. On the left, you'll see a hint of the green showing up in the shadow under the cube, some purple appearing on the left edge of the green cube and on the shadow behind the purple sphere, and so on. On the right, nothing like that is happening, since the plain ol' lights aren't really interacting with anything but what they hit in the scene. Fortunately, 3D programs are flexible enough to bend the rules of physics enough so that we can approximate these subtleties somewhat. I've broken down the basic techniques into a soon-to-be-world-famous five-point plan. Inspired somewhat by Mike Damone's legendary five-point plan, I think it's safe to say that men will soon be dying trying to obtain this valuable information as well:
Point 1: Take a few snapshots if you can
While the entire point of this article is to avoid having to invoke radiosity rendering, it also might be a good place to start. That is, if you have the time. It certainly isn't a necessary step to set your scene up to radiosity render, but the extra effort can (and usually will) result in a better end product. If it's an animation, render out a few reference frames to help you set up the lights to match. Even doing a limited render may be extremely useful. The bottom line is that while you can get away with not doing it, getting yourself some reference frames is never a bad idea.
Point 2: Combine spotlights and ambient lighting
To start to get that nice, gradient softness across our scene, we're going to mess with the ambient settings in addition to fooling with the lighting cones and softness angles LightWave's spotlights provide. To show that we need both, take a look at Figure 4:

Figure 4: Just a tad too dark. Ambient lighting will really fill in those high contrast areas.
All I did here was turn up the intensity on all three of my lights to compensate for the darkness seen back in Figure 3. As you can see, it's getting a little harsh. So, what I need to do is to turn up the ambient lighting (which I had set to 0% in my radiosity scene) and adjust spotlight intensity and cone angles to start getting closer to that nice, soft lighting I'm after. Basically, the spotlight settings will add the highlights and depth, while the ambient lighting fills in for some of the rougher areas. Figure 5 shows where these settings are found in LightWave.

Figure 5: The Light panel contains individual light settings (left), as well as the Global Illumination button, which reveals the ambient light settings (right), radiosity, and others.
Basically, I'm going to toy with the spotlight and ambient settings until I get what I want. Real exact science here, but at the end of the day we're getting closer (fig. 6):

Figure 6: Perhaps a little brighter than I would ultimately want, but it'll do for now. I'll tweak again a bit down the road.
Here's the quick summary of what I did:
- Turned the ambient lighting up to lighten up some of the darker areas.
- Adjusted the intensity of each light until the right contrast was reached.
- Narrowed the Spotlight Cone Angle and the Spotlight Soft Edge angle for each light to achieve the right gradient falloff.
In a nutshell, I eyeballed it. All I did was play with the existing lights and, in conjunction with the ambient light setting, was able to get close to the softer, graduated lighting (on a scene-wide basis) that you saw in the radiosity-rendered version. Now, to go after some of the more subtle details.
Point 3: Add a few more lights
A warning: this step can really get out of control if you don't rein yourself in. What we're going to do now is to approximate the bouncing of light off of the objects in your scene to distribute some color to places where "real" light would normally take it. Don't worry—you won't need anything fancier than your own two eyeballs to pull this off as well.
Here's the gist: in a radiosity render, the light in your scene hits objects in your scene, bounces off said objects to varying degrees (the varying degrees having to do with your particular object's diffusion settings), scatters and projects the colors of said objects (again, to varying degrees), and ends up elsewhere in your scene, only to bounce again. Lather, rinse, repeat. In our fake solution, we're going to set up additional "accent" lights to pull all that bouncing and projecting duty I just outlined. So you can probably see how this can get out of control; in theory, you could end up placing hundreds of lights in your scene in an attempt to approximate all the bouncing going on, but that kind of defeats the purpose. So let's keep things just the way I like it: simple.
We're going to confine our lights to a single bounce, and use nothing more than some common sense to tell us where to place our lights. Going back to our "still life with purple sphere and green cube" scene, I can arrive at what lights I'll need by talking through where the bounces from our three main lights will end up, and extrapolating only those I'll need as required light sources. We've got three lights in the scene bouncing around, causing trouble (fig. 7). Since I already dealt with the overall scene lighting in the last step, I'll just need to figure out how to scatter the colors.

Figure 7: A top view of the three main lights.
OK, from the looks of things I can pretty much ignore the back light, since anything meaningful will either bounce off and fly right outside the boundaries of my scene or be too subtle to worry about anyway. That leaves the front two lights. Tracing a reasonable guess of a single bounce from the left front light (and aided tremendously by LightWave's helpful targeting lines it attaches to lights), I'm betting that it will glance off the right half of the sphere, scattering some purple onto the floor and maybe a smidge onto the front side of the cube. Again, since I'm keeping things simple, I'm going to ignore this light as far as the green cube is concerned. The opposite is true for the right front light. It should hit the green cube and spill a bit o' the green onto the sphere, and leave a tad on the floor as well. The reference shot I set up for Figure 1 mostly confirms this, so, as Captain Picard once shouted, there are four lights:
- Purple Light 1 goes in the middle of the sphere, pointing straight down.
- Purple Light 2 is aimed at the front face of the cube, and positioned just outside the front of the sphere.
- Green Light 1 is placed in the middle of the cube, pointing down at the floor.
- Green Light 2 goes at the front of the cube and directed at the right side of the sphere.
I've made each light a spotlight, as being able to set the cone angle and softness really helps things along, but you're by no means constrained to spotlights. Use whatever kind of light you wish in your scene to achieve the desired effect. Anyway, you can see how things are positioned in Figure 8:

Figure 8: Here's a bird's eye view of where I put my accent lights in the scene.
Now, the specific light settings have a lot to do with your material settings, so pay attention to the amount of specularity and diffusion you've assigned, as those will be crucial in letting you judge how much intensity to assign an accent light to achieve the desired effect. And without getting into the minutia of what each specific light setting ended up at, here are some things to watch out for as you fiddle with your light settings:
Lights can selectively affect objects. Thankfully, you don't have to worry about any light you put in your scene affecting any object that you don't want it to. Use the checkboxes (fig. 9) in LightWave's Light panel to exclude specific objects. This is especially important when a light sits inside an object like we have here.

Figure 9: The first green light is only set to affect the floor, ignoring everything else (including the sphere it sits inside of).
The reverse is also true: objects can be selectively affected by lights. Although it's not the approach I took here, using the Lights tab in the Object panel (fig. 10) lets you set which lights affect a particular object. This approach becomes preferred the more objects you have in a scene. And, as you'll notice, the exclusions you make in the Lights panel show up in the Objects panel automatically.

Figure 10: Light exclusion runs both ways, as shown here in the Object panel.
Lights can made to affect only parts of an object's material. In the case of Green Light 2 falling on the purple sphere, I didn't want to have a green hotspot as a result of the sphere's high specularity, so I set Green Light 2 to not affect the sphere's specularity (fig. 11). You can turn off either diffuse or specular in the Light panel, so don't forget to do it when you need to!

Figure 11: The "Affect..." checkboxes are your friends.
If you use spotlights, intensity settings and cone/softness angles work together. A quickie: remember that intensity controls how much light is emitted, but using the cone angle settings gives you more granularity over how much area is affected and how soft the falloff will be.
OK, so now I've got my four bounce lights set up, and the result can be seen in Figure 12:

Figure 12: The colors are being bounced around to the floor and the other objects after we set up our accent lights.
We're getting there! Just a little more messing around to do before we can call it a day.
Point 4: Fuss with dem shadows
This step isn't as involved as the previous one, yet is still important in selling the whole illusion. LightWave, among other 3D suites, gives you control over how shadows are handled, allowing you to set things such as edge softness and even color (fig. 13). Of course, this is in addition to realistically calculated shadows as well, but we need to have tweaks available in this case.

Figure 13: Shadow Maps not only save rendering time, but they afford you many more options over raytraced shadows.
LightWave's Shadow Map is the answer here, so I'm going to make sure all three main lights in my scene are set to Shadow Map mode, and I'm going to turn shadows completely off for all of my other four accent lights. Now, I've noticed that the shadows are still a little edgier than I'd like (compared to my reference frame), so I'm going to bump up the Shadow Fuzziness setting and, while I'm at it, change the Shadow Color from pure black to a dark gray. At this point, you may be asking what the Shadow Map Size thingee is, and why would one need to change that? Glad you asked. The higher you set your Shadow Fuzziness, the greater the chance that said fuzziness is going to look, well, awful (fig. 14).

Figure 14: Ick.
Increasing the size of the Shadow Map will alleviate some of the choppiness, but at the cost of higher render times. So, like everything else in life, it's all about finding the right balance. Anyway, the final result, after a little more shadow and light tweaking, is shown in Figure 15:

Figure 15: Our finished frame. Sure, we could tweak some more, but that way lies insanity.
Point 5: Now, this is most important, Rat...
When it comes down to making out, whenever possible, put on side one of Led Zeppelin IV. OK, so I stole that one from Damone to make it a true five-point plan, but it's incredibly valuable advice regardless of the setting, don't you think?
Anyway, take a look at the real radiosity and the fake version side by side (fig. 16):

Figure 16: We've got some issues, but we've also added a lot, and 4.1 seconds per frame (the final tally with the larger Shadow Maps) is a lot easier to stomach than 4+ minutes.
Is it 100% accurate? Of course not. It's probably not even 10% accurate (if even that high). There are a few trouble spots, most notably the (lack of) darkness underneath the purple sphere and some missing overall warmth, but what we've done is enough in a lot of cases to make a world of difference.
Take it a step further
This is but a taste of how far you can go to fake radiosity. And if you're prone to complex scenes, the more you'll save in rendering time over true radiosity, especially if you're dealing with multiple frame sequences (A.K.A. animation). With just a few tweaks here and there, you can add a touch more realism without paying as much of the dreaded "render tax" that so loves to challenge deadlines and usually leads to rapid hair loss. In any event, hopefully it won't take me six months for the next installment of our LightWave lighting series, so until next time, kiddees!
Got Feedback? to send an email. I'll do my best to answer. Really.
