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 / Need to save a bunch of objects as one dbo object. ADD (not glue) OBJECT TO LIMB???

Author
Message
pdq
19
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 6th Oct 2011 23:47
This has probably been addressed before but could not find it in the forums, I am looking for something equivalent to a command ADD OBJECT TO LIMB, which of course does not exist. I need to save a bunch of scene objects as one dbo object. The reason for this is that I am using Dark AI's Add Obstacle From Level command which recognizes only one object. What I basically need is to take a "snapshot" of my entire scene and save it as a single object in which case I can then apply the Dark AI command.

Thanks.
ZestyPro
14
Years of Service
User Offline
Joined: 27th Aug 2011
Location: The Grid
Posted: 6th Oct 2011 23:59
you should bake a home made apple pie. then try using memblocks.

i like cheese pizza. do you like cheese pizza?
Chris Ritchie
20
Years of Service
User Offline
Joined: 7th Jan 2006
Location: Norn Iron
Posted: 7th Oct 2011 00:25 Edited at: 7th Oct 2011 00:27
If you mean have one object with lots of limbs you could chose one object as your main object and change the rest to meshes using
make mesh from object meshnumber,objectnumber
and add them as limbs using
add limb objectnumber,limbnumber,meshnumber
Save your object using save object "filename",objectnumber.


Lead programmer ULIDIA
pdq
19
Years of Service
User Offline
Joined: 20th Jul 2006
Location:
Posted: 9th Oct 2011 17:16
I'll try both methods. Thanks.
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 9th Oct 2011 20:34
The following procedure will save the location, scale and rotation of your objects; but it will discard textures.

Place your level object at position 0,0,0 with no rotation and normal scale.

For each object, store the location, scale and rotation and then make mesh from the object; then use the add limb command (or append limb command if using Matrix1 utils) to add each object to the level object. Offset the limb using the offset limb command with the stored location as the parameters. Do the appropriate actions with the scale and rotation of the limb aswell. Remember to remove the meshes from memory if not needed.

Finally, use the Save Object command to save the file (There is also a Save Mesh command).

All the limbs inside the objects you appended to the level are also preserved.

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 10th Oct 2011 03:05
do you mean the command:
Quote: "PERFORM CSG UNION obj1, obj2
"
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 10th Oct 2011 14:31
Performing a union operation will also work but that will cause a CPU (or GPU) slow down if the level geometry is complex.

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 11th Oct 2011 02:11
this is not a problem when you're designing the game. once the level is designed, save the object into a file.

have you tried loading meshes then adding it to vertexdata. this is a faster option.

Login to post a reply

Server time is: 2026-07-10 04:20:41
Your offset time is: 2026-07-10 04:20:41