Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / matrix from heightmap

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 17th Jun 2004 08:49 Edited at: 17th Jun 2004 09:02
This was easier than I thought. Set's the matrix tile heights based on a grayscale image. The image must at least match in width and height to the matrix' number of segments, or larger.

make matrix 1, 2000,2000, 40, 40

Image must be at least 40x40 or larger.
"fog.bmp" was my heightmap image.




[EDIT]
Actually, after thinking about it a little, the code should work on ANY size heightmap, whether its bigger or smaller than the matrix. I just tested it, and it will work with smaller images.

"eureka" - Archimedes
The Dark Padawan
21
Years of Service
User Offline
Joined: 5th Aug 2003
Location: USA!
Posted: 11th Jul 2004 01:56
Nifty,
but thats about it

"Nintendo GameCube is the best"
"I'm back! and Darker than ever!!!"

Login to post a reply

Server time is: 2024-11-23 20:11:08
Your offset time is: 2024-11-23 20:11:08