how to color the mesh according to the depth

Hi guys!

I am only the beginner :slight_smile:

I have the mesh that is the surface of the ocean (data from the AUV bathymetry). I need make it be colored in the way:
the deepest part - dark blue, more to the surface - green, yellow, red (like image). The mesh is not homogeneous. A lot of sea mounts.

Please, can you advise me the way how to do it!

Thank you! there are two scenes in the .blend, one for Blender Internal and the other for Cycles. If you need more control about the height, than you can use ‘World’ instead of the ‘Generated’ coordinates, and scale the gradient to the desired values.

if you mean like this:

scult your terrain
go into weight paint mode
Go into front or side view
under Weight tools, click Gradient
drag a vertical line

here is how you make a material for it if you want it to be colored.

this has Nothing to do with the weight by the way…