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.

Code Snippets / [DBP] .X exporter with limb and texture data

Author
Message
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 7th Dec 2005 23:54 Edited at: 8th Dec 2005 00:25
Something I threw together for this:

http://forum.thegamecreators.com/?m=forum_view&t=65024&b=1&p=1

You can now save .x objects and it will load with auto texturing and limbs. I'm sure this can be optimized, but I haven't had time. it may even need to be slightly modified for some objects. It is a simple format for the parts that I can understand (I broke a .x down from a CSHOP export to make this asI couldn't find any good info on it).



[edit] This code uses the find free function in IanM's Matrix1Extend1 plugin http://www.matrix1.demon.co.uk/DBPro/downloads/Matrix1Extend1_exe01.zip

Check out his site for several great plugins.
http://www.matrix1.demon.co.uk/

Mason
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: Arizona
Posted: 8th Dec 2005 06:47
Sounds awesome, I'll check it out tomorrow after class. I'm to tired to think right now. Looks good


Check out Penguin in the Projects Section!!!
http://www.prodigyarts.5gigs.com
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 8th Dec 2005 09:45
Lost in thought...... you, are a genius!

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 8th Dec 2005 10:20
Quote: "Lost in thought...... you, are a genius!"


Not as much as you think. Look at the comments in there. I still don't understand alot of it If anyone has any objects that it doesn't work on, post them and I'll see if I can modify it to work.

Kangaroo2 BETA2
20
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 16th Dec 2005 16:38 Edited at: 16th Dec 2005 16:54
Hey, I just saw this, this is good work

Quikly 3d model pro already has .x file output using the xtext standard (outputs as 1 limb), do you mind if I use your code as another output format incase people want limb data saved? Of course I'd give you credit in the program, and a free copy of Quikly 3d model pro

[edit] I found a few bugs in your code as you expected, limbs not loading etc - but I'm sure you could de-bug it if you are interested? The actual code is quite far above my head I'm afraid, I just used a tweaked version of "save object" for mine

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 16th Dec 2005 22:06 Edited at: 16th Dec 2005 23:00
I don't mind if you use it. I have found a couple of bugs myself. If you can send me the code/model that won't save, I'll see if I can fix it.

Also until I learn the .x format a little better, this only supports 1 texture stage. If more than one stage is even possible in .x, as everyone seems to be having problems with it.

[edit] For now this may help you. Modify this part of code to add the convert object fvf 274. This will not affect the original object just the temp objects created for the limb data.

[edit2] Also possibly fixed a vert holding bug with the array size. I am at work so I can't test this.



FXTC
19
Years of Service
User Offline
Joined: 3rd Jul 2004
Location: CzechRepublic
Posted: 17th Dec 2005 16:35
hey looks good and usefull

AMD 2,4 512MB RAM,2x200GB hdd,GforceFX5700GT128MB
TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 17th Dec 2005 20:28
Dang it! I was trying to find something like this about 1 month ago. Now it is too late to use in my RPG. Looks great!

[url]andrewneale2004@yahoo.com[/url]
http://www.elbsoftware.dbspot.com
Kangaroo2 BETA2
20
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 18th Dec 2005 15:51
Thanks LiT I'll try out the new bits tonight

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th Dec 2005 23:02
Quote: "lost in thought is a genius? i did the same thing myself in 25 mins..."


And you done yours in DBC, so why not post your DBC version in this forum for people to use and learn by?

MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 20th Dec 2005 06:29
Maybe because he really didn't do it?

Anyway...

Great job with this Lost in Thought. Might be worth a mention to Rich for the newsletter. I've already seen one topic in which someone was making their own model format, and I have a hunch it was because of this thread. I'm sure more will be spawning soon.



A book? I hate book. Book is stupid.
(Formerly Yellow)
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 20th Dec 2005 07:06 Edited at: 20th Dec 2005 07:06
Thx. He actually has a thread in the DBC board about it.

http://forum.thegamecreators.com/?m=forum_view&t=67345&b=10

Quote: "Might be worth a mention to Rich for the newsletter"


Maybe when I fix the bugs lol ... assuming Kangaroo2 BETA2 is still having problems with his models. I'll do some more testing myself. And then some optimizing, as I sort of just threw it together for that matrix to object converter in my spare, spare time.

If anyone else has problems, if they can send me the models and or code used to make the model (or save it to a dbo) I'll modify it if possible.

I do know of one situation in which it will fail and I don't see any way to fix it. Unless they fix the make object from limb bug where it crashes DBP if there is no mesh for the limb. There is no way that I know of to tell if there is a mesh or not unless it crashes

Also there is a bug with limb texture name command where is more than 1 texture is used per limb it returns nothing. I am just going to work around this with a default.bmp texture name in this case I guess. Or I can use the last know texture name? Any preferrences?

Darkbasic MADPSP
18
Years of Service
User Offline
Joined: 15th Jun 2005
Location: Uk
Posted: 20th Dec 2005 18:40
i made a .x to .dbo no one cared and it works

Experienced DB http://www.greatgames3d.com (work in progress site)
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 20th Dec 2005 22:48
Yeah but you can convert object from .x to .dbo with:

load object "file.x", 1
save object "file.dbo", 1
end

Where is a link to it?

Kangaroo2 BETA2
20
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 22nd Dec 2005 15:37
Sorry for not getting back to you quicker, I've been testing your code quite heavily - later on I'll send you an email with my findings and model pro for you to test if you would like to

I will reitterate, this is good work you've done here man!


Preorder EA here:http://forum.thegamecreators.com/?m=forum_view&t=67575&b=8&p=0
+ Model Pro out now in Program Announcements!
Darkbasic MADPSP
18
Years of Service
User Offline
Joined: 15th Jun 2005
Location: Uk
Posted: 22nd Dec 2005 20:10
Here you go

http://forum.thegamecreators.com/?m=forum_view&t=64321&b=11

Experienced DB http://www.greatgames3d.com (work in progress site)
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 22nd Dec 2005 22:29
Quote: "later on I'll send you an email with my findings and model pro for you to test if you would like to"


Sure thing, I'd like to get this working with most models. I think this code will need almost a total re-write as it was really customized for that matrix to object prog. I think it could help out people trying to make world editors and such for DBC and DBP. Once I get this version going, I'd like to write a DBC version as I don't know if the BEST programmer is going to release his if he ever gets it working. It will be harder in DBC as you can't auto size arrays that I am aware of though.

code master
20
Years of Service
User Offline
Joined: 4th Dec 2003
Location: Illinois
Posted: 7th Apr 2006 23:35
it says
Quote: "Could Not Understand command at line 27"


line 27 is


"I don't bite her, i just slobber on her" "I remember things as well as a retarded goldfish, who just swam through the chicago river"

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 7th Apr 2006 23:49 Edited at: 8th Apr 2006 00:15
I'll check it out when I get home. It was working here but haven't tested it since DBP5.8 or 5.9. Are you using U6?

[edit] Did you get this plugin?

Quote: "This code uses the find free function in IanM's Matrix1Extend1 plugin"
http://www.matrix1.demon.co.uk/DBPro/downloads/Matrix1Extend1_exe01.zip

[edit2] It works here in U6. You must be missing IanM's plugin.

Gen
19
Years of Service
User Offline
Joined: 6th Jul 2004
Location: Oklahoma, USA
Posted: 10th Apr 2006 07:57
Hey LIT,

I got a book around somewhere that had a section that broke down the .x format. If I can find it, I'll upload it for ya.

Gen

Windows XP Pro Service Pack 2, Pentium 4 2.4 GHz, 768 MB PC3200 Ram, ATI Radeon X700 Pro 256 MB
Dark Basic Professional 5.9 Dark IDE nearly complete!
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 10th Apr 2006 09:05
Cool. All help is appreciated.

Gen
19
Years of Service
User Offline
Joined: 6th Jul 2004
Location: Oklahoma, USA
Posted: 11th Apr 2006 03:06 Edited at: 11th Apr 2006 03:26
It probaly won't be until this weekend I get it, its not here with me

Edit: Here is a link I found:
http://astronomy.swin.edu.au/~pbourke/dataformats/directx/#xfilefrm_Header_1

Windows XP Pro Service Pack 2, Pentium 4 2.4 GHz, 768 MB PC3200 Ram, ATI Radeon X700 Pro 256 MB
Dark Basic Professional 5.9 Dark IDE nearly complete!
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 11th Apr 2006 11:37
Thanks. Would anyone be interested in a free program (written in DBP and open source) that takes 2 CShop .x models (the .x and _lm.x) and converts them to a single mesh lightmapped object? If so I may be creating on in the near future. I am quite busy ATM though.

You would even then be able to save the new object as a .dbo or .x

Ric
19
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 11th Apr 2006 13:51
Doesn't Cshop export to dbo format anyway - ie. single mesh with lightmap? If not, then I'm sure it would be very handy - and very good of you to make it free of charge.

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 11th Apr 2006 15:13
3DWS exports to dbo, but not CShop You can use the CSM Importer to do this but some people just want to load models instead of entire, entity based levels. I would definitely recommend the CSM Importer for that.

Login to post a reply

Server time is: 2024-05-12 00:30:34
Your offset time is: 2024-05-12 00:30:34