Game Development Community

Cloud rendering challenge

by Michael Perry · in Torque Game Engine · 12/14/2006 (9:06 am) · 23 replies

Hey all! Recently, someone proposed an interesting challenge for cloud rendering in TGE. After asking a few questions about the specifics, here is the general idea:

  • Clouds need to look like water colour illustrations[li]Clouds need an outline[li]Clouds have to be interactive (ie collision, movement, ect)[li]Engine version will be TGE 1.5
For a visual example of how the clouds should look, CLICK HERE

After reading through the forums, I came across this: Foliage Replicator Used for Clouds

Both links gave me the following idea:

  • Create and export a couple different cloud models in a 3D modeling program[li]Texture the models to have the same color scheme and detail as the above image[li]Layer a couple of fxShapeReplicators using the cloud .dts's[li]Change the zOffset of the replicators accordingly, and toggle the Interactions field to true[li]Drastically scale the shape used in the replicator so that they are stretched and sprawling like actual clouds[li]Finally, increase the transparency of the replicated shapes so that they more resemble clouds than solid objects.

So, that's how I was planning on approaching the challenge. I'm open to suggestions, corrections, or completely better ideas =).


Page «Previous 1 2
#1
12/14/2006 (9:54 am)
Http://www.sundog-soft.com/Real-time3Dclouds.htm
:D
#2
12/14/2006 (10:29 am)
Downloading the SDK and demo now. Thanks for the link MB =).

Have you had a chance to implement the SDK in TGE?
#3
12/14/2006 (12:09 pm)
Check their prices before you get to happy :-)

Read this article and see the video: http://www.ofb.net/~eggplant/clouds/

I have done some implementation of clouds based on the replacator code, with some code changes and shaders. Its still not done, and doesnt look realistic - its very hard to do right.

http://www.garagegames.com/blogs/19453/10116

Josh Moore has also done it - also based on the replicators if I recall.
#4
12/14/2006 (12:56 pm)
$250 isnt too bad if you have it to spend.

well considering torque is $100, yeh its pricey.
#5
12/14/2006 (1:27 pm)
Ahhhh - they changed their pricing!!!

When I last checked 2-3 month ago, they wanted ~$5000 for a single game license :-)

So I guess they didnt sell any of those - hehe.
#6
12/14/2006 (2:40 pm)
Looks like the sundog stuff is only for Windows, so if you're looking for a cross-platform solution, this isn't it.
#7
12/14/2006 (6:29 pm)
Wow 5000! yikes
#8
12/15/2006 (2:05 am)
@Andy - on one of the pages they say that they will do a Mac/Linux port once its required.

With the new price, I might actually try to integrate it over my own solution. 250 is a steal
#9
12/15/2006 (6:52 am)
@Thomas: Ah, thanks. I didn't see that. I found their site's organization... challenging.
#10
12/15/2006 (7:59 am)
Hehe - oh yes. Looks very much like a one man shop.

Still - having attempted to make clouds in various attempts, using some 3rd party stuff for 250 is great.

Will give it a shot right now. Seems very easy to integrate - if it works!
#11
12/15/2006 (8:03 am)
Ive been looking as Sundog's Cloud system for our project in TGEA. I implemented the trial system to try and test it, and unfortunately couldnt get rendering to work out right, but I didn't spend too much time on it.


and yes its 250 for the "indie" license, as I talked to one of the authors regarding it and what the pricing would be for those of us without $5000 to spend
#12
12/15/2006 (3:19 pm)
Got it integrated into TGEA nicely into the GFX layer - crashes on enabling the cloud rendering. Will give it a shot again tomorrow (past midnight now, and time to sleep).

Didnt take more than an hour or so to get it integrated.
#13
12/15/2006 (6:53 pm)
Let me know how it turns out Thomas. I'm working on my original idea to see how that turns out. Between the multiple approaches discussed so far, there has to be a close solution.

About your crash. What kind of error is it?
#14
12/16/2006 (1:42 am)
Thats the big problem - I managed to upgrade to MS 4.1 before it was pulled. The debug build crashes on an unrelated bug (I think).

"Cannot allocate VB" - vertex buffer. In the shadow code. Just when I get into the mission.

So I cannot get past that in debug build - down to the real error.

In release I get past the shadow bug and die when I turn on the atmosphere.
#15
12/16/2006 (2:10 am)
@Thomas "Man of Ice" Lund
Quote:"Cannot allocate VB"
ATI Graphic card?
#16
12/16/2006 (2:14 am)
It is a bug Martin, not related to ATI.
#17
12/16/2006 (3:25 am)
Ahhh - I found that someone else posted a bugfix on the forums for that one. Unrelated to the cloud stuff as expected.

With it in place I'm now getting to the real bug inside SilverLining.

Call stack:
TSE_DEBUG.exe!SilverLining::Sky::GetSunOrMoonPosition() 	C++
 	TSE_DEBUG.exe!SilverLining::Atmosphere::ShadeClouds()  + 0x32	C++
 	TSE_DEBUG.exe!SilverLining::Atmosphere::BeginFrame()  + 0x1d5	C++
	TSE_DEBUG.exe!GFXD3DDevice::beginScene()  Line 728	C++

Which is weird, as I have a correct location set

-	location	{latitude=30.000000000000000 longitude=-122.00000000000000 altitude=100.00000000000000 }	SilverLining::Location

Cut'n'pasted from the documentation actually

// Configure where and when we want to be
	SilverLining::Location loc;
        loc.SetLatitude(45);
        loc.SetLongitude(-122); 
        mAtmosphere->GetConditions()->SetLocation(loc);

Time to contact the author and get some support :-) GUess without his sources, I wont get further on this issue.

Will keep you posted.

Buzz me if anyone wants to know what I did to integrate this (might even post a resource once this is running)

-----

edit:

Ahhh - atmosphere doesnt initialize properly for some reason. Cant find anywhere where I can set it into debug mode though to get an error message.
#18
12/17/2006 (9:38 am)
After trying to get that working I also found this link to a free cloud rendering engine.
www.markmark.net/SkyWorks/

I'm gonna take a look at it later.

Bah, the demo with it doesnt work on my computer.... oh well
#19
12/17/2006 (2:19 pm)
OK - got it running in TGEA!

As you can see, the Cirrus Fibratus layer is sticking out of the water and the cumulus clouds render their puffs sideways - also sticking out of the water.

So still some way to go. But I think that Torques coordinate system doesnt work with the SDK. So I mailed the Sun Dog guys to see what they can do about it.

Link to movie:

airaceonline.arcadersplanet.com/movies/AirAce_SilverLining_Test.wmv

~6 MB

Beware crappy flying. The demo SDK has a 2 min limit, and I only have ~30 secs of time once the game starts to start the cloud layers + record the video. So my plane was stalling :-)

If the Sun Dog guys are willing to help out, then I'm sure that this will end up as a working solution pretty fast.
#20
12/17/2006 (3:53 pm)
Wow, that looks pretty cool. Nice job getting it in there. Looks like it's only a matter of time until it's working well.

Any effect on performance?
Page «Previous 1 2