simple clouds (Image heavy)

Miscellaneous Forums/Graphics Showcase/simple clouds (Image heavy)







cloudtexture(4)=LoadTexture("skins\cloud4.png",2)
Global cloudcount=200
Global cloudHeight=200
Global cloudcos#
Global cloudCOSDIR=1
PositionEntity cloudpivot,0,Cloudheight,0
PositionEntity cloudpivot2,0,cloudheight,0

Type cloud
 Field ent
 End Type

Function initclouds()
For I=1 To cloudcount
 cloud.cloud=New cloud
 tp=Rand(1,2)
 If tp=1 Then 
 cloud\ent=CreateSprite(cloudpivot)
 cn=Rand(1,5)
 Else
 cloud\ent=CreateSprite(cloudpivot2)
 EndIf
 EntityTexture cloud\ent,cloudtexture(Rand(1,4))
 EntityBlend cloud\ent,0
 sc#=Rnd(50,130)

 ScaleSprite cloud\ent,sc,sc 
 cr=Rand(190,250)
 EntityColor cloud\ent,cr,cr,cr
 PositionEntity cloud\ent,Rand(-600,600),Rand(cloudheight-80,cloudheight+80),Rand(-600,600)
 EntityAutoFade cloud\ENT,0,900
 Next
End Function

Function updateclouds()
 cloudCOS#=cloudCOS#+Rnd(1,2)
 TurnEntity cloudPIVOT,0,.012,0
 TurnEntity cloudPIVOT2,0,-.01,0
End Function

Function setstormy()
AmbientLight 150,150,225
For cloud.cloud=Each cloud
 sc#=Rnd(10,70)
 cr=Rand(100,200)
 cg=Rand(100,200)
 cb=Rand(200,255)
 EntityColor cloud\ent,cr,cg,cb
 Next
End Function

Function SetClear()
AmbientLight 255,255,255
For cloud.cloud=Each cloud
 sc#=Rnd(10,70)
 cr=Rand(200,250)
 EntityColor cloud\ent,cr,cr,cr
 Next
End Function

Function freeclouds()
 For cl.cloud=Each cloud
   FreeEntity cl\ent
   Delete cl
   Next
End Function

The simple cloud setup plops clouds at a given height above your scene at a given range, and given density., and with a call to update them. they move about gently. simple calls can change the color as well to represent stormy ect.

it's just {codebox} and {/codebox}

Obviously replace the '{' with '['

Forum codes:

http://www.blitzbasic.com/faq/faq_entry.php?id=2

cool!

Wow, that is cool. For Mapcrafter 3D view I assume?!

Thanks. yes those shots are from a map created with Mapcrafter. Viewed in MC 3D mode.

Myself I don't like them. They just look like smoke, not 'cotton woolly' enough for clouds and too grey - like storm clouds but not dense enough to be storm clouds. I think I prefer a skybox combined with infinite textured planes layered over each other with cloudy textures which scroll gradually - although you obviously cannot fly through such clouds as they only look okay from the ground.

So dont use them.. in fact.. i didnt supply a cloud texture.. so what are you yapping about? Use your own textures, or dont use this at all. I think from my screenshots it should be clear that i wasnt going for any kind of real world cloud simulation.. I can see why alot of people dont bother sharing around here... Jeez

Looks nice

They're cool! Reminds me of looking out the window when we were flying back into England...but with an English backdrop of course.

reminds me of War of The Worlds...

... or Close Encounters of The Third Kind.


--Mike

They look cool man. I tried something similar myself. Do you have LOD on these? Would be cool to fly up and the system produces more clouds as you near them. Looks cracking though :o)

No lod, its a crude system. wich works for my needs atm.. i will probably optimize it later when my game is closer to finished.. im too busy with game mechanics atm :)

Right now its an entityautofade setup.

Hi RifRaf,
Looks VERY good look through the clouds but a bit 'bumpy' in the 3rd screenshot.

Rad!! I dig em! I like that you gave em the ability to turn different colors. Allows you to set a mood very nicel I would imagine. Red for E-vil, pink for wholesome goodness. Well done!

@tonyg
thanks.. yeah im not much of an artist..
I ran psp and quickly splatted some white and grey paint
down.. put a very rough alpha map on it. the cloud
textures could be much better..

I love em, they go very well with the "mini" feel of the whole map. Your mapcraft tool has a very unique feel to it, where everything around you feels exadurated and 'cute' but in a realistic way. I love it.

Could you try the codes again?

Sorry code boxes were messed up across the entire forum. wasnt anything i could do.. seem to be ok now though.