Jump to content
  • Advertisement
Sign in to follow this  
Pikkolini

Searching for a cheap 3D cloud algorithm

This topic is 1422 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
Advertisement

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

http://reset-game.net/?p=284

 

There are good explanation that covers bit more than just clouds but everything looks really great. In comments there are more information and everything should be doable without compute shaders but some dx11 features might help with performance.

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


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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!