🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

3D Clouds

Started by
7 comments, last by Funkymunky 23 years, 11 months ago
I was recently driving through pennsylvania toward pittsburgh, and passed through some higher elevation rounded mountains. The clouds there were spectacular. There were some close enough to my current elevation that I could see them moving by rather quickly as I drove. It was breathtaking, and it made me realize how much I want to be able to fly into those clouds on my computer. So my question for you all deals with 3d clouds. Thoughts? ideas? links? I''m talking big puffy gorgous clouds, whispy clouds, etc. that you can fly around, through, above, under, etc. I checked out TGLTLSBFSASP and saw their cloud cover implementation which was amazing, but it was 2 dimensional and based on a method I''m not sure could be ported to 3d. So now then, on with the thoughts, ideas, links, etc.
Advertisement
Better yet: entire 3d clouds with rain, snow, hail, lightning. It would be cool if they could roll in, in 3d.

Shrapnel Games
You may have a look @ procedurals textures, since they have been used to create 3D clouds.

I got a book with several pics of what is achievable, and it''s pretty nice.
Even if it''s a texture, the code creating it is made such as you can see the cloud from any angle.


-* So many things to do, so little time to spend. *-
-* So many things to do, so little time to spend. *-
I thought about how to do clouds many times before, but never up-close. However, the method I came up with would probably work better inside a cloud than outside:

Use a 3D procedural generator to create a sampling on points of density within an area. For each of these points calculate the lighting. The amount of light that makes it to the point from the source accounts for the ''fog'' in the way. To calculate the fog, a line is traced back to the light source, linearly interpolating the closest density points and intergrating the results {by summing densities by length.} When viewed, the same interpolating process is used, this time from the viewpoint to the points of density. These calculations can either be projected onto a surface {ala Quake 3} or otherwise made visible.
If you are trying to make iregularly shaped clouds then-
One method used by many 3d artists is to use a particle array...
perhaps each particle could have a spherical radius where you
calculate the number of overlayed particles for each pixel...
however this requires software like raytracing (yuk) instead
you could use a particle array of viewer faceing 2 sided quads
(quadlateral polygons) with a color (maybe even texture) applied
to each as well as a opacity (alpha) map... this would be much
faster but would result in less quality.

The only other choice i see is to do the traditional horizontaly
oriented poly w/alpha map

hope to have helped
-mike

----------
exit(0);
Another thing i now note:
if you are useing particle arrays it is very easy to animate the particles, whereas procedual texture generation would also be able to animate is (usually unless you''re useing some weird method) this would be on a per frame basis without any cost (except to transform the particles). also- the cloud would also be able to be seem from inside it.. but unless you used many many particles it would probably fade the fogging as you passed through each face. ( ... maybe you could figure out howto adjust fogging as you passed through each particle (adjusting for near clipping plane) you would also of course have to check which direction you are going from into/out of the center of the cloud.

-mike

just my ² cents



----------

exit(0);
It gets time that Nvidia supports 3D Textures in their cards. I tried to make some Clouds by layering many semitransparent polygons, but it only works with round Textures on it, or i have to recalculate the 2D Texture out of the 3D one every Frame.
With Hardwaresupport for that, would it be much simpler.

An other Problem is the massive Overdraw which occurs when looking through many Layers.

Lars
--------> http://www.larswolter.de <---------
I think they may support 3d texture mapping but last i heard it is still VERY slow... i''m not sure though.
does anyone else know?

-mike
If you can find it cheap you might want to buy Freespace 2 (provided your computer is nice), the nebulas in that game (not to mention everything else!!!) look totally awesome. Not quite what you''re thinking I know, but it''s fairly close and looks real good if your computer can handle it. There''s also lightening and deadly aliens in it .

===========================================

As far as the laws of mathematics refer to reality, they are not certain, and as far as they are certain, they do not refer to reality.

-Albert Einstein

This topic is closed to new replies.

Advertisement