Advertisement

Question about the Volumetric Tutorial

Started by April 28, 2003 04:52 AM
5 comments, last by leggyguy 21 years, 10 months ago
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.
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.
Advertisement
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]
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.
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
--------------------------------------------------"I have never let my schooling interfere with my education. " --- M.TwainMarcus Hayswww.phrenicgames.com
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?
Advertisement
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.

This topic is closed to new replies.

Advertisement