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 / trouble with blitz terrain

Author
Message
sovr
14
Years of Service
User Offline
Joined: 2nd Jan 2010
Location: USA
Posted: 29th Aug 2015 22:35
hello everyone! I have been working a small terrain project and I have been having an issue with blitz terrain. The dbpro program tends to just freeze and disappear without an error of any type. Here is my code:



I am only loading the texture map, detail map, and height map and the info is coming from a file. Thank you for your help!

website: http://worksimpleintelligen.wix.com/parkers-apps
facebook: https://www.facebook.com/ParkersApps
youtube: http://www.youtube.com/user/mrsovr
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 29th Aug 2015 23:57 Edited at: 30th Aug 2015 19:45
I think the crash is coming from save object, Blitzterrain objects are decoupled from DBPro's typical object handling and rendering. Try using the BT SaveTerrain command instead.

Blitzterrain uses a custom renderer and therefore requires the use of BT RenderTerrain before calling Sync.



Your saving code should also be moved outside of the main loop, otherwise the program will essentially try to delete and recreate your "export" file 60 times a second.

[EDIT]
On farther inspection the saving code doesn't look quite right to me, try this instead (Untested):
James H
16
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 30th Aug 2015 18:31
In addition to what revenant chaos said - save object does not support saving .x files, it is for the .dbo format. Currently you can not save a .x file as an object however you can save out the entire object or just part of it as a mesh of the .x file format using the save mesh command. Not that I think this is what you need but thought I would mention it for future reference.

Login to post a reply

Server time is: 2024-03-29 08:52:13
Your offset time is: 2024-03-29 08:52:13