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 / Save Terrain / Make Object from Terrain

Author
Message
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 16th Jun 2007 03:15
Is there a way to save a Terrain generated from a heightmap as a .DBO or a .X file, or make an object from it?

vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 16th Jun 2007 11:28
Is this to use in your FPSC project or in DarkBASIC?
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 16th Jun 2007 11:40
yes:
in the do-loop put

if inkey$()="s" then save object "myterrain.dbo",1

or

if inkey$()="s" then save object "myterrain.x",1

the press s at runtime.

you must put the number that your actual terrain is ( normally it's 1 like in this case, but you may have multiple terrains and want to save only a specific one )
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 16th Jun 2007 19:54
Quote: "Is this to use in your FPSC project or in DarkBASIC? "


Just something to play around with.

Scorpyo: I just tried what you told me, but SAVE OBJECT isn't recognized as a command. Is there some plugin I need? By the way, I have DBPro, if that means anything.

Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 16th Jun 2007 22:24
dbo save does for sure and it works for me
From the help:

SAVE OBJECT

This command will save the specified object to a file in the DBO file format. Be sure to end the specified
filename with .DBO so that the file can be loaded in again correctly. It is worth noting that before saving,
the vertex data is restored to the last god copy before animation changed the data, so that the model
can be saved out correctly. Unless you used the special mode 2 for the 'lock vertexdata for limb'
command, any changes with this command will not appear.

Syntax

SAVE OBJECT Filename, Object Number
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 17th Jun 2007 05:43
It doesn't show up as a command, take a look at the screenshot. It doesn't turn blue. I'm not saying that the following screenshot is all of my code, but even when I use it with my code it doesn't work. Do you know if you have to use a plugin to use that command?



Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 17th Jun 2007 09:38
Also, does anybody here know what the best way to get the universe.dbo of an FPSC game an bring it into a 3D modeler? I know this is a DarkBasic Pro board, but I figured since we're dealing with a DarkBasic format (.dbo), it would be appropriate.

Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 17th Jun 2007 11:09
Inspire, this is a screenshot from my source.

the command shows up regularly

have you tried to run the command nontheless?

Attachments

Login to view attachments
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 17th Jun 2007 19:51
Yeah, it says "Unknown command".

What version of DBPro do you have? And does it matter if I have Dark Basic Pro Online or not?

vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 18th Jun 2007 00:01
Save Object works for me too, I have version 6.6b but I don't think that matters. Do you have advanced terrain, I'm not sure if it's part of that
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 19th Jun 2007 02:54
No I don't, what is that and where can I get it? Thanks.

vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 19th Jun 2007 15:55
http://forum.thegamecreators.com/?m=forum_view&t=38692&b=18

theres the forum thread for it, it has a series of great terrain commands, it's worth it even if it doesn't have the save object command
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 20th Jun 2007 01:46 Edited at: 20th Jun 2007 02:00
Wow, that's pretty cool. It says it's a demo though.

Still no Save Object command.

EDIT: I downloaded it and tried it out. I edited the Example 1.dba and tried to get it to save my terrain as an .x file. Here's the code:



I added the code under the "Save Terrain" heading.

Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 28th Jun 2007 23:49
Well, Save Object does not function for me either. I do not have Advanced Terrain installed, which I think may be the problem. I have the latest upgrade and all =P

Anyone figure it is AdvTerrain?


Tux is my guildmaster.
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 29th Jun 2007 07:04
save object "xxxx.DBO",#

xxxx= object name
#= Object number

Remember the terrain is the only object you are converting from .bmp to .dbo so the object number will or should be (1).

This method works well for me.

Cheer,
Dave


Brain111
17
Years of Service
User Offline
Joined: 5th Feb 2007
Location: In my own little world.
Posted: 29th Jun 2007 07:22
I have a question about this command, is it possible to load a .X model and then save it as a .DBO?

Anarchy Burger - hold the Government!
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 29th Jun 2007 09:53 Edited at: 29th Jun 2007 09:54
Quote: "I have a question about this command, is it possible to load a .X model and then save it as a .DBO?"


Can't see why it couldn't. When DBP loads a .x model, it turns it into a .dbo anyways =P

Still unable to get the command to work. Does not even highlight in my editor o.O Anyone have any other theories?


Tux is my guildmaster.
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 29th Jun 2007 18:51
Quote: "I have a question about this command, is it possible to load a .X model and then save it as a .DBO?"


Yep.

Brain111
17
Years of Service
User Offline
Joined: 5th Feb 2007
Location: In my own little world.
Posted: 30th Jun 2007 01:41
That's cool, thanks guys. I'm gonna try this out since .dbo files are "better" right?

Anarchy Burger - hold the Government!
vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 30th Jun 2007 13:16
Smaller file I think
Drewbhot
17
Years of Service
User Offline
Joined: 5th Jul 2007
Location:
Posted: 6th Jul 2007 04:52
I thought the save object command was taken out of dark basic pro. I had the command in classic, but the manual for dbp says it took it out...

Login to post a reply

Server time is: 2024-11-25 15:12:33
Your offset time is: 2024-11-25 15:12:33