Nominal Luminance
These images are published under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License.
I was recently in a discussion about the Firefly filter in DAZ Studio's Iray renders. Someone seemed to be asking why increasing the Nominal Luminance for the Firefly filter was actually making the scene darker. I say, "seemed to be," because there was some initial confusion over whether we were talking about Luminosity or Nominal Luminance.
Anyway, the discussion prompted me to look into what exactly Nominal Luminance is and what it does in the Firefly filter. With a combination of reading and experimentation, I learned quite a lot and want to share it with you here.
First you need to understand what a firefly is in the world of 3D rendering. It's basically an artifact of 3D renders where an individual pixel is drawn much brighter than it should. An image with a bunch of these looks a bit like there are fireflies (the insect) loose in the scene.
I have a scene I'll be using to illustrate throughout this article. Note that I am giving the render times for these images, and that these are all being rendered on the CPU rather than the GPU. My GPU is incompatible with Iray, but if you have a compatible NVIDIA GPU, you should see faster render times.
In this render, the Firefly filter is disabled.
Rendering Time: 53 minutes 4.45 seconds (95.45% of image converged) |
At the size displayed, you'll have a hard time seeing the fireflies, so you should click to see it full size. Even then, the fireflies aren't too bad, so I'll zoom in to show you the most visible one, which is in the corner of the alien's mouth.
So let's see what the Firefly filter does with that. I enable the filter and I accept the default value of 0 (zero) for Nominal Luminance. That seems like an odd value and makes it sound like it will do nothing, but let's have a go at it.
Rendering Time: 1 hours 1 minutes 30.22 seconds (95.27% of image converged) |
Even with the value set at 0 (zero), this appears to have cleaned up the fireflies rather nicely. Let's look at the close-up.
That firefly in the corner of the mouth has almost completely disappeared. It's worth noticing that some new fireflies have appeared, although they are very faint.
Before we start messing with that Nominal Luminance value, let's look at what it is. For that, I turn to some of the reading I did on the subject. I found this in the NVIDIA Iray programmers manual.
The nominal luminance is a hint to Iray Photoreal on what is considered a "reasonable" luminance level when viewing the scene. This luminance level is used internally to tune the firefly filter and error estimate. When the nominal luminance value is set to 0, Iray Photoreal will estimate the nominal luminance value from the tonemapper settings. If a user application applies its own tonemapping without using the built-in tonemappers, it is strongly advised to provide a nominal luminance.
It sounded to me like higher values may not equal more firefly suppression, but more accurate values might mean more effective suppression, whatever accurate means in this context. So I decided to start with a very small value, and set the Nominal Luminance to 5. Here's what I got.
Rendering Time: 38 minutes 23.84 seconds (96.67% of image converged) |
The most obvious change is that the scene got darker, particularly the characters in the foreground. It also had a much shorter render time, perhaps because darker scenes show less detail. On the other hand, it certainly got rid of the fireflies.
So a Nominal Luminance value of 0 (zero) apparently means that the tone mapping settings get used, though that part of the text is a bit confusing to me. The fact that I had set the Film ISO in the Tone Mapping settings might be why it got darker when Iray started ignoring those settings. So I tried cranking that Nominal Luminance value to 5,000. Here's what I got.
Rendering Time: 1 hours 20 minutes 13.34 seconds (95.02% of image converged) |
It looks the same as when I set it to 0 (zero), but took significantly longer to render. Let's get that closer look.
Here I can see that it was slightly less effective at getting rid of the fireflies when compared to setting the Nominal Luminance value to 0 (zero). I suspect that lower values make these hot spots darker, but if the value is too low, all of the brighter areas get darker, including areas that should be brighter. If that's right, then if I crank that Nominal Luminance value up to about 5,000,000, there will be virtually no reduction in fireflies. Here's what happens.
Rendering Time: 1 hours 17 minutes 36.5 seconds (95.00% of image converged) |
It sure does look a lot like the image where I had the Firefly filter disabled, but let's look at the closeup.
While it does look like it made changes, It doesn't look like it was effective in removing fireflies. I think it may have introduced more fireflies than it removed.
Conclusions
At this point I would say that when you need to get rid of fireflies, turning on the Firefly filter and setting the Nominal Luminance to 0 (zero) is a good first step. It uses your current Tone Mapping settings to make a good guess about how aggressively it it should darken bright spots, and usually does a good job of it. If you still have fireflies that you want to get rid of, you'll need to put in a non-zero value for Nominal Luminance. Don't make the mistake of thinking that higher values will more aggressively eliminate fireflies; it's quite the opposite. You'll want to find a value low enough to get the fireflies down to an acceptable level, while not so low that you darken your image more than you want to. For brighter scenes, that value will be higher than for dark scenes. It may be some time before I develop a feel for which scenes need which values.
I hope you find this article interesting and helpful.
Wow, you are so techno cool! 👍 And mmm, gotta confess, I hardly looked at the 'fireflies' ... couldn't take my eyes off Jessica's lovely cock! 😇
ReplyDeleteHa ha! Thank you very much.
Delete