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 / convert matrix to object / convert object to matrix commands .dll or functions

Author
Message
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 16th Nov 2005 00:22
anyone written any? feasible?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Dimension
20
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 16th Nov 2005 00:42
@ Dimension - did use the thread search but missed that one - thanks

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 16th Nov 2005 01:15
wow, this is extrememly useful.. I do not have dbpro but if anyone would like to earn some cash all I'd need would be for someone to compile an exe for me that would import a matrix (most likely through just a simple text file with the matrix data) and output an object. I know that maybe someone here has the wits in them to do this very simple and practical procedure.. if not I can simply do the code and pay you just to make an exe of the source I would give.
Thanks in advance to any one thinking of taking up the offer.
I can pay you through pay-pal or w/e other method you think feasible.

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 16th Nov 2005 02:16
I could easily modify that code to save the matrix as a dbo object or a .x mesh. I would not charge anything as it wouldn't take me very long to do anyway. Just give me an example of what type of file you would use as the import file (possibly a heightmap?) and I'l get to it as soon as I ge time.

Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 16th Nov 2005 19:02 Edited at: 16th Nov 2005 21:26
that would be excellent lost in thought! Well if you don't want any money then the least i could do would be to.. well just email me privately on this and I'll discuss it with you.

As for the format, I was thinking just to use the matEdit or magicWorld map formats since the source code for loading those matrices are already included with the packages.. and since those are basically the only two world editors I see most dbc users using, (next to the DUNE package created by mkiller for those huge matEdit matrices), I beleive they would be the best 'format' of saved matrix files to use.

I will get started on just taking the matrix loading elements of the source code and posting them or however you want it so that you can extract the necessary matrix information to use within your functions for transforming it to an .x object (preferably .x or w/e format that can be converted to .x/.3ds) and that would be that.. an exe would be a more suited way of doing this being that you could dynamically process these matrices directly from their respective editors and thus even people who just simply want to mod maps or what not for different projects wouldn't require installing db pro to compile the source and convert their matrices.. and that would increase productivity across the lines being that matedit and magicworld are both free.

whilst I have the chance I just want to say thank you very much for releasing your code to the public by the way, and being so nice as to share your resources with the rest of the community, since being able to convert regular dbc matrices to .x objects considerably would boost all of our dbc projects which use matrices to that of a level where our progams would be just .x object based and prove a much faster solution in providing entertaining and feasibly playable projects which involve multi-player aspects where polygon usage would be a concern for interaction amongst players.

after this successful conversion of dbc matrices to .x objects there would still be the worry of occlusion of maps and such; maybe there could be an option which would separate the .x object into different sections like map_1.x, map_2.x... etc.. and since these matrices are just squares you could just divide them evenly down the middle into 1/4 map sections or 1/8 map sections.. etc.

the only other thing that would possibly be a bother would be transferring the dbc matrix collision commands to some custom one (most likely using the intersect object () command), but I think I've seen a solution to this somewhere.. but anyway the main point would be that if you could develop something to convert matedit/magicworld maps to .x that would be a major milestone for all the dbc users!

you've started something big lost in thought.. you've started something big..

..thank you fellow db programmer!

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 16th Nov 2005 19:57
Quote: "the least i could do would be to hook you up with some programs.."


That doesn't sound entirely legal.

But thank you very much for the code LIT! It's very awesome, and I'm almost sure that I can find a use for it. In fact, I wrote a little texturegenerator-function today, and the textures worked flawlessly with objects created from matrices. Awesome code(your code, that is).


