The mesh is made from digital elevation data supplied from the Space Shuttle radar topography mission (SRTM). The Shuttle used a radar to measure the land height every 90 metres (for most of the earth’s surface). You can access the data here (http://srtm.csi.cgiar.org/).
I have made a mesh based on part (very small part! ) of the data for Eastern Australia in Blender (see here).
I now want to image texture the mesh with this topographical map (once cleaned up).
I’m tearing my hair out trying to get the two lined up properly. this is made harder because the elevation data has a degree of convergence, but the topo map doesn’t!
I hope that having a material on the map that accentuates the peaks and valleys may help the process.
Looking at the scanning electron microscope tutorial just now. I don’t know if this’ll work for you but worth a try I guess: Add a fresnel material and an over head lamp. Take an orthoganal photo from above. Take that photo to a 2D app and get it right. Map the image to the geometry with UV input.
Or just use fresnel shader, but I think that will vary the lighting by camera angle.
You could do this with the composite nodes, as you basically want z-buffer information. I will give a general procedure as I don’t know the specifics of your mesh.
Set your camera to look straight down at the mesh. Send the Z-buffer output of the rendering layer through a Map Value node, to remap the z coordinates into a usable range for grayscale images. The output of Map Value gets sent to the Fac input of a ColorRamp node, and the output of the ramp to the final composite. You can UV map this image onto the mesh for the matching step.
Here is a quick and dirty example using 2.43RC1. Should work in 2.42a also:
Your values for the mapping node will vary depending on the size of the scene and distance from camera. I had to experiment a bit to find the right range. There is probably a simpler way to get the z-values into an image but this works. You could even make a pseudocolor image by making the color ramp into a rainbow instead of black/white.
Edit: I got the black and white reversed from what you originally requested, but you can just switch the bars on the color ramp so white = higher.
You might just try going into a side view with perspective turned off and create a UV projection from that view. Then texture with an image that just has a series of horizontal lines. If you adjust it properly, the lines on the mesh should closely approximate the elevation lines on the map. This should provide a useful guide to adjusting the map to fit the mesh or vice versa. Here’s an image of a quick example I threw together.
Thanks for all the replies. I had a go at Chaan’s suggestion and it worked really well.
I made up a black stripe on white image in Powerpoint. Cropped and resized it in Irfanview. Then applied it to the (side on) mesh as ‘project from view’.
I have attached a screen cap of the UV textured mesh and the Topo map for that section, marking matching features.
Edit:
I repeated the procedure with a white to black gradient image and got the following result. The striped one actually provides more useful info that the straight gradient.
Wow, that really did work well. Strickingly similar to the offical version topographical.
I think I either misread or you changed that first image or something. At any rate, I also really liked the z-map idea. With that one you could also overlay the topographical onto a colored heightmap with a blue for peaks and a red for valleys for instance.