Jump to content

  • Log In with Google      Sign In   
  • Create Account


drawing clouds in a flight sim


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
12 replies to this topic

#1 Norman Barrows   Crossbones+   -  Reputation: 1992

Like
0Likes
Like

Posted 26 March 2013 - 02:11 PM

anyone out there done a flight sim where you drew clouds you could fly through?

 

i'm working on a flight sim right now, and a simple skybox doesn't seem to be the way to go. maybe if its REALLY big, and used just as a "horizon" type background....

 

or do I just need to move it vertically with the camera as well as horizontally, make it really tall, and have it extend below the horizon ?

 

I've heard things about MS flightsim 2004. often mentioned in threads. custom models and textures. and alpha bending most likely.

 

 

 

 


Norm Barrows

Rockland Software Productions

"Building PC games since 1988"

 

rocklandsoftware.net

 


Sponsor:

#2 Motoky   Members   -  Reputation: 178

Like
0Likes
Like

Posted 26 March 2013 - 03:57 PM

I'm still a newbie, but I would probably suggest using some sort of particle system.

 

I did think of using a 3D model of a cloud, but when you go through it, it wouldn't display anything inside it. So a particle system would work well.

 

 

The way you would implement it would depend on what API or engine you are using.



#3 Norman Barrows   Crossbones+   -  Reputation: 1992

Like
0Likes
Like

Posted 27 March 2013 - 08:06 AM

I'm still a newbie, but I would probably suggest using some sort of particle system

 

correct. unless they're hard coded to some location and don't move. but i haven't seen any clouds nailed to the sky in real life, so they probably ought to move <g>.

 

its the drawing of the particles thats the tricky part.

 

 

I did think of using a 3D model of a cloud, but when you go through it, it wouldn't display anything inside it

 

just turn off backface cull.     

 

but a box mesh wouldn't look right. i suspect MS fight sim 2004 used meshes like the cardboard dividers in a case of wine. IE stacks of quads in all 3 directions, with alpha blended cloud images on each quad.

 

in another title i'm working on, there are 20 particles, a particle mesh is an almost flat octahedron, and each mesh has 4 clouds on it, yielding 80 clouds total. but it only does alpha test. the result is somewhat akin to clouds in roadrunner cartoons.


Edited by Norman Barrows, 27 March 2013 - 08:06 AM.

Norm Barrows

Rockland Software Productions

"Building PC games since 1988"

 

rocklandsoftware.net

 


#4 tool_2046   Members   -  Reputation: 1006

Like
2Likes
Like

Posted 27 March 2013 - 07:00 PM

but a box mesh wouldn't look right. i suspect MS fight sim 2004 used meshes like the cardboard dividers in a case of wine. IE stacks of quads in all 3 directions, with alpha blended cloud images on each quad.

If your are curious about Microsoft Flight Simulator 2004's clouds, HERE'S the paper.

#5 Mr_F_   Members   -  Reputation: 279

Like
0Likes
Like

Posted 28 March 2013 - 04:02 PM

I once worked on a flight sim and also had to do the clouds you can fly through. I started with Wang's (MFS 2004) approach and added some shader tricks later.

Results were not super realistic, but, well, they worked. We were able to set different density from clear to totally overcast and fly through.

http://oi50.tinypic.com/fc7f5y.jpg

http://oi48.tinypic.com/2njzuis.jpg

http://oi50.tinypic.com/5clisk.jpg

http://oi45.tinypic.com/2v8onl2.jpg

http://oi45.tinypic.com/2yu0pxh.jpg

 

Each cloud is made of 5-20 billboards and there are around 0-200 clouds on the sky. Billboard positions inside a cloud are randomly generated when the game starts. On runtime they were "tiled" - I just moved them according to the wind and when a cloud moved beyond certain limit from camera, it then would respawn far away on the other side of the sky and will start moving again.

All billboards of all clouds are drawn in 1 DIP, thanks to instancing. However, due to alpha sorting, instancing buffer has to be updated each frame (there must be a better way).

Shader tricks include making the bottom of cumulus clouds look kinda flat, direct lighting, simple fake SSS and alpha/billboard rotation changes when inside a cloud.


Edited by Mr_F_, 28 March 2013 - 04:08 PM.


#6 Lightness1024   Members   -  Reputation: 704

Like
0Likes
Like

Posted 29 March 2013 - 09:14 AM

There are many ways to render clouds, and many more yet to discover. The era of computing power that starts will open on much awesomeness in that area.

