Archived

This topic is now archived and is closed to further replies.

leggyguy

Question about the Volumetric Tutorial

Recommended Posts

Haven''t explored it too much, but I was thinking perhaps this would help me in creating clouds for my flight game. I believe this volumetric fog has to be attached to actual geometry. So my idea is to create funny shaped, transparent, polys covered in this volumetric fog. Then in my imagination it looks like a cloud. You would see the fog effect before you hit it, while inside it visibility is reduced by the fog effect, and youi leave it again when far enough away from the generating polys. You wouldn''t see the generating polys because it is transparent. Now for your advice :-) I was wondering if anyone has tried this. Did it work well, or was there a better way of doing this effect of a cloud? Does this sound like a good way of doing clouds? Or is it inefficent (or plain doesn''t work)? Thanks.

Share this post


Link to post
Share on other sites
Not sure I understand what you mean by "you see the volumetric fog". The fog is a very abstract thing. You can not really say "I want to put a fog there with such shape and that density". Volumetric fog is some visual efect applying to all objects in the scene, but fog actually is not an object in itself.

Share this post


Link to post
Share on other sites
He's talking about volumetric effects, not the "fog" that applies a blend of a specified colour to the screen based on the depth values (eg, the one activated with glEnable(GL_FOG)). Volumetric effects are a fairly recent innovation.

As for how to work with them, I have no real idea myself. That's one thing (of many) that I haven't tackled yet.

EDIT: Just thought I'd mention that I have seen what I believe was this effect in use before. It was on the GC game "Rogue Leader". They used volumetric effects to generate clouds of gas in the cloud city levels. It looked damn sweet, and ran at full framerate. My jaw almost hit the floor when I saw that for the first time.



[edited by - Nemesis2k2 on April 28, 2003 10:05:52 AM]

Share this post


Link to post
Share on other sites
Nemesis that''s the exact effect I am after.

Volumetric fog only affects a portion of the game world, not the entire world, unlike ordinary opengl fog. I am hoping it will work for my purposes.

I shall have a go later this evening when I get in from work. If my wife lets me have the spare time.

Share this post


Link to post
Share on other sites
Volumetric fog really only works if you have geometry behind it. Because you are really just blending onto the geometry that is already there. I''m not sure how well this would work for a flight sim. You might have better luck with a billboarding type scheme.

M

Share this post


Link to post
Share on other sites
I tried it, and it works quite nicely for my effect, but with one problem.

I want the poly''s covered with the volumetric fog to be transparent.

But using the ordinary way to do transparency (normal way I do it anyway, is the same way nehe does in his blending tutorial ages ago) causes the fog to actually be totally transparent too. The fog is actually affected by the blending also, something I didn;t expect.

I shall try using tga''s for my transparency, and see if that helps.


ANyone else with an idea on how to make the poly''s totally transparent but the volumetric fog visible?

Share this post


Link to post
Share on other sites
blending is the final stage of fragment operations in the OpenGL pipeline. And the fog stage does not changes the alpha channel.

Would you like to see your glass tainted by fog ? You don''t really need to, since what''s behind the glass is already tinted by fog.

Share this post


Link to post
Share on other sites