PDA

View Full Version : volumetric clouds



JanHH
07-19-2003, 08:22 PM
Hello,

I am working on a program that has to render volumetric clouds with impostors (like in http://www.cs.unc.edu/~harrism/SkyWorks/).

So far, everything works fine expect one thing: the cloud itself, the arrangement of the particles that make up the cloud. I am looking for an algorithm that creates clouds out of particles. Does anyone know about that?

Thanks
Jan

JanHH
07-19-2003, 08:24 PM
"except" not "expect"

JustHanging
07-19-2003, 10:59 PM
Hi,

You could generate the clouds as perlin noise, sample it on some regular grid and create particles where the noise function exceeds some isovalue. You can also vary the particle size, opacity etc. according to the noise function.

-Ilkka

JanHH
07-20-2003, 06:57 AM
sounds interesting.. do you have an example and/or information page about perlin noise (never heard of that before)?

Jan

JustHanging
07-20-2003, 07:35 AM
Never heard of Perlin noise? Well, this one looks ok: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm

-Ilkka

JanHH
07-20-2003, 07:48 AM
I Guess i just didn't know the word as I am from germany. Of course i know weisses rauschen etc. But the url seems great, thanks http://www.opengl.org/discussion_boards/ubb/smile.gif.

Jan

kieranatwork
07-20-2003, 09:42 AM
Take a look at this: http://expert.ics.purdue.edu/~schpokj/research/purpl/clouds/index.html

Relic
07-21-2003, 06:02 AM
Why not looking at the real thing: http://www.opengl.org/discussion_boards/ubb/wink.gif http://www.kenperlin.com/

zeckensack
07-21-2003, 06:54 AM
Originally posted by JanHH:
I Guess i just didn't know the word as I am from germany. Of course i know weisses rauschen etc. But the url seems great, thanks http://www.opengl.org/discussion_boards/ubb/smile.gif.

JanPerlin noise is not the same as white noise. It's a type of noise generated in a very special way. This is done to ensure that it has certain properties, most importantly the 'bumps' in the noise all have roughly the same size. This is very important for compositing.

Though perlin noise is more or less random, it has a specific frequency. You can then compose multiple 'octaves' of perlin noise to achieve a desired spectrum. This is actually very similar to audio processing.

JustHanging
07-21-2003, 08:29 AM
Originally posted by Relic:
Why not looking at the real thing: http://www.opengl.org/discussion_boards/ubb/wink.gif
Nothing to do with the real thing. If the real thing is what you want, look out of your window http://www.opengl.org/discussion_boards/ubb/smile.gif

Sorry, your link was very good, I just had to...

-Ilkka

okapota
07-21-2003, 08:56 AM
im working in a modelling technique that uses fluid dynamics to create the cloud.
my problem is solving the navier-stokes equations. this is a phisically based approch, but the results are good, and there is no need for artistic input. look in harris's new paper, he has some information about the process. there are also a few siggraph papers about it.


PS. if anyone here has done that, i would really appriciate some help http://www.opengl.org/discussion_boards/ubb/smile.gif

JanHH
07-21-2003, 11:12 AM
at the moment i have a 3d perlin noise function that rendes weird looking artifacts, but definitely not clouds http://www.opengl.org/discussion_boards/ubb/wink.gif.

JustHanging
07-21-2003, 11:57 AM
Of course you have to modify the pure noise function to make it look like clouds. Try multiplying it with some function like
f(x, y, z)=clamp(1-y^2)
to limit the clouds to a certain height. Then set any value below 0.3 (for example) to 0. And so on, I think you get the idea.

-Ilkka

JanHH
07-21-2003, 01:50 PM
in fact I found out that my noise function seems to be wrong and that that's what the problem is (at the moment). So I'm still optimistic.. I think the idea of perlin noise is still the right one for this case.

JanHH
07-21-2003, 04:38 PM
.. and still it looks like crap and I am getting frustrated. okapota, what is "harris' new paper"?

JanHH
07-21-2003, 07:29 PM
at the moment, it is as follows:

I have a regular 3D grid (for example, 20x10x20).

Then I fill each grid cell with a random value (which is in fact three random values, one one-dimensional perlin noise function for each dimension, multiplied with each other).

This random number in each grid cell, multiplied by a constant factor (for example, 10) gives the number of particles that later are randomly distributed in the space this grid cell makes up (given a space width for each grid cell).

So I do, and it looks like crap, although I think the idea is OK. Any Ideas?

Thanks
Jan

Pop N Fresh
07-21-2003, 08:05 PM
Have you taken a look at the links available from the Virtual Terrain Project? http://www.vterrain.org/Atmosphere/Clouds/index.html

JanHH
07-21-2003, 08:42 PM
yes i did. but could not really find a solution, altough I guess I have to look a little further there.

The task itself is pretty simple: you have a space with an x-, y- and z-width, and you have n particles. place the particles inside of the space so if you render the whole thing, it looks like a cloud.

arghh.. is it possible that this is so difficult, or am I just so stupid?

Jan

Ysaneya
07-22-2003, 12:11 AM
You should look further, i seem to remember a paper on vterrain's page, based on a voxel of cloud particles, which i implemented successfully and gave very nice results. After that i rendered the cloud with billboards, and if the cloud is too far away, impostors. That's pretty much the standard technique in flight simulators (like FS2002) nowadays.

Y.

JanHH
07-22-2003, 06:36 AM
yes and that's exactly what I am doing. I would be extremely happy if I could read that paper, but haven't found this one yet there. could you tell me the url?

Thanks
Jan

okapota
07-22-2003, 11:06 AM
go to mark harris's site, and its there. http://www.cs.unc.edu/~harrism/

currectly im implementing hybrid of several techniques. i use haris's phase transition functions, and from another paper i take the buoyancy forces. this gives me good results, but its not finished yet.

Ysaneya
07-22-2003, 11:21 AM
I implemented this one:
http://nis-lab.is.s.u-tokyo.ac.jp/~nis/abs_sig.html

Don't be afraid, it's not that theoric, and the algorithms are easy to implement.

Y.

JanHH
07-22-2003, 03:58 PM
what exactly from this page did you implement? but I'm close to success with my approach, looks already "cloudy" http://www.opengl.org/discussion_boards/ubb/smile.gif.

Jan

JanHH
07-22-2003, 07:10 PM
In fact it looks great now http://www.opengl.org/discussion_boards/ubb/wink.gif But I can't post any pics because I do not have a web page to post them.. maybe I should get one. Anyone curious to see my clouds http://www.opengl.org/discussion_boards/ubb/wink.gif ?

JustHanging
07-22-2003, 11:24 PM
Sure, just get some free webspace from geocities or the like.

-Ilkka

JanHH
07-23-2003, 09:11 AM
OK here are some pics:
http://de.geocities.com/westphj2003/clouds.html

I would really like to know if you think this is "good" or just beginner's stuff.. as the code is rather a hack at the moment, but at least I am quite surprised that it looks that good (as I think).

Thanks
Jan

okapota
07-23-2003, 10:07 AM
it looks really good.
im having trouble implementing the physics method.

JanHH
07-23-2003, 01:40 PM
I used a very simple algorithm for generating the clouds, there is a regular grid (for example 40x20x40) which I fill with random vaules from a 3D Perlin Noise function. These values are then modulated with a distance attenuation function to make it "round". An finally, if the value in a grid cell is above a certain threshold value, a particle is placed in this cell.

JustHanging
07-25-2003, 12:21 AM
Yes, they look really nice.

I wouldn't call this beginners stuff, altough I guess it's not exactly never-been-done-before either. But you can definetly feel proud of them http://www.opengl.org/discussion_boards/ubb/smile.gif

-Ilkka

JanHH
07-25-2003, 09:28 AM
thanks :-).