The code above was my script, but slightly modified. I had it set the models ".ambient" to the average of the rgb color of the pixel. Now it reads the brightness from the blue channel.

It only returns the height if a terrain is found...


xXxGuitar511
- Programmer