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 / Height Map Bmp to Matrix Code

Author
Message
OutLand
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: uk,wales
Posted: 25th Jan 2004 12:47
I havent contributed to the forums for a while so Here is one of the things that I have been doing.
This Code gets the the color data from a bmp and converts it to
height data. The lighter the shade the heigher the darker the lower.



Here's the code:
http://www.freewebs.com/dboutland/Bmp_Hmap.zip
OutLand
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: uk,wales
Posted: 26th Jan 2004 15:10
helo anyone there, hmm I guess it isnt usefull then LOL
dance dreemer
21
Years of Service
User Offline
Joined: 24th Jan 2003
Location: cyber space
Posted: 26th Jan 2004 17:43
he he he thats pritty cool code you done there v usefull for background mountins an stuff keep up the cool work he he he




dancedreemer...

if tired()=1 then goto bed
dance dreemer
21
Years of Service
User Offline
Joined: 24th Jan 2003
Location: cyber space
Posted: 26th Jan 2004 17:50
i got a problem running your code in dbc it says "no sutch dimention initialsed at line 29"

witch is this line in your code > set matrix height 1,x,z,hmap(x,z)*3

any idears ?

dancedreemer...

if tired()=1 then goto bed
OutLand
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: uk,wales
Posted: 26th Jan 2004 17:51
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 26th Jan 2004 23:22
it means you haven't declared the array,use
dim hmap(x,z) somewhere near the top.


GO TO THE ETERNAL DESTINY FORUMS!!! http://forums.eternaldestinyonline.com
Do it now!!!
Turoid
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 27th Jan 2004 21:58
finally!!! a very FAST function to load a heightmap in DBC thanks man, i was lookin a long time for that!

if I = 1 then I = 1 else I = 0
OutLand
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: uk,wales
Posted: 28th Jan 2004 16:06
Heres the code corrected:


Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 29th Jan 2004 16:22
PERFECT!

A little bit of adjustment, and this will be useable in my landscape engine.
thanks

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard

Login to post a reply

Server time is: 2024-11-24 00:50:53
Your offset time is: 2024-11-24 00:50:53