Transparent gradient or fog/mist or something...

What I’m trying to do is easier to understand if I explain it like this:

Imagine a giant cube that’s a lake of static water. At the top there’s a character. The deeper you put character in the cube, the darker he gets, gradually along his body.

or: imagine a lake with dirty water. The deeper you put the object, the harder it is to see it.

It’s possible to do it in Blender? Maybe with a gradient texture (where the bottom is solid black and the top transparent) or maybe fog/mist just inside the cube?

It’s called “mist” in Blender because there is an option just for it in Blender Internal on the World tab. For Cycles, there is a “Mist” option in the Passes panel on the Render Layers tab. (Never tested. Don’t know what it does.) There are also ways to fake it.

Quick and dirty version: http://www.blendswap.com/blends/view/58422

The best way (IMHO) so far: http://cgcookie.com/blender/2013/03/11/creating-mist-blender-cycles-z-depth/

But if I use it the world tab doesn’t that put mist in the whole thing? I just want inside a certain cube.

Also, I can’t use Cycles.

Yes, the mist will conquer the world… err… affect the whole scene. :wink:

If you want to limit the effect to a cube (or any object, in fact), you have to use a volumetric material. And that’s not a problem if you can’t use Cycles since Cycles can’t do volumetric… yet. Look also in the direction of the smoke simulations. The smoke uses a volumetric material, amongst other things.

I think with smoke I can’t get what I want. Or at least not in any easy/medium way.

This is how it looks at the moment:
[ATTACH=CONFIG]245646[/ATTACH]

This is how it looks without the “black top”:
[ATTACH=CONFIG]245644[/ATTACH]

This is how I want it to look (done in Photoshop):
[ATTACH=CONFIG]245645[/ATTACH]

Dimming the lights is not an option because there’s is only one in the whole scene.

Can you use a similar Colour Ramp effect to blend transparency/opacity in Internal?

Eg is Cycles:


You can add a cube, then add to cube “volume” material instead of “surface”
When set “density” or “density scale” to low values and you will get mist effect

be shure that in render preferienses “ray tracing” is on

you also can icrease step size of material for faster render and turn of shadow from mist by turning of “Traceable” in maerial options

@spaced
Hey thanks… I had never realized you could do this… throw a mapping node on it and it works great! … thanks for the share!

@norvman - my understanding of the technique for height and slopes is shown in two posts in another thread.

@ spaced… wow! thanks for the headsup… great thread!

[QUOTE=spaced;2421529]Can you use a similar Colour Ramp effect to blend transparency/opacity in Internal?
Eg is Cycles:
QUOTE]

@Spaced, thanks for the great tip.
One question: is there any way to animate this effect? I mean animate the position of color stops in the ramp. The problem is that unlike the ramp in regular materials, there is no “Position” node for each color stop to make a key frame.
Do you have any idea?

You can animate the gradient position easily enough by changing the Z location:

Man… That is just too cool… Thanks again…