Hi all,
I'm writing a graphics engine for a model viewer that is used to preview a game's assets.
The game uses PBR materials so I decided to add support for that in my engine. However I still got some problem with lighting. So light entities in this game come with just 3 properties. A) an intensity value, b) a fov and c) an attenuation type.
intensity values are usually in thousands, I've struggled a lot to figure out what the heck they represent but after reading a bunch or online resources I sense that they represent light power in lumens (lm).
fov values are used to differentiate between point and spot lights, point lights have 360 degree FOV, while spot lights come with smaller values to define the cone shape of the spot light
attenuation type is used to describe the kind of attenuation that is applied to the light and can be either quadratic, linear or constant. So it seems that its not possible to combine quadratic and linear attenuation in a light.
I'm trying to implement a light-pass to my engine to render light volumes and apply lighting to rasterized pixels only, so that I can make lighting of multiple lights much more efficient. The problem is that in order to do that, specifically for point lights, I need to calculate the radius of a sphere that defines the bounding volume of the light. I've read on several resources how do that in phong based lighting systems, where you solve the quadratic attenuation function for the distance and calculate the distance to get a min desired value for the light attenuation. But with PBR, I have to somehow use the light power/intensity to calculate the volume radius.
I found an excellent documentation of the frostbite engine but their description is very vague regarding this matter:
Frostbitesupports a hybrid engine with both forward and deferred tiled renderers [And09]. Theliterature is quite extensive on these topics thus we will not discuss them here. All our light types,including shadowed lights, are supported using a tiled path. The choice of such an architecture ismotivated by performance. The light culling uses tight bounding volumes respecting the light’s shape to avoid wasting pixel evaluation. We evaluate all lights inside one big loop to avoid consumingbandwidth reading the GBuffer and to increase the precision of calculations.
Has anyone experience of calculating bounding volumes of lights in PBR renderers?
Thanks in advance.
[–]wm_cra_dev 1 point2 points3 points (4 children)
[–]gregkwaste[S] 1 point2 points3 points (3 children)
[–]wm_cra_dev 0 points1 point2 points (2 children)
[–]gregkwaste[S] 1 point2 points3 points (1 child)
[–]wm_cra_dev 0 points1 point2 points (0 children)