Dynamically Backward


What is the difference between a render setting and an image filter (or post process)?

Well, normally, a render setting is something that affects the image during rendering, like when radiosity is turned on, or ray-tracing, or motion blur. A post process is something that's done after the image is rendered, like image blurring, gamma correction, or any of numerous other effects that can be applied to any image.

Unless you're working in LightWave, of course. In this case, it's a trilogy of terrors, involving Limit Dynamic Range, the Dynamic Range Minimum and Dynamic Range Maximum controls, and HDR Filtering. These suckers, while useful, are a triple-whammy.

First, a quick anecdote...


On a recent project, I had to deal with a lot of noise caused by bright lights and radiosity. Since the noise was coming from lights that were brighter than the standard 8-bit per channel intensity range, as well as using inverse square falloff, this meant that it wasn't going to clean up without a lot of antialiasing. As I had a few thousand frames to render, I needed to keep the render times down. One way to do this is to limit the range of the lighting, so that anything that rendered brighter than a specific value will get clamped at a lower value. This will then help antialiasing blend stray pixels in with their surroundings. So, I found the Limit Dynamic Range option on the Effects panel, under the Processing tab, and turned it on.

Then I adjusted a few more settings and just before I set this to render, I noticed that another setting with the same name was active on the Render Globals panel, under the Render tab, near the bottom. I didn't remember turning that on since I wasn't planning on using the HDR Filtering option, so I turned it off. Then I proceeded to render.

The next morning, the frames were rendering noisier than I expected, so I stopped the render and checked my settings. Sure enough, the Limit Dynamic Range option on the Effects panel was turned off for some reason. I turned it back on. I checked the Render Globals and saw that that option was on again. I was sure I turned that off, so I did that again. I rendered a frame and it looked the same. WTF?

One more look over things and I see that the option is off again on the Effects panel. So I opened both panels and watched as I clicked the option on one. Sure enough the other switched too. They are the same damned thing! Who the fuck would put a render setting like this in the interface twice, in two different locations, and tie it to two different other features? The way they're arranged makes it look like these are two completely different features! I'm glad I didn't render several hundred frames like that! Oh, wait. I did!

Fuck!

So, I just found out the hard way that these two buttons on completely different sections of the software, are the SAME thing. One of the buttons is placed with a couple other options that let you set the minimum and maximum values to render, and the other button is grouped with HDR Filtering. That makes the two buttons appear to have different functions. There is nothing in the manuals that states these are the same feature. In fact, the “Rendering And Surfacing” manual only mentions the feature as it's applied in the Processing tab (page 297 in the print version and page 298 in the screen version of the LW10/11 manuals, though both say 297 in the index), and incorrectly at that. There are absolutely no references to its presence on the Render tab (nor to the HDR Filtering options) anywhere in the multitude of PDF documents for LightWave. So the only way to find out these two buttons are the same is the hard way (or read it here). Everyone has time for that, don't they?

That was Whammy #1. Now for Whammy #2.

I can see how they might have thought they needed to place that button in two areas, after all, it's needed to activate the secondary options in two different places, or at least, it seems that way. But, they managed to put those other settings in the wrong places. In what's apparently becoming a LightWave tradition, these features are placed completely backwards from how they should be placed. The HDR Filtering option is just that – a filter. It's applied after the frame has been rendered, and you can see it. The blur is only visible on the rendered image and in the Image Viewer, but not in the Render Status preview. Basically it's a slight blur that's applied to areas of the image that are brighter than the normal 8-bit range, mainly to help reduce the jagged look along edges of very bright areas that wouldn't look antialiased well otherwise. It's very similar to the Bloom image filter, but with only about one pixel of blur being applied to areas that are brighter than a certain, internally defined, amount. Thus, it should be placed on the Effects panel, under the Processing tab, not under the Render tab.


The Dynamic Range Minimum and Dynamic Range Maximum settings should be on the Render Globals panel, under the Render tab because these take place during rendering, not after. These values alter how the image is actually rendered, particularly with radiosity. A scene that has an extra bright light, or one with the inverse square light falloff, can have illumination values several times brighter than 100% on surfaces near those lights. This will cause bright reflections, but usually, it'll cause bright spots in radiosity solutions, frequently called “fireflies” or “sparklies”. 


A room lit with an inverse square spherical light. The bright spot on the ceiling, near the light is exposed to an extremely high intensity, which is then reflected onto the walls through radiosity, resulting in a lot of random bright dots.

The same scene rendered with Limit Dynamic Range now active and set to a maximum of 2.  Notice the hot spot on the ceiling now has an intensity of 200% and the shading on the walls is much smoother.
Limiting the maximum value to something lower will reduce the intensity of these sparkly spots and reflections, and thus their final brightness in the image, which helps antialiasing clean them up. Limiting it to 1 will force everything in the scene to stay within the standard 8-bit RGB ranges, but will also cause radiosity to render darker than it normally would, because it's not getting the brighter values that should be present; a 500% luminous surface will only render as bright as 100% if the maximum range is set to 1 and therefore will only affect everything else in the scene as if it was a 100% luminous surface. Generally, the more useful values are from 2 to about 4, clipping the intensity to 200% to 400%. These values help radiosity look better and brighter, without the severe hot spots that create “fireflies” since these can be cleaned up easier with antialiasing. You can really see the difference it makes in the images here. They are all identical, except for their maximum range values, which are (clockwise from upper left) 1, 2, 5000 and off.


So, as stated above, the minimum and maximum ranges should be on the Render tab, while the filtering options should be on the Processing tab. What about the master switch for these – the Limit Dynamic Range button? Where should that go? I would say on the Render tab, since it's needed to activate the range settings and that's the only place it should be, alongside the Dynamic Range Minimum and Dynamic Range Maximum settings.

The filter option already has a deactivated mode – none - which is its default, and in fact, it is actually independent of the Limit Dynamic Range function, as you can see in the last four images; they are still blurred in areas where the RGB values are all below 100%, whether the maximum range is set to 1 or 5000, or limiting is off. It just looks like it's tied to the HDR Filtering because it's grouped in the same section. The Limit Dynamic Range button doesn't even need to be next to it! If anything, HDR Filtering should have a user defined threshold value that it uses to determine where to start blurring, but it is a stand-alone feature.

The light source in these images is a polygonal box, surfaced with Luminosity set to 1000%, and 3 bounces of Monte Carlo radiosity were used. The sphere is 75% reflective and 25% rough.

So to recap, the Limit Dynamic Range button should only be present on the Render Globals panel, on the Render tab, next to the Dynamic Range Minimum and Dynamic Range Maximum settings. The HDR Filtering option should be on the Effects panel, under the Processing tab. The current layout is horribly confusing and even as I wrote this, I was under the impression that the HDR Filtering was controlled by the Limit Dynamic Range button. That's Whammy #3.

As I said above, we can add this to the list of things LightWave has backward.