CryENGINE 3 Irradiance Volumes vs Frostbite 2 Tiled Lighting

Started by
14 comments, last by MJP 11 years, 6 months ago
Hello,I have managed to implement a technique similar to the one used in battlefield 3(deferred shading with tiled light culling on the compute shader).I however couldn't find any info on the so called Irradiance Volumes.What exactly are they?Are they more efficient than the method used in Battlefield 3?With all the limitations of deferred shading,the method I'm currently using gets really annoying to work with.Wouldn't it be way better to just have a forward renderer that just renders once and in the pixel shader it just loops all lights for each pixel and calculates it's illumination.Why do people say the geometry has to get ''re-drawn'' for each light in the forward rendering approach?
Advertisement
Why do people say the geometry has to get ''re-drawn'' for each light in the forward rendering approach?
On older hardware, you would have a shader that only calculated a single light. Then for each light, you would draw the object using that same shader (and additively blend the 2nd and onwards lights).
After this, people optimized this technique to only require a single pass by having n different shaders that worked for n different lights. If an object was lit by 5 lights, you'd use the 'Forward5Lights' shader.
Today, you can load thousands of lights into a cbuffer/texture/etc, and then use dynamic branching in your shader to loop through each object's required lights (so we're back to one shader and one pass).

[quote name='mrheisenberg' timestamp='1349536872' post='4987413']Why do people say the geometry has to get ''re-drawn'' for each light in the forward rendering approach?
On older hardware, you would have a shader that only calculated a single light. Then for each light, you would draw the object using that same shader (and additively blend the 2nd and onwards lights).
After this, people optimized this technique to only require a single pass by having n different shaders that worked for n different lights. If an object was lit by 5 lights, you'd use the 'Forward5Lights' shader.
Today, you can load thousands of lights into a cbuffer/texture/etc, and then use dynamic branching in your shader to loop through each object's required lights (so we're back to one shader and one pass).
[/quote]

does this mean that deferred shading is obsolete in DirectX11 now?
EDIT:what I mean is - if it was so easy,why do modern game engines use complex GBuffer techniques?
No, deferred shading is still very efficient when you've got high light counts -- especially tiled variants.
However, there's still people working on new variants of forward shading -- it started losing in popularity to deferred, but never truly became obsolete itself. Recently people have taken the ideas from tiled deferred shading and created tiled forward shading too. Different scenes will perform differently on different kinds of rendering pipelines. The best shading pipeline design will change from game to game. Also, it's not as black and white as it used to be. Many games are somewhere in-between forward and deferred.
An alternative to 2D tiled deferred and forward shading is Clustered Deferred and Forward Shading.

Hello,I have managed to implement a technique similar to the one used in battlefield 3(deferred shading with tiled light culling on the compute shader).I however couldn't find any info on the so called Irradiance Volumes.What exactly are they?Are they more efficient than the method used in Battlefield 3?With all the limitations of deferred shading,the method I'm currently using gets really annoying to work with.Wouldn't it be way better to just have a forward renderer that just renders once and in the pixel shader it just loops all lights for each pixel and calculates it's illumination.Why do people say the geometry has to get ''re-drawn'' for each light in the forward rendering approach?


Hey, I think you're talking about this technique:
http://codeflow.org/entries/2012/aug/25/webgl-deferred-irradiance-volumes/

There's live demo of it, it's pretty damn fast and produces nice results. The geometry that reflects indirect light has to be static, but there can be dynamic objects too.

+ I have a question.
You said:

I have managed to implement a technique similar to the one used in battlefield 3
[/quote]

Are you talking about the global illumination from geomerics' enlighten?
If so, can you tell me some more informations about this technique?


Hey, I think you're talking about this technique:
http://codeflow.org/...diance-volumes/

There's live demo of it, it's pretty damn fast and produces nice results. The geometry that reflects indirect light has to be static, but there can be dynamic objects too.

+ I have a question.
You said:

I have managed to implement a technique similar to the one used in battlefield 3


Are you talking about the global illumination from geomerics' enlighten?
If so, can you tell me some more informations about this technique?
[/quote]


No,I was talking that I implemented the Tiled Deferred one after I saw how it works in that sample code.


An alternative to 2D tiled deferred and forward shading is Clustered Deferred and Forward Shading.


So this is like an advanced version of the tiled deferred shading method?Is there a source with more info on this technique?

So this is like an advanced version of the tiled deferred shading method?Is there a source with more info on this technique?

The link had paper about the tech.
http://www.cse.chalm...ustered_shading

They also had new paper about tiled forward shading at siggraph, but there is only pre-print available.
http://www.cse.chalm...ed_forward_talk
It focuses on the ability to light transparent surfaces

CryEngine3 Light Propagation Volume.
http://www.crytek.co...ion_Volumes.pdf
Irradiance volumes (like Tatarchuk's presentation "Irradiance Volumes For Games"), is merely a light probe's technique like the post on codeflow.org previously linked.
Crytek mention irradiance is used in conjunction with LPV. Don't confuse the both methods because they are radically different. In their first Siggraph presentation Crytek mention that they are making the two work together because it is a bad idea to inject sky radiance into the LPV. First, because you would need 55 steps of propagation to make the radiance flows all the way down, second because it will disrupt the flux of other lights because of the poor 2 bands SH, and because it will interfere with itself since sky radiance is hemispherical and has to be injected from 5 faces in the LPV, thridly because a volume full of flux makes the limits very noticeable, lastly because this technique is full of leaks, it is better to keep the flux to a minimum.
So they are using classic dome irradiance for contribution of the sky. They don't say how they solve occlusion from the sky's radiance, and I think they do not. That is why it is nowhere mentioned in their second paper.
Battlefield uses enlightment, which is a radically different approach that has an 'offline' cost, and is less dynamic, also handles occlusions with more difficulty. But LPV is not the holy grail at all in that domain either. The advantage would be the very light cost. A better technique for geometric distant AO would be cone tracing but it costs too much memory and requires heavy shader model 5 code.

Are you talking about the global illumination from geomerics' enlighten?
If so, can you tell me some more informations about this technique?


It's just radiosity performed at run-time, with some of their own particular optimizations. If you read up on classic radiosity techniques you should be able to get a rough idea as to what they're doing. They also have some public presentations on their website.

By the way, I'm pretty sure that BF3 doesn't even use Enlighten at runtime. They don't appear to have any dynamic GI, so they probably just use Enlighten to (very quickly) pre-bake GI for their lightmaps.

This topic is closed to new replies.

Advertisement