Topo Coloring?

Does anyone know of any script that would change the color of a Material as it’s ZLoc changes?

something like the picture…here
http://ltpwww.gsfc.nasa.gov/tharsis/mola.html

I try to code, I swear, but I’m so bad at it…

Thanks so much!

Ugh, that would indeed be hell to do without a script. Sorry, no such knowledge in my brain, but depending on the number of colors required it wouldn’t be that horridly difficult.

Hey there,

the colour from height thing is pretty simple actually… but you’d have to use a different strategy to map the colours on the side. For the vertical colouring though, you don’t even need a script.

In order to get a colour from height effect, you need to add an Empty to your scene, scale it so that the vertical Y axis is half the height of your lanscape object. Place this object halfway up your lanscape mesh. for convenience, you might want to parent it to your lanscape so that when you scale your object the colours will scale with it.

Now, apply a new texture to the landscape object. Make this texture a Blend with whatever colours you want to use. Make it a linear blend and set it so that it runs up and down, not side to side. (Flip XY option)

In the material settings for the landscape, map that texture using the “Object” option, and specify your Empty as the object.

Here’s a pic to illustrate the idea…

http://www.red-rhino.com/nik/topographic.jpg

well you’d have to find a way to read min z and max z value of vertices in your mesh, normalize it, then find a way to map hue values to this range.

or not?