Volumetric Fog

Blitz3D Forums/Blitz3D Programming/Volumetric Fog

Neochrome(Posted 2004) [#1]
Look at the link ( Cube Fog didn't quite explain the title so i retitled it but doing it this way... Sorry)

[a /posts.php?topic=33452


Rook Zimbabwe(Posted 2004) [#2]
I looked... Am I supposed to do anything else??? If you are trying to create volumetric fog you could use 2 alpha layers at 180degrees to each other.


Akat(Posted 2004) [#3]
like sswift said, but how about some codes?


Rook Zimbabwe(Posted 2004) [#4]
OK if my connection holds out. I used 2 alpha layers to create more of a SKY depth. The code looked like this:
;create cloud planes
cloud=LoadTexture( "textures\cloud_2.bmp",3)
ScaleTexture cloud,1000,1000
p=CreatePlane()
EntityTexture p,cloud
EntityFX p,1
PositionEntity p,0,600,0 ; NOTE HEIGHT
p=CopyEntity( p )
RotateEntity p,0,0,180

;create cloud plane 2
cloud=LoadTexture( "textures\sky.bmp",1)
ScaleTexture cloud,1000,1000
p=CreatePlane()
EntityTexture p,cloud
EntityFX p,1
PositionEntity p,0,999,0 ; NOTE different height
p=CopyEntity( p )
RotateEntity p,0,0,180
The two textures are layered on top of one and another with a FOG layer as well.

You have to add a dim touch of light using the Ambientlight command a value like AmbientLight 24,32,24 or something enough to light op the texture on SKY.BMP.

Notice the handle after SKY.BMP that allows for full bright.

cloud2.bmp is a GREYSCALE of a cloud layer. Black acts see through because of the handle 3 after the name.


Rook Zimbabwe(Posted 2004) [#5]
OK It is embarrassing how stupid that code post was... I have since been playing with the idea of for like that. Doesn't work.

Any real coders out there noticed that right off!

I tried, then, to create a transparent cube as a 3ds object. I did not remember that when you collide with an object it becomes invisible. Unless collisions have been set to where you bump or slide.

I also tried to create two cameras with different fog ranges and that was a murky disaster (and much slower.)

How does the Torque engine do it??? I have walked in to their fog (in the demo program) and it was San Francisco on a Bay Fog Night.

Once again, sorry for the stupid code post...
-Rook


Neochrome(Posted 2004) [#6]
i have noticed that Torque does it well! thats exactly how i want it :)


Rook Zimbabwe(Posted 2004) [#7]
I just thought of something... it probably won't work.

Rob programed a demo called Cubewater that he could animate the surface of water like a giant pool... While I was under water the view seemed "murkier" and such.

Could cubemapping a fog layer work?

-Rook