Doing local fog (again)

Started by
10 comments, last by spek 9 years, 11 months ago

For an interesting general volumetric fog solution check out Assasin Creed 4 presentations by Bart Wro?ski: http://bartwronski.com/publications/

Advertisement

[attachment=21882:T22_FoggyMetroTube.jpg]

Implemented the "Deferred Particle Lighting" technique Frenetic Pony mentioned earlier.

And I'm pretty pleased, although there is a catch when using larger and/or moving particles. Bigger particles (say at least half a square meter) suddenly change color when moving in or outside the shadows. Which is a logical price to pay when only lighting the center. Maybe it can be improved a little bit by lighting the 4 billboard corner vertices instead of the center "particle point".

Sorting

Next step is to do something about the sorting / better blending, as the (moving) particles tend to "pop" now. I didn't read the "Weighted Blend Order independant" paper from above yet, but I suppose it doesn't need any sorting? In case I do need sorting, I'm not so sure if my current system works. Instead of 1 giga-VBO that provides space for all particles, each particle-generator has its own VBO. So sorting withing a generator works, but I can't sort all of them in case multiple particle fields intersect. I also wonder if sorting out one big VBO would be useful at all, since I still have to render the individual particle generators one-by-one:


for each particleGenerator
     apply textures / parameters / shaders for this effect
     generator.renderVBO();

Not being able to perfectly sort everything won't be a very big drama, but nevertheless, any smart tricks there?

@Hodgeman

Thanks for the hints! I'm using multiple blending modes mixed now (additive, multiply, modulation,...). You think, asides from emissive particles such as fire, that a single methods can be enough to do both additive "gassy" substances, as well as smoggy stuff that darkens the scene?

-edit-

Stupid question, you already answered that. Dark color but high alpha darkens/replaces the color. Bright color & low alpha adds up. Thus it works for both situations. Nice:)

@Krzystof

Thanks for the reads! Starting now smile.png

This topic is closed to new replies.

Advertisement