Jump to content
  • Advertisement
Sign in to follow this  

[SOLVED] For Physical BRDFs, why use such high specular powers (eg. 8192)?

This topic is 2124 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


So I have been looking into physically-based BRDFs for some time now, and have observed a perplexing trend. The companies that post the papers always seem to use a ridiculously high specular power (eg. Treyarch for COD BO uses 8192 for lights, 2048 for environment maps) when using a Normalized Blinn Phong NDF. This seems strange to me, especially since I have read that these powers are for extremely rare, super-polished mirror surfaces. Also, it means that they have to store a high-res mip level in their prefiltered environment maps that will take up a lot of space but almost never get used.


Up until now, I have usually settled for a maximum spec power of 1024 for my analytical lights, and 256 for my environment maps. For my bloom, I have been using a threshold of 1.0 and additive blending (what Unity provides). 



Whenever I test these specular powers myself, it causes the resulting specular highlight intensity to shoot up so high that my bloom goes crazy. In particular, as my camera moves I get very distracting flashes of bright spots on sharp model edges that appear and disappear in a very annoying way. 



1.) What is the incentive for using such high powers?

2.) Am I doing my bloom theshold wrong, and should I move it up?

3.) Is this a consequence of the Bloom blending mode?


Any help would be most appreciated.

Edited by n00body

Share this post

Link to post
Share on other sites
For phong/Blinn style specular, where high powers == smooth surfaces, a mirror has a power value of infinity. A power value of 10k is actually still fairly blurry compared to a mirror.
They use this as their maximum power value so they can have polished materials. Stuff like (undamaged) chrome or glass are likely candidates for those values.

As for your bloom filter, what does 1.0 mean for starters? What units is that in, and what's the significance?
More to the point -- this type of bloom filter is not based on physics/reality and is just a made up effect, so there's no right answer other than 'fiddle with it'.
A realistic bloom shouldn't have a threshold at all -- a threshold is saying that the lens is perfect for low-intensity objects but imperfect for high intensity ones!!

Lastly, what kind of tonemapper are you using, and what range of intensity values do you use?
I found that when using an intensity range similar to human perception (~12 orders of magnitude or 0 to 2^12) and a logarithmic tone-mapper, then thresholdless bloom filters suddenl looked ok, whereas before they looked overpowering...

Share this post

Link to post
Share on other sites

Smooth surfaces certainly aren't "super rare" in most games. That category includes metals, standing water, polished ceramics, and glass.

The problem you're describing with the flickering bloom sounds like a symptom of shader aliasing. When you shade a surface with a pixel shader, you end up calculating reflectance for an infinitesimally small patch of that surface located at the center sample point of the pixel. When using high specular powers, the specular reflectance becomes very high-frequency, which means its intensity can change very rapidly as either the view angle, light angle, or normal direction changes. When the camera moves or the object moves, the sample point in the center of a pixel ends up covering a different point on the surface, which can cause the shading to change rapidly. This is particularly true when the normals of the surface also change rapidly, for instance when using a highly-detailed normal map. In a more realistic simulation you wouldn't shade an infinitely small point on a surface, you would integrate over the entire portion of surface that the pixel covers. Doing such an integration would naturally filter out the high-frequency flickering, and prevent aliasing. This isn't really practical for games, so currently they resort to cheaper approximations. Most of them are based around the idea of adjusting the roughness (specular power) based on the amount of normal map detail that's covered by a single pixel. It can also be possible to supersample to a limited extent, which can reduce the aliasing. Usually this is done with temporal techniques, that try to re-use one or more samples from previous frames.

Share this post

Link to post
Share on other sites


Well one thing I discovered was that I made the faulty assumption that my team's artist added a tonemapper at all. Needless to say, adding that helped a lot. I am just using the Bloom and tonemappers that ship with Unity. The 1.0 cutoff just means anything above 1.0 in intensity contributes to bloom. And we are using the "Photographic" setting for the tonemapper. 



Yeah, I figured it was probably mostly because of aliasing, but I was reluctant to go down that path so soon since Unity has absolutely awful support for custom mipmaps. I did manage to get it to work, and it helped a lot. 



So yeah, I now understand the point of such high spec powers for up close smoothness. At a distance, the precomputed specular AA makes it appropriately more rough. 



Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!