I can't be fired... Slaves are SOLD!
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 16th Nov 2005 23:20
I try to make almost anything I do open source (unless I made it for someone while helping them and they don't want it open source).

I'll check into making a converter work with both of those formats. I'll have to find some download links for them when I get home. As for breaking it up, the code already does that. I am now making limbs and adding them so you determine the number of tiles wide and deep per limb. I can just save each limb as it's own object/mesh if you want. I don't have a simple way to save a .x object with limbs, so for now it will be one huge object with no limbs or I can break it up into smaller objects. I'll have to do some research on the .x format for anything more complex than that. I will also make it export .dbo in case anyone wants to use it with DBP.

Also there was a get ground height example code posted somewhere on these forums to work with terrain/matrix shaped objects.

Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 16th Nov 2005 23:57 Edited at: 17th Nov 2005 00:00
thanks for your quick response,
yes breaking the object into smaller pieces or just having the entire thing exported as a single object is a great idea. possibly you could just make an optional radio button for either choice.

as for locating matedit and magicworld:

magicworld (free and even comes with complete source code (i luv u robin king) ) can be located here: http://www.robinking.com/allseeingi/magicworld.htm

matedit and its respective utilities (created by the ever famous and ever wonderful TDK_man) can be located here:
http://matedit.com/downloads.htm

I have the outline of the dbo heiarchy and data structure if you would like a copy for educational purposes and that's about it! let me know if you need any cool source code for something you are working on or even some cool particle effects; I have this program called wondertouch particle illusion and I absolutely luv it.. well outside of the fact that I just stare at the animations rather than using them in anything.. haha. but yes, keep up the great work my man.. you are a true knight amongst the community!

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 17th Nov 2005 11:07
I have downloaded and looked at both of them. It should be fairly easy to do. Just to get a few things straight though.

You just want a program with simple gui to convert those 2 file types into .x objects. You do not want to view the object while converting (I can do this but it would slow down the process). You will also have to load the texture file and use texture object to texture it when loading into DBC until I have the time to properly look into the .x object format to save limbs and texture names. Is there anything I am missing? The DBO saving should auto load the textures if they are in the correct path.

I had to work late so I won't be able to start on it right now, but I should be able to do it when I get off work tomorrow. I will release the code and exe in case anyone wants to modify it.

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 21st Nov 2005 19:44 Edited at: 8th Dec 2005 12:34
I haven't forgot about you, I've just been really busy. Here is a version that can load magicworld .mwdb files and make 1 object for each matrix inside the file. It copies heights, calcs normals, and makes a temp set of UV's evenly spread accross the matrix. With .x saving you will have to texture the objects loaded with texture object. The .dbo should auto load textures. The matedit functions are bugged in this version. I will fix them and convert the original uv data from the old matrixs to the new object so they will look like the original matrixs.

[edit] Updated converter

Just the exe:
http://mapmasterz.com/lit/mat2obj_beta4_exe.zip

Source and media for tests:
http://mapmasterz.com/lit/mat2obj_beta4_source.zip

Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 22nd Nov 2005 02:30 Edited at: 22nd Nov 2005 02:43
I luv this guy!
u r a genius. <-- that is pronounced 'period!'..

darn the .x is not working in magicworld lol!
well no worries.. w/e you get time! thanks!

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 22nd Nov 2005 02:56
.x and .dbo was working from magicworld here though I tried in DBP. I'll try in DBC tonight.

Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 22nd Nov 2005 03:08 Edited at: 22nd Nov 2005 03:33
I tried loading a produced .x in magic world from this test level I created in magic world but it wouldn't load. here is the level I made if you would like to test it.



O.. and Aura is back with Age (no pun intended)!

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on

Attachments

Login to view attachments
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 22nd Nov 2005 03:44 Edited at: 22nd Nov 2005 03:46
I just ran and converted your level and it worked here. Using this code:



I ran that in DBC. I chose the filename "teste.x" to save to and it saved it as teste11.x for teste + matrixnum + limbnum + .x as I have it set for 1 matrix and 1 limb.

Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 22nd Nov 2005 04:08 Edited at: 22nd Nov 2005 04:14
awesome!
here is a test for anyone who would like the pleasure of trying it.

I tried texturing it with the texture object command, but I am gonna try to see if I can find somehow to texture the object properly b/c a simple texture object command won't work so I rem'd it out in the edited code below that is originally by you.

the .x object for the code below is attached



the rest of the stuff can be ironed out later! you rock man!

o.. and don't move the mouse too wildly there are some wild wrapvalue() commands in the code!

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on

Attachments

Login to view attachments
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 22nd Nov 2005 04:19
Yeah I just added them quickly as DBC doesn't like angles different from 0-360 whereas DBP does.

If you know of a link to an ascii .x file format with a good explaination I can fix it alot easier (make it auto load textures and texture properly).

Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 22nd Nov 2005 04:31 Edited at: 22nd Nov 2005 04:32
hey lit,

I found some links on google, they may or may not have references to texture data, but the first and second ones are pretty detailed.. I will keep searching for references to the .x format.. maybe even davey cakes could help us out :

.. I can't get the link buttons to work gahhh.

http://astronomy.swin.edu.au/~pbourke/dataformats/directx/#xfilefrm_Header_1

http://www.gamedev.net/reference/programming/features/xfilepc/

http://www.toymaker.info/Games/html/3d_models.html

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx81_c/directx_cpp/Graphics/ProgrammersGuide/Appendix/XFiles/xfilearchitecture/XFileArchitecture.asp

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 22nd Nov 2005 10:02 Edited at: 22nd Nov 2005 11:40
Cool. Those will help alot. I forgot to attach the source code in that post. I will include it in the next. I will release 2 more updates before making a properly limbed .x (only 1 object to load that will auto texture like .dbo). I need to get matedit working for the next release, then get the textures to be applied correctly to the converted objects like the matrix and fix the break object up functionality for dbo which does nothing ATM. After these 2 releases I will learn the .x format and make an awesome version for DBC users.

[edit] Seems as though that version does work with matedit files. I just didn't have the camera setup properly in my code for the particular level. So now all I have to do is get the textures applying correctly and fix the break object up code, then on to the DBC friendly version.

[edit2] Also since I have the source code to magicworld, do you think it would be helpful to update it to DBP code and just make a .x saving function to use from inside it? Assuming I can get the .x with limbs and texture data working correctly of course.

Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 23rd Nov 2005 05:03
lit...















































you are a genious.

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 23rd Nov 2005 11:37
I can assure you, that I am not. I also have another question. Do you think I should add user adjustable lighting smoothing for the exported objects? Here are a couple of screens.

No smoothing of lighting normals.


50% smoothing


100% smoothing


Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 23rd Nov 2005 16:35 Edited at: 23rd Nov 2005 18:36
do I send check or money order? fantastic work my friend..

If you think it's a good idea, then believe me.. it is! haha, how do you do it??

o btw lit, I was checking out the small little section I almost always skip when scrolling up and down the forums for cartography shop.. and that stuff is amazing! I was looking at the huge screenshot section with work by numerous designers and stuff and I was about to cry b/c it was so beautiful..

imagine what we could do if we combined the power of your converter to utilize the use of our precious db matrices with the extenuating power of the .csm maps all in one program!!!

no one would complain about how they think matrices are too slow to use in their program and who knows, maybe it would re-interest alot more users in the use of matrices and inspire alot more new db level creators..

o it's so wonderful how this whole db thing is revolutionizing!

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 23rd Nov 2005 18:40 Edited at: 23rd Nov 2005 18:41
thank goodness robin king decided to give his source for free domain with magicworld.. if he never did, I don't know if this would have been all that possible or w/e it is that happenned. thanks robin!

woo hoo dbc rocks!

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 23rd Nov 2005 20:45 Edited at: 24th Nov 2005 21:43
The reason I bought DBC was to convert APEX's csm importer over to it, I just never got the time to learn DBC's memblock mesh format. I have never seen one like it. If I had a couple of examples or explaination of it, I may be able to convert it. The only problem with DBC is that you can't seem to resize arrays on the fly.

As far as the smoothing it's easy, DBP has set object smoothing

DBP makes programming way easier. It's memblock mesh format is very simple IMO. Of course if I ever found out how DBC's worked it may be simple.

[edit] Told you I am no genius. I've been working on an object and texture exporter to make it texture the same as the matrix when I just realized that there is only 1 texture file. All I have to do is adjust the UV's of the matrix object to make the tiles on the image fix the correct locations. I should have this fixed this week or weekend. Will post exe and code when done.

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 25th Nov 2005 06:18 Edited at: 8th Dec 2005 12:35
This is finished. It supports converting matedit and magicworld files to .x and .dbo, with matrix lighting smoothing (use values from 0 to 100), and the objects are textured just like the matrixs. However my lighting smoothing has destroyed the auto texture loading even for .dbo, so for now you will have to load the textures and use texture object to texture them until I learn the .x format a bit better and update this. I will upload and post link (to exe and source code) after I build a simple gui in blue gui and comment the code.

[edit] Finished the first beta. Texture auto loading is back in for .dbo as far as I know everything works, except the breaking up options and auto texture loading in .x until I learn the .x format. You can still use the checkboxes but it doesn't really do anythiing in .x. Also make sure when using the break up option that you specify a value that is evenly divisible by the number of tiles wide or deep in the matrix. Like if the matrix has 25 xtiles and 25 z tiles you would use a split of 1,1 : 25,25 : or 5,5 and not something like 2,2 or it will give you an error. I will re-write this in the next version when i fix the .x object breakup. Right now it only produces 1 .dbo or 1 .x per matrix (some files have more than 1 matrix in them so more than 1 will be produced). The .dbo is broken up if the option is enable but the broken up parts are limbs of the main object.

[edit2] Updated converter

Just the exe:
http://mapmasterz.com/lit/mat2obj_beta4_exe.zip

Source and media for tests:
http://mapmasterz.com/lit/mat2obj_beta4_source.zip

Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 26th Nov 2005 04:20 Edited at: 26th Nov 2005 04:25
excellent work my friend..

here are the results:

I loaded a scene exported from magicworld with the regular matrix and
got an average of 34 fps,

then I loaded the same level with your converted matrix and I got an
average of 86 fps!

dude, you are awesome!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


The .x object did not export with textures as you said, but I textured
the converted matrix with a grass texture and exported the level with
magicworld, then I loaded it in dbc and it worked!.. I was thinking
there was some command in dbc that could save out an object.. that way
you wouldn't have to worry about figuring out how the textures work,
but I couldn't find that dbc command.. maybe it could be done with
either meshes or memblocks, I dunno lol.. but I have unwrap 3d by brad
bolthouse and I believe I could do the proper texture editing in there
on the .x file.. either way I will try to find a suitable means of
properly texturing the .x file..

I know the multi-tex routine is included in the magicworld source so I
am thinking of writing something that can read the matrices multi-tex
properties and simply texture a box shaped portion of the screen
according to those properties (basically being what tile texture goes
where)and then using the save image command to export it to a texture
file and then simply apply that to the .x file!!!
Brilliant I tell you..

as for another solution I will try to find some program that imports
.dbo files and can export .x files with textures.

great work my friend.

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 26th Nov 2005 11:03 Edited at: 8th Dec 2005 12:34
Cool. Glad I could help. I will release a new version very shortly. This includes a working progress bar (I forgot and left that one in testing mode), saving of settings each time you convert a file, being able to convert multiple files without restarting the program (one at a time of course), and a status box (though the program is so fast you can hardly have time to read it on my machine).

[edit] I broke this up into 2 seperate downloads.

Just the exe:
http://mapmasterz.com/lit/mat2obj_beta4_exe.zip

Source and media for tests:
http://mapmasterz.com/lit/mat2obj_beta4_source.zip


[edit2] This is pretty much done for now until I do some research on the .x format, unless someone finds some bugs. This was threw together pretty quickly (working on my game and helping people at the same time), so there are bound to be bugs. I noticed in this version that Matedit seems to export MMF textures beginning with - instead of _ like the MDF files. So you will have to rename the pool texture in the previous download accordingly. If any bugs are found let me know and I'll see about squashing them. If any new features are wanted let me know and I'll see about implementing them.

[edit3] There was a typo in the .dbpro of the source download. I have included the corrected .dbpro here until I upload the new one with the true .x exporter (auto loading textures) that I am working on.

[edit4] I have learned a version of the .x format (the same that cshop uses as I know DB loads them). I say a version because the .x seems more of a scripting language than a format. No wonder there are so many variations

I'll get to work converting the matrix to object converter when I get time. I'll release source and exe as always.

Attachments

Login to view attachments
Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 28th Nov 2005 16:59 Edited at: 29th Nov 2005 02:31
check out how much smoother this level is with the .x object!
download in the bottom right corner thing.. as for the texturing all I
did was just a simple stretching and moving around of the uv's of the
texture in magicworld, and then I just changed around some settings in
magicworld and got this.

just press enter and then use your mouse and the arrow keys to move.

here is a picture of some different levels I've been working on:
(click on image for larger picture)


set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on

Attachments

Login to view attachments
Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 29th Nov 2005 03:49
o btw.. thanks Duffer for starting this thread lol!

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 5th Dec 2005 14:13 Edited at: 5th Dec 2005 22:31
I was going to update this with the new autotexture loading code for .x but this code doesn't work with DBP 5.9 so I'll have to revert back to 5.8 and then the dbo will be busted up and the .x will work. Can't win for losing with DBP. I'll keep trying to find out what has changed in 5.9, if it takes to long I'll just go back to 5.8 and release it

[edit] I got the code working with 5.9 (I accidently installed the beta of blue gui 2 instead of the current release), however the export .x object code doesn't work on the matrix objects for some reason, though it works on DBP primitives and other loaded (low poly) objects I'll check into this a bit more when I get home.

Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 6th Dec 2005 04:13
hey lit,

no problem; go with the 5.8 version instead! it can always be converted later on; thanks!

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 6th Dec 2005 05:02 Edited at: 7th Dec 2005 12:17
I'll check back on it when I get home. I have it working with 5.9 now but my home-made .x exporting code isn't wanting to work on the matrix objects for some strange reason. Prolly something simple I am overlooking

[edit] I finally got the exporter working with terrain objects. It was a combination of several sleepy and stupid mistakes on my part. I'll have to implement it in the matrix to object exporter and release tomorrow night though, as I am really tired.

[edit2] I am officially an idiot. I just spent 2 hours trying to fix a problem and could not for the life of me find the answer. So I quit for the night. I didn't even make it to the bed when I relized I was opening 2 different files at the same time with the same file nuber in 2 different include files. Anyway I am uploading now. Everything works to my knowledge. I'll post the links when done uploading.

Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 7th Dec 2005 12:36 Edited at: 8th Dec 2005 12:33
Well here it is. Let me know if you find any bugs or want something changed. .x and .dbo should auto texture themselves. However DBC doesn't seem to recognise the limbs and loads it as 1 large object anyway (at least according to perform checklist on object limbs), but at least it auto textures now.

Just the exe:
http://mapmasterz.com/lit/mat2obj_beta4_exe.zip

Source and media for tests:
http://mapmasterz.com/lit/mat2obj_beta4_source.zip


[edit] And for those poor souls trying to read my code or use the program with no docs. I'll see if I can come up with some docs and better code comments sometime this week. Just remember, if you use the split option, make sure the split value is evenly divisible by your matrix size or you will get a memblock outside range error and it will crash. I may see about making it just use the excess polys to make another limb instead of crashing but I haven't the time right now

[edit2] 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/

Also I have added more comments to the export x code and posted it here:

http://forum.thegamecreators.com/?m=forum_view&t=66600&b=6

Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 8th Dec 2005 01:04
hey lit,

I am so excited to test this out!!!!!!!!!!!!!!!!!!

.. gah! I ran the exe and tried exporting a lvl in .x format, but I got nothing but a settings.ini file

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 8th Dec 2005 01:10 Edited at: 8th Dec 2005 01:15
Try the .dbo and see if it works. I was so sleepy I might have uploaded the wrong version

[edit] No it's working here. I tested with all 4 levels that I have. Are you trying a new level? If so send it to me and I'll check it out.

Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 8th Dec 2005 01:17 Edited at: 8th Dec 2005 02:27
excellent.

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 8th Dec 2005 01:19 Edited at: 8th Dec 2005 01:49
I just downloaded the source and exe from those links here at work and it is all working here (both .x and dbo). It may be the level you are trying to convert is somehow different than the ones I have or something with your system/ DBP bug.

[edit] Here is (attached) a .x I just made from the candyland demo file. See if it will load for you.

[edit2] I did just find a bug though. If you don't select the breakup option you will get a division by 0 error and a crash. I'll fix that and repost later tonight. Try checking the breakup option and useing 1 for the breakwide and breakdeep values.

Attachments

Login to view attachments
Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 8th Dec 2005 02:17 Edited at: 8th Dec 2005 02:29
hey lit,
just got back from dinner with the FAMILY. you were right it does work
lol.. but for some reason it was not converting my older levels, but I made
two fresh ones in mw real quick which you can view if you like.. I tried converting these two but it
doesn't load either properly in mw as .x objects.. try converting and
loading them my friend, here are the files:

[edit]
hey sorry about that I was using 7-zip in b-zip format to make it really small
but it was only a couple kb of difference.. here it is re-zipped with winrar.

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on

Attachments

Login to view attachments
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 8th Dec 2005 02:26
What did you use to zip that? I keep getting errors trying to unzip.

Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 8th Dec 2005 03:32
here are the new zip files. oops lol.

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on

Attachments

Login to view attachments
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 8th Dec 2005 10:24 Edited at: 8th Dec 2005 12:29
I get the same unzipping errors with that file. I'll check into why they won't load in MW even though they do in DBC for me.

[edit] The models are loading into mw fine. mw is just doing this to them:



messing them all up. If I remove this part of the code it loads fine.

[edit2] It does this to make objects be created in front of the camera. If you want I can edit mw and make a version with a load matrix object function that will load it at 0,0,0 and rotate it to 0,0,0 and let the object's info do all of the positioning and rotating.

[edit3] Fixed the break object bug and uploaded.

Just the exe:
http://mapmasterz.com/lit/mat2obj_beta4_exe.zip

Source and media for tests:
http://mapmasterz.com/lit/mat2obj_beta4_source.zip

Lukas W
20
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 8th Dec 2005 11:17
here is one for dbc

http://www.levelmaker3d.co.uk/levelmaker3d.asp

download the source of the tool to get the code

Zombie Hunter DBPro Open Source Project:
editor: 14% | survive mode: 30% | multiplayer: 0% | story mode: 0% | DEMO: 18%
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 8th Dec 2005 12:38 Edited at: 8th Dec 2005 22:46
@Lukas W : Cool. I'll add support for their matrixs as soon as I get time. That'll be 3 programs it supports

[edit] I am also adding a heightmap to matrix object option to this. You specify a heightmap and a texture file and it creates the object.

Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 4th Jan 2006 17:39
amazing project here...

not letting this slip away haha should be in newsletter!!!

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
x1bwork
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 4th Jan 2006 19:34
99% of LIT's work should be in the newsletters. Ever see his game? More so, ever see the source code for his game?

Unless i'm mistaken,he's writing his own frustum culling engine based on matrix4.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 4th Jan 2006 21:54
Well I've got alot of stuff yet to do before I can finish this lol. The culling is a major project, but I out it kind of on hold till they fix a couple of DBP bugs as the hide limb command is usless ATM and doesn't really give much of a performace boost. When I get back to it and add those last 2 features, I'll add a program announcement thread for this converter. Then I can just wait until people find bugs and I'll fix them. Once this is solid, I would like to write a DBC version even though DBP is faster.

x1bwork
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 4th Jan 2006 22:02 Edited at: 4th Jan 2006 22:03
Quote: "LIT Corner"
is what the Newsletter needs. Sage, monthly, dbp coder advise and suggestions.

Actually,add to that,Sepekku and Mega Modeling spot and the newsletter would take an interesting turn.

..then throw in "dodic babble blog" for comic relief..

ok,ok. i'll not hijack this thread. sorry.
Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 6th Jan 2006 01:40
dodic is so funny!!!!!

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 6th Jan 2006 01:41
talking about hijacker.. where is that game? it is so tight!
o and has anyone played Sunday drivers? that game is so awesome
and I recently tested out this airplane simulation thing from this new zealand guy's website who used to be on the db forums back when they were on darkbasic.com.. it is such a good program!

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on
Impreza
21
Years of Service
User Offline
Joined: 7th Nov 2002
Location:
Posted: 6th Jan 2006 01:44
and yes xb (which btw is the name of a really nice car) lit is so cool right?! I want a t-shirt.

set mipmap mode 1: set matrix texture 1,1,1: set spot light 1,0,90: set normalization on: sync rate 0: statistic(1): flush video memory
autocam off: always active on: hide mouse: set window on

Login to post a reply

Server time is: 2024-04-28 07:05:02
Your offset time is: 2024-04-28 07:05:02