demo: color bleed from spotlight

Hi,
This is a simple idea, and it actually works.

concept:
http://img63.imageshack.us/img63/8753/cheapcolorbleedconcept.jpg

comaprison screenshot (with and without color bleed):
http://img138.imageshack.us/img138/336/screensg.jpg

few more pictures:
http://img138.imageshack.us/img138/2933/screen1m.jpg

http://img43.imageshack.us/img43/9194/screen2vz.jpg

blend:
http://www.pasteall.org/blend/1488

Controls as usual…

Spacebar - shows the points of the place where the color samples are taken (turns color bleed white).

1, 2, 3 - different quality depth of field filters.

I can`t find any use of it, except for a horror game with green zombies, blood and white walls…

Cool :slight_smile: BTW, this idea is similar to the ‘instant radiosity’ algorithm, you may be interested to check it out.

Hey, your`e right. It is quite similar technique… though I think Blender might die having 250 light sources in a scene…

250 light sources… Deferred lighting could do that, but it would require changing some of the GE’s rendering code.

I’m still trying to figure out exactly how it works, but here is a rudimentary explanation. Anyone with the knowledge please correct me if I’m wrong.

  • Render the scene, except in the pixel shader, store all the pixel info used for lighting in several textures, card support for Multiple Render Targets would make this easier. Things like the normal of the pixel, the color of the objects texture at that point, z-depth, etc.
  • Have bounding boxes around the volume that each light effects, cone for directional lights and a box for point lights.
  • Render these bounding meshes with a pixel shader that looks up the info from the first render based on screen position of the current pixel. Check if the z-depth of the pre-rendered pixel is close to the light. If it is, use the other info stored in the texture to plug into the light equation.

Did that make sense? You only need to render the scene once, then render the lights like regular objects. Now that I think about it, the concept is kinda of similar to the atmospheric demo martinsh released, using a mesh to catch the cumulative color of a volume. More detailed, less direct explanation of deferred shading.

Sorry for being somewhat off topic, but I felt this was a good place to bring this up.

good job ,got that idea some months ago :stuck_out_tongue:

It would be great if someone could add support for deferred lighting.

Your color bleeding technique is looking very good. The concept drawings are a nice addition too. :slight_smile: They make me like this thread. :smiley:

re-upload, please?

What an awesome idea! I love it and its quite a simple way to achieve a really impressive effect. The diagrams are a great help for some of us lesser beings too :wink:

can someone re upload?

here you go, for Blender 2.6:
http://dl.dropbox.com/u/11542084/dof_spotlight_bleed_2.6.blend

1 - enables also depth of field filter

Great man great, thanks a lot!

Thank you very much!

That is really a nice effect!! Thanks a lot for sharing !