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.

DarkBASIC Professional Discussion / Issues trying to receive Terrain Height using Get Terrain Ground Height Statement

Author
Message
Avoth
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location:
Posted: 10th Jul 2011 20:03 Edited at: 10th Jul 2011 20:19
I have posted before about this and didnt realy recieve any info.

I have been trying to use the Get Terrain Ground Height statement in order to receive the height and a specific point located, for a simple example, under the camera.

I first Load the Terrain which is a DBO format terrain, then get the height using X and Z camera coords. The value returned is always 0.

I have been told that this command only support DBT (Darkbasic Terrain) formats, but have browzed the web for weeks and have found no format of the sort or any converter.

Can anyone else shed some light on this, here is the basic snippet.



I am assuming that the DBT format someone was talking about is an internaly used but not commonly used format with no software available to create or edit these specific map types with. If there is no way of attaining the ground height... how is it best way to attain ground height on a DBO map (which is im guessing just seen as an object in DBPro).
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 10th Jul 2011 22:02
you can´t get the ground height with a dbo. It must be with a matrix or advanced terrain. You could do it using intersect object command.

Cheers

I'm not a grumpy grandpa
Avoth
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location:
Posted: 10th Jul 2011 23:03
The only option i can seem to find is to use a heightmap to create terrain. Except there are not many Heightmap exporters out there.

Is it of any importance to wether you use a matrix or a dbo format map to how fast things are processed? Or is it just a simple difference in coding.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 10th Jul 2011 23:08
You can make your own heightmap with any painting program. I asure you that advanced terrain is much more fast than the same mesh in a dbo format.

Cheers.

I'm not a grumpy grandpa
Avoth
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location:
Posted: 10th Jul 2011 23:15 Edited at: 10th Jul 2011 23:15
I know ofcourse you can make heightmaps in paint but loading and checking to get what you actualy want would take forever, idealy you want to make it in realtime. Are there any Advanced terrain editors that you know of?

And do you know what the extention name is of the advanced map types? (ie .dbo)
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 10th Jul 2011 23:35 Edited at: 10th Jul 2011 23:36
If you use advanced terrain you don´t need any other program, I think now it comes with Darkbasic pro...if not I think you can get it for free. I made my own heightmap with darkbasic, and it works ok for my purposes.


Cheers.



I'm not a grumpy grandpa
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th Jul 2011 14:04 Edited at: 11th Jul 2011 14:09
Quote: "I know ofcourse you can make heightmaps in paint but loading and checking to get what you actualy want would take forever, idealy you want to make it in realtime."


Is your terrain object just like advanced terrain in that it's effectively a grid of high poly plains with the vertex y values adjusted? If so then you could simply (Edited misleading statement referring to an earlier version ) write your own function to calculate the height using input X and Z values. That's what I do with my terrains. Here's my function. I haven't compared it with intersect object though. Perhaps I should?

Login to post a reply

Server time is: 2026-07-10 21:42:08
Your offset time is: 2026-07-10 21:42:08