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.

Newcomers DBPro Corner / Advanced terrain

Author
Message
Conor B
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Dublin, Ireland
Posted: 22nd Jul 2007 16:05
Hi, I am having a problem with using heightmaps in DB Pro, well actually the heightmap isn't the problem, but the texture is. Whenever I texture the heightmap the texture tiles itself over the heightmap instead of spreading accross the whole map. The heightmap and texture are both in bmp format and are both 1024*1024. A pic is attached. Please help, thanks.

Don't look behind you.

Attachments

Login to view attachments
Conor B
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Dublin, Ireland
Posted: 22nd Jul 2007 16:33
Well actually these heightmaps arn't going well, I am having a few problems with them:

1: The terrain from the heightmap seems to have no polies, like berore I made the terrain I had the same amount of polies as when it was made. The statistic(1) shows the same amount!

2: The texture from the heightmap isn't working properly.

Please if you have any ideas then I'll be very happy to hear them, thanks.

Don't look behind you.
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 22nd Jul 2007 18:27
AT works only with true color grayscale heightmaps
Probably your heightmap is not a 24bit image
Conor B
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Dublin, Ireland
Posted: 22nd Jul 2007 20:30
Well I changed the heightmap to 24 bit and it didn't make any diference. I don't know how to change to truecolor greyscale. If anyone can give me any help please do, thanks.
And thanks scorpyo for your input.

Don't look behind you.
Conor B
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Dublin, Ireland
Posted: 22nd Jul 2007 20:52 Edited at: 22nd Jul 2007 21:00
Here is a pic of the heightmap, its 24 bit.
The terrain collision is also messed up, I am using this code for it:


This collision code isn't working properly, if anyone can see a problem with it please let me know.

Don't look behind you.

Attachments

Login to view attachments
Spotaru
17
Years of Service
User Offline
Joined: 3rd Dec 2006
Location: Over the next rise.
Posted: 22nd Jul 2007 21:38
the command should be: get terrain ground height
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 22nd Jul 2007 21:38
ahhh you are using the old terrain commands, not Advanced Terrain !
that is a known bug. old terrain doesn't work properly, I can't remember well but i think it started tiling beyond 128x128 heightmap sizes.

for Advanced Terrain the command is:
get terrain ground height(terrain number,object position x(1), object position z(1))

try this AT example and see if it runs on your DBP version
http://forum.thegamecreators.com/?m=forum_view&t=101182&b=7
Conor B
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Dublin, Ireland
Posted: 22nd Jul 2007 22:15 Edited at: 22nd Jul 2007 22:17
Hey scorpyo thanks for helping but I tried to run the example but don't have a detail map, don't even know what a detail map is. Just need a bit more help, thanks.

Don't look behind you.
Conor B
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Dublin, Ireland
Posted: 22nd Jul 2007 23:45 Edited at: 23rd Jul 2007 00:31
There is a problem with setting the heightmap, whenever I use this code:


When I run this code I get a crash document which says:
m_dwRuntimeErrorDWORD=7007
m_dwRuntimeErrorLineDWORD=62

Can anybody help me here?

Edit: I fixed this problem thanks everyone for the help, escpecially Scorpyo, thanks.

Don't look behind you.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 25th Jul 2007 21:55
For the record - the detail map is like a texture - I've only seen gray ones - that are tiled every where - but do not have color - think of it as the "rocks" on your dirt texture (or grass). Check out the Advanced terrain samples that come in the download for advanced terrain. I copied that code verbatum until I understood what each command was doing.

Know way too many languages - Master of none
Conor B
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Dublin, Ireland
Posted: 25th Jul 2007 22:11
Ok thanks jason, I got a good test map working.

Don't look behind you.

Login to post a reply

Server time is: 2024-11-26 12:18:40
Your offset time is: 2024-11-26 12:18:40