10
Jul
09

Volumetric Light Scattering Attempt 2

This attempt is slightly better.
I’ve implemented the shader as a Core Image Filter this time, mainly to make it easier to do the various compositing operations necessary.

I’m still not particularly pleased with it, to be honest. Maybe it just needs something more interesting than 3 cubes…

Advertisements

18 Responses to “Volumetric Light Scattering Attempt 2”


  1. July 10, 2009 at 11:24 pm

    Heyhey

    Been enjoying watching the progress of this – really impressive.

    Tom

  2. 3 Emmanuel Flores Elías
    July 11, 2009 at 11:12 am

    Nice as always!
    Emmanuel

  3. 5 Rob
    July 11, 2009 at 7:01 pm

    Which CI Filter are you using there? Looks very good! Don’t be so hard on yourself!

    • 6 toneburst
      July 11, 2009 at 7:59 pm

      Hi Rob,

      thanks for the encouraging words. There are some annoying glitches I don’t know if it’s possible to fix. But it’s quite a nice effect.

      It’s a custom CIFilter, based on an HLSL shader effect from GPU Gems 3.

      a|x

  4. 8 toneburst
    July 11, 2009 at 8:04 pm

    Cheers, vade!

    a|x

  5. July 12, 2009 at 9:09 pm

    Nice shadows 🙂 I’ld like to see this on something else than cube ^^

  6. 10 toneburst
    July 12, 2009 at 9:28 pm

    Hi pace,

    yeah, I know what you mean. I’m going to try it on some more interesting geometry. When I get around to it…

    a|x

  7. 12 Brendan Bercik
    August 26, 2009 at 3:06 am

    Something that might be cooler would be spheres (think planets orbiting a sun)

  8. 13 toneburst
    August 26, 2009 at 9:43 am

    I hadn’t thought of that. Not so physically-accurate though 😉

    a|x

  9. 14 Luke
    March 11, 2010 at 4:48 pm

    Hi toneburst, this effect is really really nice! 🙂
    I’ve read the GPU Gems article, but I have no idea on how to implement that in QC. I mean: it is a screen-space effect, and it needs at least 2 rendering for the same scene: one with the occluders rendered in black to produce an img I_occ, and one with the scene normally rendered (img I_norm). After a radial blur applied on I_occ, I can then merge the two imgs to obtain the final effect. Is it correct?
    I can write GLSL patch to obtain I_occ, another GLSL to obtain I_norm, and a CI filter to perform the radial blur on I_occ. But I need to do all these things on the same scene and on the same frame. How can I do that in QC? I can’t figure out the solution, can you give me some hint?
    Thank you!

    • 15 toneburst
      March 11, 2010 at 5:56 pm

      Thanks Luke!

      Your summary seems about right. I think this is how I went about it:

      1. Place foreground geometry in Render In Image patch
      2. Create foreground mask with CIFilter to copy alpha of above render to RGB channels
      3. Composite mask on top of background light image (created with Radial Gradient patch)
      4. Zoom-blur this image using code as above
      5. Finally, composite original foreground image on top

      There are issues with this approach, mind you. Rays occluded by further-back geometry get rendered on top or nearer objects. This isn’t always noticeable, but once you know it’s happening, it will probably start to bug you 😉

      a|x

      • 16 Luke
        March 15, 2010 at 9:46 am

        Hi toneburst!
        Here it is a screenshot of my implementation:

        Thank you for your explanation, it was very useful! 🙂

  10. 17 George Toledo
    August 28, 2011 at 7:36 pm

    Hey, this is pretty cool… I saw this the other day, which reminded me of this experiment of yours ( http://vimeo.com/7441085 )


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Twitter

July 2009
M T W T F S S
« Jun   Sep »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Links

Blog Stats

  • 473,930 hits

%d bloggers like this: