How to make a gameObject's color fade to transparency (picture)

Hello, I have been working on a cave model, finished it, and textured it. I found out you can’t make caves in the Unity Terrain System, so I found a way around it, similar to Skyrim’s. I want the blackness to fade in so it looks more natural. Right now, it just looks bleh. Here is a picture:[29716-screenshot+#1.png|29716]

Alright I figured it out. I edited the Alpha of the color on the Transparent Diffuse shader, which made it semi-transparent, then I took 0tucan approach and lined them up. I think it looks pretty nice now here it is:[29774-screenshot+#2.png|29774]

Thanks for all your help, Unity3D truly has a great community.

enable fog in the render settings: http://docs.unity3d.com/Manual/class-RenderSettings.html

and adjust the fogdensity/linearFogStart/linearFogEnd values as you need them.

Another approuch would be to expand this block and texture it blackier the deeper it is.

Assuming that the objects around the black block are GameObjects/Meshes then you could use a decal that would do the gradient transition. Otherwise make a few meshes that have the gradient texture and fit them on these meshes, though this might cause Z-fighting issues(objects randomly popping on top one another).

OR

Assuming that the objects around the black block is part of Terrain, you can use a black Terrain Texture and paint it with a soft brush on the parts that interact between the block and the terrain.

http://docs.unity3d.com/Manual/terrain-Textures.html