Volumetric cloud discussion

im trying to add volumetric cloud to the skydome system im delevoping. heres the reason y i have to use volumetric clouds:

  1. the clouds need to be affected by the sun/moon light.
  2. the clouds need to cast shadow on the terrain.
  3. the clouds need to move realistically.



    i think the best option for me is to use the particle system with quad particles + cloud texture.



    heres my precudure

yes. no prob.



if you find improvements, share it back please :wink:



(modified) post is in section USER_CODE in this forum



here http://www.jmonkeyengine.com/jmeforum/index.php?topic=6008.0



screenshot:

i have this done in a glsl shader.



any interests :wink:

Any chance of sharing the shader?  XD

that doesn't really look volumetric.

this does: http://img471.imageshack.us/img471/9137/spookyir4.jpg

you'd "simply" have to make it react to lightsources. currently, the fog ignores them. i'd simulate it by defining a center and adjust the brightness of the particles. closer to lightsource than the center -> brighter. else: darker. movement can be added (windinfluence), and for the shadow casting…well…

no good idea so far.

it's a fake. only usable for cloudlayers in the sky.



show in user_code to get the source

im think this is probably the effect i wanna achieve







any ideas?

Well, if you don't plan on your characters flying through the sky you can do the following:



  Create two textures, one with the cloud in real color (with transparency in order to see the sky), and another one in black with the same transparency. The you can use projected texture to simulate the shadow casting of the cloud into the ground. This would allow you to set the clouds as realistic as you need them, as well as as volumetric.

duenez said:

Well, if you don't plan on your characters flying through the sky you can do the following:

What is the perspective? Is there camera going to go inside/between the clouds? You don't need volumetric clouds if the clouds are always viewed from below (the terrain).

I don't see why would the players be able to see the quad edges… And yes, I suggest rendering the shadows as a projected texture that is mostly black and happens to have the same shape as another texture mostly white that happens to resemble a volumetric cloud. Wouldn't this solve the problem is a cheap way without worrying about polygons and shadow computations?

Momoko_Fan said:

What is the perspective? Is there camera going to go inside/between the clouds? You don't need volumetric clouds if the clouds are always viewed from below (the terrain).


yes the camera will always be below the clouds
duenez said:

I don't see why would the players be able to see the quad edges... And yes, I suggest rendering the shadows as a projected texture that is mostly black and happens to have the same shape as another texture mostly white that happens to resemble a volumetric cloud. Wouldn't this solve the problem is a cheap way without worrying about polygons and shadow computations?


because the clouds r moving right? so if the camera/player does not move, but the clouds r moving lets say z direction, doesnt that mean a little while later, the edges of the quad will be able to be seen?

edges of the shadow or the cloud? I don't quite understand what you mean by edged of quads… I mean, I understand what the edge of a quad is  :stuck_out_tongue: but not your concern.



If the textures are fully transparent near the edges and only contain opaque pixels in the center and you do some projected texture or quad floating in the sky, then I don't see how can edges be a problem.

The cloud texture is moving, but not the quad itself…

Momoko_Fan said:

The cloud texture is moving, but not the quad itself..


that answered my question. ha~

but doesnt that mean the "cloud" shape will stay the same as they move. that is not realistic is it?

is there a way to make a cloud mesh in maya or 3ds max?

You seem to misunderstand what I meant…

Implementing volumetric clouds is much more difficult than using a cloud texture (which you don't need anyway since the camera is always below), so you don't have cloud shapes which move, you use a texture instead. You also won't be making clouds in 3dsmax or maya because clouds are a texture, therefore you use a cloud creator application or generate them during the game.

Momoko_Fan said:

You seem to misunderstand what I meant..
Implementing volumetric clouds is much more difficult than using a cloud texture (which you don't need anyway since the camera is always below), so you don't have cloud shapes which move, you use a texture instead. You also won't be making clouds in 3dsmax or maya because clouds are a texture, therefore you use a cloud creator application or generate them during the game.


i understand what u meant. and thats y i asked the question.

i know that the clouds will be a big texture on a quad. and the texture itself is moving to simulate clouds motion. then the problem is that they texture will stay the same as it moves right? but if it is a real mesh cloud, when it moves u should c different parts of it. when it is directly above the camera, u should c its bottom. when it moves far away from the camera, u should c half of its bottom and half of its side. and how can this be achieved using texture translation?

you could use a texture showing the complete surface of a cloud, kind of "fisheye backwards" and only show a part of it depending on your position

Oh, I see, I meant move the quad with the texture, not only the texture.