Mark Harris and Wang are two pioneer, with Dobashi et al, (http://nis-ei.eng.hokudai.ac.jp/~doba/pub_doba.html), Antoine Bouthors, and also the guys from Lumion3d.

Flavien Brebion experimented on Dobashi's method:

http://www.gamedev.net/blog/73/entry-125220-volumetric-clouds/

I also implemented that method, it also exists in commercial products (silverlining..), and a demo of the GDC 2008.

 

For the "color" it always boils down to the problem of scattering. I recommend the reference in the papers of Antoine Bouthors about that, they are the most precise and scientifically correct. People generally struggle with higher order scatterings, therefore technics limits themselves to order 0 and 1 most of the time (Mark Harris). And the higher orders are just artistically decided as an ambience color. Or some empirical tricks using sky irradiance and desaturation modulated by an empirical albedo.

 

For the shape, either fractal, either state machine (Dobashi), either mesh (last Bouthors) + hypertexture for borders enrichment. but the enrichment would be much faster with a fin-based method. I personally intend to develop a procedural mesh construction + fractal enrichment method some day. I forsee to store the distance towards exit in each vertex (in any direction) stored in spherical harmonics, this would allow immediate shading for 0 and 1-scattering.

 

The rendering of the inside should be made with a separate method, a screen space method since the cloud appear everywhere when inside of it, and objects penetrating cloud volumes can be shaded using the concept of spherical billboards.



#7 Norman Barrows   Crossbones+   -  Reputation: 1992

Like
0Likes
Like

Posted 31 March 2013 - 01:52 AM

If your are curious about Microsoft Flight Simulator 2004's clouds, HERE'S the paper.

 

cool! i've heard a lot about these. thanks!


Norm Barrows

Rockland Software Productions

"Building PC games since 1988"

 

rocklandsoftware.net

 


#8 Norman Barrows   Crossbones+   -  Reputation: 1992

Like
0Likes
Like

Posted 31 March 2013 - 01:58 AM

Each cloud is made of 5-20 billboards and there are around 0-200 clouds on the sky. Billboard positions inside a cloud are randomly generated when the game starts. On runtime they were "tiled" - I just moved them according to the wind and when a cloud moved beyond certain limit from camera, it then would respawn far away on the other side of the sky and will start moving again.

 

very similar to the technique i used in the previous version of the "other title" mentioned above. but it had just one billboard per cloud, and i think it was 400 clouds, "tiled" or "wraparound particle system" as i call it.


Norm Barrows

Rockland Software Productions

"Building PC games since 1988"

 

rocklandsoftware.net

 


#9 Norman Barrows   Crossbones+   -  Reputation: 1992

Like
0Likes
Like

Posted 31 March 2013 - 02:06 AM

The rendering of the inside should be made with a separate method, a screen space method since the cloud appear everywhere when inside of it

 

thanks for the tip!

 

BTW, did you see my last question to you in the related thread on methods for drawing the sky?

I was hoping for a confirmation of my summary of your method discussed there.


Norm Barrows

Rockland Software Productions

"Building PC games since 1988"

 

rocklandsoftware.net

 


#10 Lightness1024   Members   -  Reputation: 704

Like
0Likes
Like

Posted 02 April 2013 - 09:30 AM

The rendering of the inside should be made with a separate method, a screen space method since the cloud appear everywhere when inside of it

 

thanks for the tip!

 

BTW, did you see my last question to you in the related thread on methods for drawing the sky?

I was hoping for a confirmation of my summary of your method discussed there.

oops sorry i hadn't seen. fixed :)



#11 Boreal Games   Members   -  Reputation: 777

Like
0Likes
Like

Posted 02 April 2013 - 06:56 PM

The technique I've been thinking of implementing is based on particles.  Basically, you sample a 4D noise function that creates animated clouds and create particles for each sample, varying size based on the density of the function.



#12 Lightness1024   Members   -  Reputation: 704

Like
0Likes
Like

Posted 03 April 2013 - 08:33 AM

The technique I've been thinking of implementing is based on particles.  Basically, you sample a 4D noise function that creates animated clouds and create particles for each sample, varying size based on the density of the function.

Yes that is a nice idea, it can definitely create a cool effect. a bit heavy on the sides perhaps, also will need serious thinking about lighting. Scattering is not solved with this solution. There are some people who did that already, I can't finf the video again, but this one looks about like that:

other interesting struff from the guy developing the Unity Nuaj plugin:



#13 Norman Barrows   Crossbones+   -  Reputation: 1992

Like
0Likes
Like

Posted 04 April 2013 - 10:00 AM

other interesting struff from the guy developing the Unity Nuaj plugin:

 

the lighting really makes a big difference, doesn't it?

 

in the two videos posted, the lighting effects on the first one really make a difference as to how realistic they look.


Norm Barrows

Rockland Software Productions

"Building PC games since 1988"

 

rocklandsoftware.net

 





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS