Issue with artists using physically correct attenuation ?

Started by
5 comments, last by FreneticPonE 7 years ago

Hi,
Artists like to have access to min/max attenuation but this attenuation using lerp or smoothstep is not physically correct.
The physically correct method is to do 1/d² but this formula never reach to 0, so here the tweak used by unreal :


saturate(1-(distance/radius)^4)^2/(distance^2+1)

In other words it's to compute the 1/d² and apply a mask :


DistanceAttenuation = 1 / ( DistanceSq + 1 );
DistanceAttenuation *= Square( saturate( 1 - Square( DistanceSq * Square( LightInvRadius ) ) );

That gives a very similar result but with a falloff to 0 at the radius.
What is the feeling with artist about that ? Does they still want the min/max attenuation ?
To me, it's always better to be more physically correct but does it break the possibilities ?
In other words, any experience about that with artists ?
Thanks

Advertisement

For reference, page 30 has Frostbite's attenuation scheme: http://www.frostbite.com/wp-content/uploads/2014/11/course_notes_moving_frostbite_to_pbr.pdf

SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.

Ok that explains all the process and ends to use the same formula because it looks to be the best actually.
It doesn't speak about another kind of attenuation possible, maybe better to stay on one, and one physically correct is always better.

It is not a matter of artistic choice nor physical accuracy.
Lights have limits so they can be culled based on distance. It is not practical to have every pixel in your render lit by every single light in the game world.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Yes, it's true, I know the issue because I use clustered shading, you have to set the light in the good clusters.
But it's also a question about artists, because then with this method you have it physically correct but it's less controllable than min/max.

I prefer the physically correct attenuation. It's still possible to do light culling with infinite lights, you just use a threshold light intensity that is considered perceptually small (e.g. 0.01) and then solve the light attenuation equation to find the distance where the intensity drops below that value. With this method dim lights automatically get culled with small radii and bright lights are allowed to shine farther. If the epsilon is chosen correctly (e.g. considering effects of shading/exposure/tonemapping), the result should be indistinguishable from no culling at all.

I prefer the physically correct attenuation. It's still possible to do light culling with infinite lights, you just use a threshold light intensity that is considered perceptually small (e.g. 0.01) and then solve the light attenuation equation to find the distance where the intensity drops below that value. With this method dim lights automatically get culled with small radii and bright lights are allowed to shine farther. If the epsilon is chosen correctly (e.g. considering effects of shading/exposure/tonemapping), the result should be indistinguishable from no culling at all.

You'd either need to put up with a ton of lightleak or have a LOT of (potentially very high res) shadow maps. Either that or have very few lights/very specific game content. And it's still an artificial cutoff, saves time for artists maybe, but perhaps they want to do it manually?

This topic is closed to new replies.

Advertisement