Clouds

Blitz3D Forums/Blitz3D Programming/Clouds

"Blitz Programer" the clouds you want are possible, but I've never seen them in Blitz - 'FarCry', (just released) was based on 'X-isle' which kind of did the 'puffy' effect nicely (but I think that was purely lighting and colouring - not actually a 3D 'puffy' cloud.

You can play around with cloud textures and various heightmaps to get varying degrees of effectiveness.

Have a look at the following - if you play around with it (search your hard-drive for cloud textures and heightmaps), you can get some impressive results - whispy sunny day clouds, big thick storm clouds - you have to experiment though.

; cloud stuff by puki 
; Locate xfigher in your 3D samples - I knocked this up quick
; this uses the textures in xfighter (as it is convenient)
; remember when changing the textures, you may have to re-scale them
; also you may want to change the height of the clounds, meaning re-scalling them too
; also you may have to change the speed of the clouds - I always move the upper ones more slowly
; certain combinations can look very effective
; experimenting can pay dividends

Graphics3D 800,600,32,1; change this to what you want - I find 32bit (on my set-up) is visually much better
player=CreatePivot()
camera=CreateCamera(player)
CameraClsColor camera,50,50,200; colour the sky
CameraRange camera,1,30000

AmbientLight 200,200,200
light_sun = CreateLight(1)
LightColor light_sun,200,200,100
RotateEntity light_sun,0,-90,0

floor1=CreatePlane()
EntityColor floor1,0,150,0
PositionEntity floor1,0,-2.3,0 
EntityType floor1,2

; find Xfighter in your Samples directory and use the textures in there
sky=CreatePlane()
cloud=LoadTexture("cloud_2.bmp",2)
ScaleTexture cloud,5000,5000
PositionEntity sky,0,800,0
TurnEntity sky,0,0,180
EntityTexture sky,cloud

sky2=CreatePlane()
cloud2=LoadTexture("hmap_1024.bmp",2); this is actually a heightmap
ScaleTexture cloud2,10000,10000
PositionEntity sky2,0,1000,0
TurnEntity sky2,0,0,180
EntityTexture sky2,cloud2

While Not KeyHit(1)

 mx#=-.25*MouseXSpeed()
 my#=.25*MouseYSpeed()
 MoveMouse GraphicsWidth()/2,GraphicsHeight()/2

 TurnEntity player,0,mx#,0,1
 TurnEntity camera,my#,0,0,0

cl#=cl-.0003; this is the speed of the lower cloud level
PositionTexture cloud,cl,cl
cl2#=cl2-.00002; this is the speed of the upper cloud level
PositionTexture cloud2,cl2,cl2

UpdateWorld
RenderWorld
Flip 

Wend
End