Sign in to follow this  

PBR and light source amount in modern games.

Recommended Posts

Hi guys!

 

I am in half way to PBR implementation of my renderer.

 

I found some ideas, that using PBR, there is no need for big amount of auxiliary light sources.

One of benefits of using deferred renderer is to have a lot of lights and render them in (geom + lights) instead of (geom*lights) draw calls, that is quite cheap.

 

I tried to figure it out, how much real light sources do I need in open environment game, and found not much:

  1. Main light for shadows.
  2. Cube map for skybox/environment ambient.
  3. 3-4 light sources on a scene like fire/explosions.

So here are the questions:

  1. In real games (not a demo, that shows difference in FPS for 16/64/256/1024 light sources), how much light sources are there? I don’t expect answer: “42”, but what about order?
  2. Will PBR remove necessity of placing aux lights or I should use them to proper render scene anyway?
  3. Deferred (as a tool) gives ability to render more lights cheaper.

    Does PBR decrease needed amount of lights to render good graphics?

Thanks in advance!

Edited by Happy SDE

Share this post


Link to post
Share on other sites

1. There is not limit or hard count for the amount of light ( at least excluding hardware and performance ) in a scene. Lights are used by artist to convey a certain mood for ex...and however many lights it takes to convey that mood ( within the performance constraints ), thats how much that will be used.

2. PBR is a technique for more realistic lighting and NOT a replacement for lights in general. Lights are input into the technique so they are no independent of each other. To answer the question.

3. See #2.

Share this post


Link to post
Share on other sites

Does PBR decrease needed amount of lights to render good graphics?

 

I'd say yes if you use (lots of?) enviroment probes for IBL. However there is no simple answer if probes are cheaper than lights - depends on shadowed or not, how to occlude reflections or not, parallax correction or not, etc.

There is also the additional question to place probes manually or automatically.

Share this post


Link to post
Share on other sites
  1. See cgrant post
  2. Many lights are used as an aesthetic reason, not technical. In this concept art for the movie Oblivion: http://founterior.com/wp-content/uploads/2013/08/futuristic-minimalist-living-room-interior.jpg the amount of light sources are way too many to count. Another real life photo of the set of The Enterprise in Star Trek: https://s-media-cache-ak0.pinimg.com/originals/20/06/49/200649cb4470d3cf36182dbe64b8f47c.jpg
  3. Many lights are also used to compensate for the lack of proper GI. This can also be complimented with the use of lots of IBLs. PBR does not solve this problem.

Share this post


Link to post
Share on other sites
Many lights are used as an aesthetic reason, not technical. In this concept art for the movie Oblivion: http://founterior.com/wp-content/uploads/2013/08/futuristic-minimalist-living-room-interior.jpg

Great example!

Here is a new question about the ceiling from this picture: can it be just faked via environment cubemap texture?

 

 

I recently found MJP's MSAAFilter example from here: https://github.com/TheRealMJP/MSAAFilter

and I think it is a great starting point to migrate to PBR.

Especially I am amazed by reflections from skybox.

 

mjp.png

 

 

Assume I have an open world.

On top of it there will be skybox texture with sun/blue sky...

I am going to populate it with robots/buildings.

There will be dynamic light sources like explosions.

 

It seems it should be enough to proper light the scene using skybox and dynamic lights.

Am I missing/forgot something?

 

 

I'd say yes if you use (lots of?) enviroment probes for IBL.

JoeJ, I don't understand this phrase it all, but it is a great starting direction to dig into! :)

Here is another question: I found in the code "Spherical harmonics". Is it related to it?

 

Thank you all!

Edited by Happy SDE

Share this post


Link to post
Share on other sites
JoeJ, on 27 Dec 2016 - 9:00 PM, said: I'd say yes if you use (lots of?) enviroment probes for IBL. JoeJ, I don't understand this phrase it all, but it is a great starting direction to dig into! :) Here is another question: I found in the code "Spherical harmonics". Is it related to it?

 

In my answer i refer with 'lights' to point or spotlights (usually dynamic), and with 'probes' to enviroment from all angles (IBL: Cubemaps, SH... usually static and precomputed).

Hodgman above refers to both of them as lighting - just to clarify and avoid confusion.

 

So what i mean is, you can put any number of static lights into the precomputed enviroment and thus potentially reduce the number of required dynamic lights.

Of course the same is true for an older game using lightmaps for static geometry and ambient cube grid for dynamic objects.

 

 

 

mjp.png Assume I have an open world. On top of it there will be skybox texture with sun/blue sky... I am going to populate it with robots/buildings. There will be dynamic light sources like explosions. It seems it should be enough to proper light the scene using skybox and dynamic lights. Am I missing/forgot something?

 

What you may miss is that this approach works pretty well for, say a flat outdoor landscape scene with a single car.

If we add another car beside, things start looking a bit wrong because the reflections on the car show the sky, but not the other car.

Things go totally wrong if we put a garage around the cars. The cars still show reflection from sky even the garage roof should occlude them.

You would need another enviroment probe for the interior of the garage and proper methds to interpolate multiple probes for transition cases.

 

To be really correct, we would need a dynamic generated enviroment probe for each single spot on each surface for the whole scene.

Some games do this with static precomputed lightmaps containing enviroment information per texel (SH or SG basis) or at least with a main light direction to support bump mapping.

Some games can do this even dynamic to some degree (e.g. using Enlighten).

 

So, technically PBS is just some fast math to render photorealistic materials, but it does not help to solve any of the missing GI problems we have.

This can bee seen wery well in the screenshot: The model is complex and thus missing self reflection and occlusion shows up.

Edited by JoeJ

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this