Project Wish  
Project Wish
Project Wish
hardwired

Welcome Guest ( Log In | Register )

> C++ and Clouds
Not rated V  (0 votes)
Post Dec 3 2007, 09:52 AM
I've been learning C++, for the past.. has it been 2 months now? Time flies. I still have -lots- to learn, but grey, minthos, mort, njpaul and corman make it ALOT easier. They deserve medals for putting up with my endless questions wink.gif

Anyways, since I'm so impatient, I dove straight into Ogre. Decided to try my hand at making a simple cloud rendering system, wich, obviously turned complicated. I'm currently planning on modeling realistic Cumulus, Stratocumulus, nimbus, cirrus, Stratus, and Nimbocumulus cloudtypes.

The basic technique wich I am utilizing was described by Niniane Wang in a paper on the Cloudsystem in FS2004 (and FSX for that matter). A quick google will bring it up if you're interested. Basically, I create a few boxes in Max, run a script that turns them into a predefined amount of planes (or billboards if you will), and then run another script wich outputs their position relative to 0,0,0 to a text file. I then parse the textfile and input the data into a Vector, wich I then utilise to create a billboard set in ogre. It's an efficient method that will be able to be used for most cloudtypes, except very large, layered cloudtypes such as stratus, or cirrus.

For lighting, Njpaul wrote me a awesome shader that takes the size of the bounding box and darkens the bottom of the cloud based on that data (so larger clouds will be darker below than smaller (height wise)). All that is left to do for cloud lightning, is a simple method of calculating a vertex position in relation to the cloud centre and light, and then using that data in the shader to light/darken the correct side. For time of day, I'm hoping colour interpolation will suffice.

Anyways, there's still LOTS of work to do, and if I actually manage to write some clean code you'll hopefully see it in the techdemo. smile.gif

Here are some images. Keep in mind that these are very very early. I just crappily generated a bunch of clouds, based on one "cloudfile", so it'll definately look much better in the future.

IPB Image


IPB Image


IPB Image
Go to the top of the page
  Print

> Comments for: C++ and Clouds
greendots
post Dec 18 2007, 09:09 AM
 


Seasoned User
***

Group: Members
Posts: 72
Joined: 3-October 06
Member No.: 664




Great work Cobra! and only two months you say???
User is offlineProfile CardPM
Go to the top of the page
Cobra
post Jan 2 2008, 07:30 AM
 


PW Senior Artist
*******

Group: PW Developer
Posts: 380
Joined: 11-January 05
Member No.: 80




That's right wink.gif
User is offlineProfile CardPM
Go to the top of the page
RicoSuave
post Feb 2 2008, 12:56 AM
 


Master
******

Group: Members
Posts: 228
Joined: 22-March 06
Member No.: 585




Outstanding work, Cobra! It makes me want to burst out in song and dance...

"S I N G I N G
I N
T H E
R A I N"

Seriously though, Cobra, it looks fantastic. This might be too earlier to ask, but can you morph in a cool-looking dragon up in there, or is the size difference too great to distinguish the little guy?

I look forward to your next set of clouds... and the subsequent lightning and shadows thrown by such strikes. BEST OF LUCK, man!
User is offlineProfile CardPM
Go to the top of the page
llavigne
post Apr 1 2008, 01:33 PM
 


Newbie
*

Group: Members
Posts: 0
Joined: 1-April 08
Member No.: 1,140




This is Very nice!
What was the shader Njpaul wrote ?
User is offlineProfile CardPM
Go to the top of the page
Cobra
post Apr 24 2008, 11:30 AM
 


PW Senior Artist
*******

Group: PW Developer
Posts: 380
Joined: 11-January 05
Member No.: 80




Sorry for the late reply, yes, it was nate who wrote the shader smile.gif
User is offlineProfile CardPM
Go to the top of the page

RSS
> Info/Links
About the author
Cobra



PM   Profile Card
Blog categories
Blog stats
Views: 3387
Entries: 3
Blog created: Aug 3 2006, 12:38 AM


Lo-Fi Version Time is now: 29th March 2024 - 05:08 AM
Original skin by: b6gm6n | Conversion by: Chris Y
hardwired
  hardwired
hardwired hardwired
hardwired hardwired