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.

Dark GDK / DarkGDK export terrain to dbo, or x file?

Author
Message
smokey90
12
Years of Service
User Offline
Joined: 4th Jan 2012
Location:
Posted: 5th Jan 2012 00:42
Hi all,

Im trying to export my worldmap to a dbo file with the dbSaveTerrain function, so i can add objects to it like trees. However, whenever i do this, i get an access violation message and the program crashes.



Does anyone know what the problem might be? Or maybe an alternative way to get the dbo or x file?
lllll V E N O M lllll
12
Years of Service
User Offline
Joined: 3rd Jan 2012
Location:
Posted: 5th Jan 2012 16:04
i use .x models



lllllsp1d3rlllll
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 5th Jan 2012 17:00
I'm not sure why you think you have to export your terrain.... The purpose of dbTerrain functions is so that you can make a good looking terrain from just a few images (height map, texture, detail). Exporting is not needed (in my opinion).

Perhapse if you posted why it's needed, then I may be able to give you an alternative. I just don't understand the reason.

If you are trying it for exercise (your DGDK skills), then go for it.

The short answer is: Your extension is wrong. Use ".DBT" on your dbSaveTerrain("test.dbt",2);

The fastest code is the code never written.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 5th Jan 2012 17:41 Edited at: 5th Jan 2012 17:54
Looking at the Advanced Terrain help file, it would appear Hawkblood is correct. DBpro however reports this error when using any extension other than DBO.

Runtime Error 7030 - You must use .DBO extension for a saved DBPro object at line...

DBPro reports this error if the file already exists.

Runtime Error 106 - File already exists at line...

An access violation error, I can only assume means your program does not have permission to write the file.
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 5th Jan 2012 17:50 Edited at: 5th Jan 2012 17:52
I think the issue is that dbSaveTerrain doesn't save a model file. It's purpose is to save the terrain as .dbt file, so you don't have to setup your terrain again with all the settings (as you did in your code snippet in the first post). So then you just have to load up your terrain and it's all restored. It may also be a little faster, because the terrain calculations are also saved to this file. Other than that I see no use for this feature... Usually I just re-created the terrain from the various images each time.

If you want to make a model of your terrain and export it to an .x, .3ds or .dbo file you may take a look at memblock commands and how to make meshes from data.

Login to post a reply

Server time is: 2024-11-19 04:37:16
Your offset time is: 2024-11-19 04:37:16