3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: transparent fog?  (Read 284 times)

« on: February 01, 2014, 10:03:57 PM »
It's kind of difficult to explain, but is it possible to have transparent fog in 3d Rad? Rather than having a skinmesh fade out to a colour as it moves away from the camera, I'd like to have the same effect, but with a gradually increasing degree of transparency.

I would like to apply this effect to a terrain model which uses the terrain shader from the system shader addon.

Thanks for any thoughts people can provide.
« Reply #1 on: February 01, 2014, 11:18:41 PM »
Hi georio You can have the fog start at 1 meter and end at 1000m that's really thick fog or start at 500m and end at 1000m that's a lighter or distant  mist.

Hope that helps

n_iron

« Reply #2 on: February 02, 2014, 12:43:38 AM »
n_iron is right... you can specify how gradually you object is "covered" by the fog by setting the start and end distances... 

to have the fog "blend" with the sky (horizon), load the section of the skybox texture that is near the horizon into a paint program and sample the color values, then set your fog color in rad to match that... it'll probably take a lil experimentation to match it seamlessly...


in order to apply fog to terrain textured in the terrain shader, you have to specify the fog level in the shader settings (there is a setting for it) and the shader will automatically add the fog to the texture... you will still have to add the fog in your project to match the fog you set in the shader...  it works quite well...

see the video below for shader terrain with fog...

http://www.youtube.com/watch?v=ZN7ukbcB264


--Mike
« Last Edit: February 02, 2014, 12:55:29 AM by Mike Hense »
« Reply #3 on: February 02, 2014, 01:13:56 AM »
Hey guys, thanks for the reply. I haven't had difficulties adding coloured fog to my project. What I am wondering is whether a different type of fog is possible in 3dRad; one that uses transparency, rather than colour.

It's awkward to explain, so I've attached a little diagram which hopefully makes more sense!

Cheers,

George.
« Reply #4 on: February 02, 2014, 02:56:59 AM »
The simple answer would be 'no', I suppose.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #5 on: February 04, 2014, 10:26:15 AM »
Roberto may be right here... i don't think we can implement such a thing in RAD, but take a look at this...
i'm not sure if it's exactly what you're looking for georgio, but it may be close enough for government work  ;)

the file is an attached .3dr (3DRad project file) just copy to your projects folder and load it into the editor and run...  the down arrow key  to move cam away... up to move closer...

it's based on using one of Shad's system shaders (14, 15,16)  and manipulating the alpha...




--Mike

« Last Edit: February 04, 2014, 10:40:20 AM by Mike Hense »
« Reply #6 on: February 05, 2014, 04:49:46 PM »
Hey, that's pretty cool Mike  ;D. It wasn't exactly what I was looking for, but it could be really useful for multiple small objects like grass, rocks, bushes etc...
« Reply #7 on: February 05, 2014, 08:12:07 PM »
good to see you can find some use for it... i didn't think it was exactly what you were looking for... but, like i said above, i think Roberto hit the nail on the head...

anyways,  Shadmar left us with a lot of useful shader stuff... i don't see too many people taking advantage of it...

--Mike
Pages: [1]