Sign in to follow this  

Searching for a cheap 3D cloud algorithm

This topic is 1116 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone,

 

I am (a bit desperately) searching for a 3D cloud algorithm which matches all criterias:

  1. The clouds can have a static shape and don't need to move
  2. The lighting must be dynamic
  3. The overall impression must be ok. It doesn't need to look 100% realistic but you shall recognize that this things are volumetric looking clouds
  4. The maximum time to render the clouds is 5 milliseconds
  5. I can't use compute shaders (I wish I could)

I know there are a lot of algorithms for clouds like Harris' clouds, ray marching, marching cubes, some other methods to visualize iso surfaces or some cheaper algorithms which still need compute shaders to work in given time. But then I look at a bunch of simulations and games and see there IS an method to render nice looking 3D clouds in short time. I just can't find it.

So I am asking you if anybody knows a method for rendering clouds which match my criterias.

Share this post


Link to post
Share on other sites

Do you need to render all the clouds volumetrically in 5ms? I think MS Flight Sim used to render impostors for clouds more than a certain distance away and only update the impostors with low frequency, probably with the frequency depending inversely on the distance. That way they only had to really render a small subset of the clouds at full volumentric detail each frame, and most of the clouds were billboarded sprites on a low duty cycle update schedule. I guess this depends on how fast your lighting changes and how fast you travel through the clouds. For a real-time flight sim, both of these rates are slow.

Share this post


Link to post
Share on other sites

I won't neccessary go through the clouds but will get close to them.

Lets say I just have a small subset of clouds but those need to be updated every frame.

I already tried to model a cloud with a bunch of small billboards but this was too costly. I generated a lot of points (which were transformed to billboards in the geometry shader) with the CPU but sorting them was just too slow.

Share this post


Link to post
Share on other sites

Unfortunately the posted link uses ray marching, which I already excluded because it looks great but need great hardware.

On what hardware you need to hit under 5ms? Ray marching is not very costly if the data that you march is small enough.

Share this post


Link to post
Share on other sites

I wrote a short post on the implementation of the cloud system I did for our game Heroes & Generals. It doesn't use ray-marching and renders in around 5 ms on a GT 630.

 

http://www.heroesandgenerals.com/community/14126/clear-sky-to-overcast-from-a-rendering-perspective

 

I can give you more details if you need it.

 

Henning

Share this post


Link to post
Share on other sites


On what hardware you need to hit under 5ms? Ray marching is not very costly if the data that you march is small enough.

I tested this Demo and got acceptable results with the lighting DISABLED. And that's currently my problem. I'm still searching for a fast method to light the clouds. The methods I found are all very costly.

 

@semler

Nice method you used. But I will try the ray marching first. If I don't have success I will return to your method smile.png

Share this post


Link to post
Share on other sites

I won't neccessary go through the clouds but will get close to them.

Lets say I just have a small subset of clouds but those need to be updated every frame.

I already tried to model a cloud with a bunch of small billboards but this was too costly. I generated a lot of points (which were transformed to billboards in the geometry shader) with the CPU but sorting them was just too slow.

 

If sorting particles was the bottleneck, you could use a fast order-independent transparency method such as WBOIT to skip sorting altogether.

Share this post


Link to post
Share on other sites

This topic is 1116 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this