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 Discussion / Making limbs

Author
Message
The Wilderbeast
19
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 16th Aug 2006 13:20
Ok, screw my other post. I've looked at all the limb commands but can't find one for my program. Can you create libms from a model. Aka I've got a model of a tank, is there any way i can section it without using a 3d modelling programme? so can i cut off the turret and glue it back on as a limb? they did it in the tank demo that comes with DB but i didn't get that.

cheers

oh.. by the way, i think i might have found the solution for perfect sky... but that's besides the point.

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 16th Aug 2006 14:38
Hi,

Unless the turret you want to import is it's own file, you cannot section a model very easily in DBC.

If you want to avoid the whole modeling program thing, you can edit the .x file. If the turret is contained as it's own mesh in the .x file, you can just "pluck" that out and save it as it's own file, load that as object <whatever> in DBC, then make a limb out of it for the tank you want to use.

If the .x file is binary, I'm not sure how to manage it.

Enjoy your day.
The Wilderbeast
19
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 16th Aug 2006 18:24
te .x file isn't binary

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 17th Aug 2006 02:57
I probably should've kept my big mouth shut! It's not as easy as I made it sound to just "pluck" the desired mesh out of the .x file. I'll describe the procedure anyway, at the very least it may be informative.

If you're familiar with the direct x ascii file format, then you already are way ahead of the game! If not then here goes:

The .x file format is essentially broken up into Templates. Each template contains the necessary information to "draw" a 3d object (hey this isn't so bad after all!). Similar to C, template information is contained within braces { } . The opening brace { is the start of the block , the closing brace } is the end of the block.

An individual mesh, BARE MINIMUM number of templates include :

Material
Mesh
MeshMaterialList
MeshNormals

A more complicated template structure may include Frames, frame transform matrix, textures, uv coordinates, and animations. Most templates will have a name to reference a specific mesh, material or frame. Thus the layout looks like:



Using a text editor, you can cut and paste blocks of templates to create a new .x file containing only the object that you want.

Steps:
1. make an empty text document and at the top put:

2. Open the .x file you want to grab an object out of
3. Select ALL of the material template blocks and copy and paste them into your new text file
4. Look for the Frame Block that identifies the mesh you want. There should be a name for the frame or for the mesh that it contains. This will give you a clue as to which block you want.
5. Copy and paste everything from Frame { until the closing brace before the next } Frame template or AnimationSet begins - into your text file.
6. At this point you should be avle to save your text file with the .x extension and you're done!

Here's an example of a file with 2 cubes. I want to create a new one with only the first cube in it. This isn't a very complex template and I don't use textures so there's no texture name.

Here's the original:


Now here's my cut and paste file:



The process isn't complicated, it just might take time to hunt through the .x file for the mesh that you want.

Since your goal is to just make a limb, you don't really need to copy the animation information - I assume you will animate your limb when you add it to your tank in DBC.

Enjoy your day.
The Wilderbeast
19
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 18th Aug 2006 20:34
thanks a lot!! that was really helpful

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Aug 2006 16:50
Glad to help!

Enjoy your day.

Login to post a reply

Server time is: 2025-05-25 22:42:46
Your offset time is: 2025-05-25 22:42:46