Fog efects?

Blitz3D Forums/Blitz3D Beginners Area/Fog efects?

I don't know how they did it in silent hill, but I have given it a good shot. I made a terrain1 and put it in, then
made a second terrain2 and applied a blurr filter and overlaid the first terrain so that it looks like mist being
blown across the landscape. It looks pretty darn good accept for when I happen to travel under it.
So my first question is, is it possible to texture both sides of the mist terrain? How?

Also I was wondering if placing two verry detailed terrains
together in one map like that will result in major slowdown?
I have terrain detail set to 3000, and 2000. So is there a
polly limit I should live by?

Could you make a copy of the misty terrain and use FlipMesh on it then decide which one to view depending on whether you are on top or underneath?

I thought about that trick but either it would cause a slow down or the parts that are still visable would become
invisable and that would not look real either.
Also a terrain is not a mesh its a matrix...I think.
So mabye reverse vertex order but I am scared that would cause a slowdown also.

I would like to see code on how you applied the filter! I don't know how to do that.
-RZ

sure its simple. I think you missunderstood me though.When I said blurr filter I just ment a photoshop filter. I used
the "wind filter". Then scrolled the texture for animation.
; TerrainY Example
; ----------------

Graphics3D 640,480
SetBuffer BackBuffer()

camera=CreateCamera()
PositionEntity camera,1,1,1

light=CreateLight(3)
PositionEntity light ,1,40,1
RotateEntity light,90,0,0
LightRange light,100
LightConeAngles light,220,220 
lite= CreateLight(3)
PositionEntity lite ,128,40,128
LightColor lite,-50,-50,-50
RotateEntity lite,90,0,0
LightRange lite,100
LightConeAngles lite,220,220

CameraClsColor camera,100,120,150
CameraFogMode camera,True 
 
CameraFogRange camera,-15,50 
CameraFogColor camera,100,120,150 
CameraRange camera,1,85
; Load terrain
terrain=LoadTerrain( "cliffhop.bmp" )
terrain2=LoadTerrain( "cliffhop8.bmp" )
EntityAlpha terrain2,.15
;EntityFX terrain2,32
TerrainShading terrain,True 
TerrainShading terrain2,False  





; Scale terrain
ScaleEntity terrain,4,50,4
ScaleEntity terrain2,4,50,4
;PositionEntity clouds,EntityX(terrain)-20,EntityY(terrain)+35,EntityZ(terrain)

;PositionEntity terrain2,EntityX(terrain),EntityY(terrain)-.5,EntityZ(terrain)

; Texture terrain
grass_tex=LoadTexture( "granitwall.bmp" )
ScaleTexture grass_tex,4,4
EntityTexture terrain,grass_tex,0,1
;textureterrain2
 cloudtex=LoadTexture("weirdsky.bmp")
ScaleTexture cloudtex,8,4
EntityTexture terrain2,cloudtex,0,1

; Set terrain detail, enable vertex morphing
TerrainDetail terrain,3000,True
TerrainDetail terrain2,2000,True

;TextureBlend grass_tex,(0+2) 
TextureBlend cloudtex,2 

;loads an object
;witchprogect=LoadMesh ("freestyle.b3d")
;ScaleEntity witchprogect,.05,.05,.05
;PositionEntity witchprogect,EntityX(terrain)+45,EntityY(terrain)+6.5,EntityZ(terrain)+60
;EntityTexture witchprogect,grass_tex

 
r#=0
While Not KeyDown( 1 )
r#=r#+.001
RotateTexture cloudtex,r#*5 
PositionTexture cloudtex,r#,r#


;TurnEntity witchprogect,0,50,0

If KeyDown( 203 )=True Then x#=x#-0.3
If KeyDown( 205 )=True Then x#=x#+0.3
If KeyDown( 208 )=True Then y#=y#-0.3
If KeyDown( 200 )=True Then y#=y#+0.3
If KeyDown( 44 )=True Then z#=z#-0.3
If KeyDown( 30 )=True Then z#=z#+0.3

If KeyDown( 205 )=True Then TurnEntity camera,0,-2,0
If KeyDown( 203 )=True Then TurnEntity camera,0,1,0
If KeyDown( 208 )=True Then MoveEntity camera,0,0,-0.2
If KeyDown( 200 )=True Then MoveEntity camera,0,0,0.2

x#=EntityX(camera)
y#=EntityY(camera)
z#=EntityZ(camera)

terra_y#=TerrainY(terrain,x#,y#,z#)
terra_x#=TerrainX(terrain,x#,Y,Z#)
terra_z#=TerrainZ(terrain,x#,Y,Z#)

PositionEntity camera,x#,terra_y#+2,z#

RenderWorld

Text 0,0,"Use cursor keys to move about the terrain"

; Output TerrainY value to screen
Text 0,40,"terrainx: "+terra_x#
Text 0,20,"TerrainY: "+terra_y#
Text 0,60,"Terrainz: "+terra_z#

Flip

Wend

End


Wont that 'disable-backface-culling' EntityFX command stop the underside of the mist terrain from being omitted from the renderer??

Yep, entityfx terrain2,16

However, with the alpha, bits of it might look a bit weird when triangles overlap.

Ya terrain2,16 works I can see on both sides of the terrain2
and your right MR Farly it looks kinda wierd... but when its loaded into a more leval landscape and terrain2 is scaled as a high landscape it kinda looks like the northern lights!kinda.
So how do you think they got that efect in silent hill ?