Deferred shading

Been reading up on lighting methods in blender GE. A friend of mine pointed out an article (non-blender related) on deferred shading. Still not sure how that all works, but I was wondering if it’s possible (I saw some youtube vids, but no additional info) and whether it takes your fps down or does it improve the general real-time render speed?

I’m actually trying to create an environment with real-time shading, but the spot tends to not work for bigger environments…and it would also kill any machine when you have a complex scene.

Thanks in advance! :smiley:

The Blender Game Engine does not currently support deferred shading. If you are using a lot of lights, deferred shading would improve your frame rates.

@ Kupoman
Thanks for the reply! That’s a bummer. :frowning:
Is there any other way to fake lighting in the GE? I do know of the baking…but I would like a way where you can change the lighting direction…and that then updates the shadows.
Also, do you perhaps know why the spot doesn’t seem to work for bigger sets?

Thanks!

Baking is the biggest thing I can think of for gaining performance on lighting. The spot is sucking up resources because it has to cast a lot of shadows for a big scene. Dynamic shadows are resource intensive. If you go to the spot and turn of the shadows you will probably see a good improvement in performance.

Why do you don’t use a smaler spot that lit up only the objects that you can see? So each spot costs ~10Fps. I have a GeForce GTX 460.

Just some information on how dynamic shadows work and why the are slow:

First, each spot lamp that casts shadows must render a shadow map. This involves setting up a camera from the perspective of the spot lamp and then rendering your scene with no color. Yup, a whole extra render for each spot with dynamic shadows. That’s slow enough, but then you need to make use of the shadow buffer. Each material that can receive shadows must now do texture lookups in each shadow map. If you have a lot of objects/materials, this can also take a while.

So, for each spot lamp with shadows that you add, think about all the extra work you’re placing on the engine. :wink:

So, I’d recommend looking into light baking and SSAO for most of your shading needs. Then, just use one well placed spot lamp to cast shadows on what the player can currently see. Or, create spot lamps in strategic spots, and then create some sort of light culling system so that only needed spot lamps are doing shadow calculations.