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.

AppGameKit Classic Chat / DBO to AGK MeshMemblock converter

Author
Message
Bored of the Rings
User Banned
Posted: 7th Nov 2018 16:38 Edited at: 12th Nov 2018 11:06
I'm currently writing an importer that reads in DBO's (including GameGuru EBE (Easy Building Editor) / PBR ) and writes directly into a Mesh memblock. This will only work with static meshes, but I will be adding a .X export option (reworked code based on my DBO2X app) that will export fully animated and textured objects. The program currently reads in up to and including 8 texture UV coords from the DBO.

Anyway, here are a couple of pics. The 2nd pic is a short test app that rereads the saved out meshmemblock file.

If anyone is interested , I will post a link to the app once it's a bit more solid and fully optimised.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others

Attachments

Login to view attachments
puzzler2018
User Banned
Posted: 7th Nov 2018 17:32
NIce work
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 7th Nov 2018 18:16
Is there a chance, to get a X-export for APK itself for other kinds of objects? At this moment the save-object commands are without any funktion
https://www.appgamekit.com/documentation/Reference/3D/SaveObject.htm

Or is it only a converter, but not written in AppGameKit itself. With a X-export function we could create more tools with AGK. That would be great.
Bored of the Rings
User Banned
Posted: 7th Nov 2018 19:16 Edited at: 12th Nov 2018 11:07
Just to clarify, the above importer program (DBO to AppGameKit meshmemblock) has been written in AppGameKit tier1 code and at the moment just creates a final meshblock file. The directX exporter code will also be written in AppGameKit tier1 code and will be based on the DBPRO code I wrote for DBO2X. The exporter code will also export to .OBJ format. The program works with any FVF size. I am also planning a tier2 version, but wanted to develop quickly in tier1.

Hope this made sense, but please let me know if I've misunderstood anywhere.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Jack
19
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 8th Nov 2018 14:05
Nice Work! Thanks.

[/url]
Bored of the Rings
User Banned
Posted: 8th Nov 2018 15:36
@Jack-thanks



Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 12th Nov 2018 11:08
Ok, I've replaced the term "converter" to "importer" as that's more accurate. Getting multi meshes to work currently, code not quite right yet.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 15th Nov 2018 09:20
so far, I have managed to apply "uv" and "uv1" attributes to the AppGameKit meshmemblock from a given DBO that has FVF size 32, 44 , 56 etc. I need to see if it works with "uv2" , "uv3" etc all the way to "uv7" as DBO's can store up to 8 texture coords. More testing to do, but so far works well. I'm assuming as long as the right AppGameKit shader is used to work with the extra UV coords, it should work, but at the moment, I have no idea. Fun and games.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 16th Nov 2018 12:55 Edited at: 16th Nov 2018 13:49
code is now more flexible to work with multi FVF sizes and the AppGameKit mesh memblock stores up to 8 UV coords and any diffuse color that might be set in the DBO using uv - uv7 and color attribs. more pics and maybe source code will be attached soon all going well.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 16th Nov 2018 14:27 Edited at: 16th Nov 2018 14:31
small pic, shows GameGuru EBE (Easy Building Editor) basic structure (a bit naff knocked up quickly building ), with multi UV Coords stored within multi meshes, this DBO has FVF size 56. The 1st mesh (a spikey sphere) is hidden as not added the multi mesh handling code yet but will be my next step. What I also want to do is dump out the whole of the AppGameKit Meshmemblock data for debugging and analysis (my speciality):
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others

Attachments

Login to view attachments
Bored of the Rings
User Banned
Posted: 19th Nov 2018 17:02 Edited at: 19th Nov 2018 19:46
now works with multimeshes, even lightmapped DBO levels:
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others

Attachments

Login to view attachments
Bored of the Rings
User Banned
Posted: 20th Nov 2018 10:20 Edited at: 2nd Dec 2018 05:10
Well here is the first draft source code so far. Will make it more modular / optimized later. At the moment it's in it's infancy and needs more functionality, so very basic so far. Feel free to do with it what you want. I've commented out the code that generates the memblock files but you can uncomment it. The file can be loaded in other AppGameKit apps. All the texture coords are present, you just need to load/apply the textures in your own programs. Remove any unwanted global vars as you see fit.

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 21st Nov 2018 19:27 Edited at: 21st Nov 2018 20:27
Hi there .

Thanks so much Botr !!! it works perfect !! At first I had to figure out what was the object number to start "100001 100002 100003 etc..." . I had an example made some time ago with a lightmapper I made with the Evolved function and it really loads dbo and its lightmaps.... now we can even use the Darklights to light our levels.

This is the piece of code I had to use to load my level of four limbs.



I would like to upload an image but no idea how to do that


Cheers.
I'm not a grumpy grandpa
Bored of the Rings
User Banned
Posted: 22nd Nov 2018 11:53
@Chafari-so glad it works for you well. I still testing out on various DBO files and will be adding more to the program as well as a GUI with a ton of options.

If anyone has found this useful and needs anything specific , please let me know and If it's possible, will add to the program.

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 22nd Nov 2018 15:44
@Botr.
Thanks for you offer. It really works great for me...I will wait impatiently for future updates.

Cheers.
I'm not a grumpy grandpa
Bored of the Rings
User Banned
Posted: 24th Nov 2018 09:23 Edited at: 24th Nov 2018 09:26
So what I will be doing is adding a GUI so the user can select textures/FX files etc (textures need to be in PNG format - does AppGameKit support any other image formats? as I can't recall) and also choose various options such as export as OBJ/.X and any other formats that can be exported fairly easily. The DirectX code will work with animated objects, this will mean adding a lot more DBO embedded codes to grab the required data such as animation and skin weight data and also texturing info such as staging etc which is important when needing to use multi materials and textrung. so a ton of stuff to do rewrite and enhance. Some of my DBO2X code will be implemented and updated where necessary to make it AppGameKit compatible and to enhance and also to speed up dev process so not re-inventing the wheel too much. OBJ export is very easy as is adding the materials/textures that OBJ uses.

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 24th Nov 2018 10:02
@Botr. Adding a GUI sounds great .The reason why we need a program like yours, is for the possibility of importing objects with lightmapps from Dpbro. Many of us, the old programmers will find your function quite useful to do all this, since we will be able to use our old levels created for Dbpro . I am somewhat older and a bit clumsy with shopping online, but I think we should pay you in some way for your effort.

Cheers.
I'm not a grumpy grandpa
Bored of the Rings
User Banned
Posted: 24th Nov 2018 10:35 Edited at: 24th Nov 2018 10:42
@Chafari-I'm also an old programmer since 1982/83 so come from a background of old skool programming 8bit peek and poke and the like. I have a program "SegAutoWelder" which is now free and imports FPSC levels/segments fully textured, link is here: https://forum.game-guru.com/thread/220102#msg2606297. But this is more written for GameGuru import, but you could run it and select FPSC level import, choose the level and let it process, then save out to a folder of your choice as either .X or .DBO. It doesn't use the FPSC lightmaps though at the moment. I think though for AppGameKit, I would need to change all textures that are .DDS to .PNG. I might be able to adapt to work with AppGameKit as I did notice trying to import a whole UNIVERSE.DBO into AppGameKit using the DBOtoAGK meshmemblock tool kinda bombed out after a while unless they are relatively small levels/prefabs.
I'll be doing a lot of thinking of what I can do to get larger DBO FPSC levels into AppGameKit, I'm not sure AppGameKit has a 3D object limb system, but I could be wrong it's been a while since I've toyed with AppGameKit and not aware of all it's current abilities. I will have a quick look in the digital skills AppGameKit 2 vol 2 book which I keep as reference.
Anyway, no need for payment, I get paid enough running my own Ltd. company as a contract programmer, but thanks for the offer.
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 24th Nov 2018 12:45 Edited at: 24th Nov 2018 22:04
I have been toying (as you said) with Appgamekit for no more than two weeks . I was most interesting in 3D mode and one of the first things I do was try to load my own Dbo. When I realized that no Dbo possible to load, then I had to convert my Dbo's to .x....I had first to copy UV stage 1 in stage 0 then and use two objects as long ago....one level with lightmapps and the other one with textures and transparency...it was a shi.... but works . Now that you comment about UNIVERSE.DBO I made some test and realized that universe is made with lot of chunks...I thingk that every chunk must be lightted with a number of lights . I had to convert every image DDS to .png .Appgamekit doesn't texture automatically the loaded objects ...someone correct me if I'm wrong . I load the UNIVERSE .Dbo with your funtion and load all png images (0.png 1.png 2.png 3.png etc ) ...It was a kaos, but it really works . I had to check one by one the image to set as lightmaps (more than 40 images....about one our checking trial and error ) but finally the UNIVERSE .DBO works . I think I could do a function to do all this automatically . .

Cheers.

EDITED.

Finally I got it working !! . Now I can load a lightmapped UNIVERSE .Dbo with Botr function . What I did was just force the Universe program to get image in low res to save just one image with the entire level (texturesize=16: texturequality=1) . The final result is ok for me
I'm not a grumpy grandpa
Bored of the Rings
User Banned
Posted: 26th Nov 2018 21:11 Edited at: 2nd Dec 2018 05:11
Loading in the saved memblocks is straight forward, you all most likely already know how to do this but here is example loading code just in case. And of course, you can load and texture each mesh object as they are loaded in. So, in the case of this example universe.DBO has 440 meshes (0-439 meshmemblocks if you like). There is a plugin that adds limbs and attaches them, which I haven't played around with yet, but will have a look which might save rewriting the wheel again, or writing my own code.

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others
Bored of the Rings
User Banned
Posted: 27th Nov 2018 10:22
not sure if there is much call for other formats to be imported to AppGameKit, but am looking and working on .B3D (Blitz3d) model files. Seems to be working ok so far in terms of reading in initial data. If anyone wants to see other formats being imported let me and I'll see what I can do.

Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others

Attachments

Login to view attachments
Bored of the Rings
User Banned
Posted: 28th Nov 2018 15:24 Edited at: 28th Nov 2018 15:27
can now read in from .B3D (Blitz3d) model files. Pic to follow once I get the meshmemblock side setup. pic below is a debug dump out of the .B3D file format. very easy format and has animation data. Shame AppGameKit memblocks don't support animation. maybe one day or TGC actually incorporate their own DBO format. I might, if I get time, get DBO's to import using the original C code, joy
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others

Attachments

Login to view attachments
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Nov 2018 19:09
Quote: "can now read in from .B3D (Blitz3d) model files"


It looks like something like wrlm. Not sure if we can decide what position of the animation import...it would be easy to animate an object with several meshes showing the correct one in a bucle .

Cheers.
I'm not a grumpy grandpa

Login to post a reply

Server time is: 2024-04-18 23:30:49
Your offset time is: 2024-04-18 23:30:49