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.

3D World Studio / DBP 3dw Importer Underway

Author
Message
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 2nd Mar 2008 00:48
Wow! This is very cool gents! Keep up the good work, maybe one day I can fire 3DWS back up


Cheers,
Dave


jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Mar 2008 00:49
THANK GoODNess! .... Heart Palpetating! ... Was seeing a light - from the sky rain down upon me... Until I saw your EDIT! LOL

Glad you fixed it!

FINN MAN
20
Years of Service
User Offline
Joined: 2nd May 2004
Location:
Posted: 2nd Mar 2008 01:20
Pixel Perfect thanks for that code; now I can get on with my engine.

Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 2nd Mar 2008 01:58
@jason ... had me going for a while I can tell you

@Reality Forgotten ... thanks, shouldn't be too much longer now and everyone who wants it can use it and modify it to their hearts content.

@FINN MAN ... glad I could help. Good luck with your engine!

Still Outstanding:

Just the visGroup support. I'll add that in as an additional object class tomorrow and then it's just down to tidying up the code and checking for garbage collection!

I'm going to try and utilise some of the in-built support Microsoft provides for detecting memory leakage and buffer overwrites and see what that reveals, otherwise it's down to scrutinising a lot of code!

No matter how good your code is, someone will improve on it
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Mar 2008 02:41
@PixelPerfect Excellent!

I need to learn about that Microsoft tool for memleakyness. Scutizing code and watching Task Manager in XP is about what I usually do LOL

Anyways - I wanted to say something some may scream at me for.

You are writing a loader. I understand you might have some code to "zoom Around" - but concerning Memory Leaks? Huge ones - well...yeah - ok - worth cleaning but honestly - I just would be happy to get the thing loaded into memory the way you nailed it! After that - I figure its on me to do what I want next. Perhaps make a utility that uses your code to load it, and then dump it to a DBO or series of them... who knows - Haven't looked at your code.

All I'm saying is that you made the untouchable 3DWS WysiWyg - and that gives us a lot to work off of! Can't wait until release!

...someone here has a sig that's perfect for my thoughts of your work - a quote from Sir Isaac Newton...paraphrase: If I have seen into the distance - it was only because I was standing on the shoulders of giants!

Thanx Pixel Perfect!

Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 2nd Mar 2008 12:25
Thanks Jason ... and yes very true ... the shoulder I'm standing on is LIT's, btw hope he's OK as I've not heard from him in a while. He did say he was going to be busy for a while again.

I'll let you know how I get on with the memory checking facilities, I'm not convinced we will be able to use them fully, if at all, due to restraints on which debug runtime libraries we can use but I've not even tried yet so we'll see.

With regard to your thoughts on the 3DWS Import - DBO export workflow, that had crossed my mind too. I did try exporting from one of my earlier loaders but although all seemed to go well and I could subsequently load the DBO file with no errors it failed to display anything! Abandoned it at that point as it was not important to me at that time.

The whole 'how they are using DBO internally' needs looking at as they definitely have some real efficiency benefits embedded in there, they render consistently faster than anything I can produce. Although, as we both know, there can be pitfalls with transparency (until we can adjust that on a per limb basis) and also the color rendition is a lot darker (you can load the object using mode 3 of the dbLoadObject command which gives similar color brightness but you lose the subtle transparency alpha mapping on multi-layered terrains and all of the terrain light-mapping).

Using the 'Industrial Complex' level dbo export, which currently doesn't load the meshes due to the smf format issue the stats are as follows:

Number Of Objects: 1
Number Of Object Limbs: 452

I get totally consistent poly counts of 70220 and frame rates of 83+ for anywhere in the level, regardless of how may items are in view. This is true fps as I'm running in full screen mode with vertical hold forced off at the driver level.

Loading the same level directly in my loader (meshes excluded for a direct comparison) gives the following:

Number Of Objects: 1746
Number Of Object Limbs: 1054

The poly count alters from 70730 maximum to 59416 and the respective frame rate from 16 to 37.

Doing the same with the All Objects switch selected:

Number Of Objects: 2800
Number Of Object Limbs: 0

The poly count alters from 70730 maximum to 1056 and the respective frame rate from 30 to 164.


The All Objects option seems to benefit from two areas:

1.
It doesn't use the shader for texture blending and the obvious fps gain there!

2.
It seems to benefit from internal culling by the DGDK engine which clearly seems to work better with single limbed objects. Notice the DBO level has a single object and displays no poly change what so ever regardless of camera position!

This Jason seems to be the current price we are paying for true color rendition and light-mapping. Some vertex welding might bring about some frame rate improvement but currently, as far as I can see, the code out there for this doesn't fully support the FVFs being used in the loader. Obviously, frustum culling also helps with most scenes.

One thing I would like to see if the DBO method still retains the same margin of fps improvement with all the meshes loaded. I might have to look closer at how josh is handling meshes in his DBO export. I can't see any .smf file names embedded in there unlike the stf texture names which I have already replaced. I have all the smf models exported as .x so if I can just reference them in the DBO file we'd get the whole level loaded as a direct comparison.

The other thing that stands out is the reported limb count for the loaded DBO file object ... just 452!!! Has there been a large amount of limb optimization?

All food for thought for you to chew on lol

No matter how good your code is, someone will improve on it
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Mar 2008 13:53
Great Post! I'm standing on LIT's shoulders too - I've taken the basics he showed us for Frustrum Culling and have run that through a gambit of various techniques, optimization routines etc... trying to get the biggest bang for the buck... though I FINALLY came to the conclusion that to get the FASTEST possible Frustrum culling system going - one needs to incorporate the Frustrum "hierarchy" into each LEVEL individually... And choose the best "technique" for each NODE...And Object or ObjectWithLimbs choices etc. My low level Techniques are three: OBJECT+LIMB Culling, Object, and "Groups" - (Which are handled like a region but everything in the region is culled at once - but LOD is a few items per cycles) Each have thier benefits and caveats. Using them smartly - Well - can be used to tune a level to be pretty dang fast!

I'm already thinking about how this could be incorporated into your 3dws loader. I'm wondering if that visgroups and other "meta data" mechanisms Josh put into his 3DWS program - if this could be done inside 3DWS. Also thinking how DarkAI "areas" could be defined ... perhaps as a visgroup - no textures etc.. just blocks... and/or tagging objects like a building's walls etc.. So the loader could be tailored to bring in AI Obstacles, Physics "rules" if simple collision doesn't do it, etc.

I think you helped(are helping) break a new frontier of possibilities with this project now.

though in the back of mind - I'm troubled by DirectX10 - and how much code I'm doing now that might be wasted.... You think about that? I do.

Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 2nd Mar 2008 16:25
Yeah, I know you did a lot of work with his frustum culling code. I will probably be talking to you in a bit more detail about the new algorithm I'm using and implementing quad trees etc once I get the 3DWS loader out of the way.

Regarding embedding game engine directives into 3DWS levels .. your ideas all sound viable. I have been thinking pretty much down the same lines as my aim has always been to drive the engine as much as possible from the level design. I guess the next logical step would be scripting support to even further divorce the game play from the engine!

Quote: "I think you helped(are helping) break a new frontier of possibilities with this project now"

I hope so, as this was one of my two main goals in completing the project that LIT started so well.

1.
To achieve, as much as is technically possible, true WYSIWYG from 3DWS to DGDK

2.
To provide easy access to all the 3DWS Entity, Key and VisGroup data so users can really unleash the power of the 3DWS design environment as a tool for their DGDK game engines.

If we achieve this, then all the efforts of LIT, Tireswing and myself will not have been wasted.

Quote: "DirectX10 - and how much code I'm doing now that might be wasted"

It's always there in the back of my mind too, but technology stands still for none of us and I'd never achieve anything if I stood back and waited for what could or might be. I wish Lee would give more information about his thoughts/plans for an up and coming DarkBasic10 though. My guess is we are all looking at total re-writes!

Having said that, a good DirectX9 engine is still a powerful thing and when I consider I still like to replay the original Unreal game from time to time it kind of states that 'A Great Game' is much more than just having the latest technology under your bonnet ('hood' stateside ). Not one of us can match the graphical prowess of a Major Games Design House even if we have the technology because we don't have scores of graphics artists working night and day to produce the content. So we need to be a little more inventive

No matter how good your code is, someone will improve on it
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 2nd Mar 2008 19:40
DGDK Loader for 3DWS Update

VisGroups are in and working fine!

No matter how good your code is, someone will improve on it
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 3rd Mar 2008 01:18
Unable to use the standard Memory Leak Detection and Buffer Overrun support in MS VC++ due to the fact that we do not have debug library versions of DarkGDK. Have logged this in the BUG REPORTS forum as they have not provided a wish list thread for DarkDGK. I'm a bit pissed at this as they came as standard when I originally bought DarkGDK, yet another backwards step which just serves to hamper any serious development!

No matter how good your code is, someone will improve on it
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 3rd Mar 2008 14:35
OK, I've been thinking about this, I'm going to try to seperate out all of the DGDK code from the main file loader as it's the file loader which is using OOP and it's pretty well written completely in C++. At least I can then test that for memory leaks. It's fortunate that there is this level of divide in the code, with my game engine which freely mixes DGDK code and C++ it would be impossible.

It's still going to take a bit of work, but I want to get this tested and out of the way so I can release the code.

No matter how good your code is, someone will improve on it
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 3rd Mar 2008 16:27 Edited at: 3rd Mar 2008 16:27
This is wonderful news. I am converting LIT's DBP engine over to GDK and hopefully these projects can merge into one.

Your mod has been erased by a signature
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 3rd Mar 2008 19:18
Cool ... is that LITs free Quake1 style FPS engine FreeEnginePublic2.dbpro? I tried the demo and it looked like LIT had done a good job.

Will you be making that code freely available when done?

I'm not sure how that compares to FPSC who's source code is also freely available to DBPro owners!

No matter how good your code is, someone will improve on it
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 3rd Mar 2008 23:53
Quote: "Cool ... is that LITs free Quake1 style FPS engine FreeEnginePublic2.dbpro? I tried the demo and it looked like LIT had done a good job.
"


Yes, yes it is. I never got the demo to work, which is why I am converting it to GDK.

Quote: "Will you be making that code freely available when done? "


I plan on making it freely available when done.

Quote: "I'm not sure how that compares to FPSC who's source code is also freely available to DBPro owners!"


It's not a drag and drop like FPSC. If someone wants they can make it that way. I'm just putting it into objects so people can use.

Your mod has been erased by a signature
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 4th Mar 2008 14:07
Sounds great ... how far into the project are you?

No matter how good your code is, someone will improve on it
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 4th Mar 2008 19:17
Still plotting it all out on paper first. Hopefully will have functionally starting next weekend.

Your mod has been erased by a signature
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 5th Mar 2008 21:40 Edited at: 5th Mar 2008 21:41
DGDK Loader for 3DWS Update

OK, well I'm nearly there. Separating the code out has allowed me to check the file loader code for memory leaks ... and there were plenty lol. But all looking nice and clean now. No reported memory leaks.

If you’re reading this Jason, I know you were expressing interest in tools and techniques for memory leak checking. Well I have been using Visual Leak Detector 1.9d (Beta) by Dan Moulding and it's available to download from the CodeProject site as follows:

http://www.codeproject.com/KB/applications/visualleakdetector.aspx

I can really recommend this tool. It's easy to implement requiring just a single include line in your code and reports all memory leaks found when your application exits including the originating file and line number where the offending object is instantiated and dump of the leaked memory blocks. Worked a treat for me and it's free! Much better than Microsoft's internal support for this, which I tried initially.

So for anyone awaiting the release of the loader code ... I'm really hoping that's now less than a week off! Will keep you posted

No matter how good your code is, someone will improve on it
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 5th Mar 2008 22:26
@Pixel Perfect - I AM! Thank You Very Much. Downloading.

Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 6th Mar 2008 21:44
DGDK Loader for 3DWS Update

Well the good news is progress is going so well I'm hoping I will be in a position to release the code this weekend (probably Sunday).

I'm currently just tidying the code up and will be writing a small guide to accompany the code. I was thinking of bundling in the 3DWS 'Industrial Complex' level as a demo although people need to be aware that all rights to this belong to Leadwerks (The makers of 3DWS) and the textures and models will be copyrighted - so don't use them in commercial projects.

I will post notification of the release here but it will actually be released in a new thread so that the download is available at the top of the thread.

No matter how good your code is, someone will improve on it
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 8th Mar 2008 01:16
DGDK Loader for 3DWS Update

The code is now complete and will be posted this Sunday.



No matter how good your code is, someone will improve on it
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Mar 2008 02:17
YEAH!!!!! Congratulations Pixel Perfect! And Thank You!


Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 8th Mar 2008 02:35
LOL ... thanks Jason

No matter how good your code is, someone will improve on it
Anonymous User
16
Years of Service
User Offline
Joined: 21st Feb 2008
Location:
Posted: 8th Mar 2008 19:37 Edited at: 8th Mar 2008 19:38
So the exporter loads each brush as an object, how would you normal map the level then?

Edit: just thought about it, would the csg commands let you join objects with the same texture, then you can apply normal mapping.

???
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 8th Mar 2008 21:19
The brushes are currently light mapped as that's how 3DWS exports the lighting for brushes. The terrains and meshes use vertex color for the lighting.

If you wanted to apply lighting directly to the brushes in your game engine then if you do not light map the level in 3DWS the importer will construct the normals on a per object basis, either multi-limbed or single limbed depending on the mode of operation. It's not something I've played with yet so I can't really comment further.

No matter how good your code is, someone will improve on it
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 8th Mar 2008 21:32
DGDK Loader for 3DWS Update

All the code and media is now packaged up and ready for posting, I'm just in the process of completing the documentation (basic ... but hopefully enough to get most people up and running).

Still on target for release tomorrow!

No matter how good your code is, someone will improve on it
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 10th Mar 2008 01:45
DGDK Loader for 3DWS Update

Well I have tried posting a new thread three times with the code attached as a zip file but each time it finishes the upload it just errors!!! Very frustrating. The zip file is 37Mb in size so maybe this is causing problems. The File Uploader applet wouldn't even touch it saying it exceeded the maximum size which is wierd because that says it supports up to 50Mb

No matter how good your code is, someone will improve on it
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 10th Mar 2008 02:11
Happens all the time to me... open a Google open source project if you want - but might need to split it to TWO (less than) 20meg files.

here's mine - probably a link to start your own there: http://code.google.com/p/darkgdkoop/

Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 10th Mar 2008 03:15 Edited at: 10th Mar 2008 03:18
If you want, I can host the file. I own a hosting company so bandwidth is not a problem.

Contact me though my email on my website in the contact area.

Your mod has been erased by a signature
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 10th Mar 2008 15:14
Thanks guys, much appreciated.

@Cellbloc
I have emailed you.

No matter how good your code is, someone will improve on it
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 10th Mar 2008 21:03
Sent. Let me know if you have questions.

Your mod has been erased by a signature
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 10th Mar 2008 23:18
Sent Again.

Your mod has been erased by a signature
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 11th Mar 2008 01:51
DGDK Loader for 3DWS Update

Finally released. See the following thread:

http://forum.thegamecreators.com/?m=forum_view&t=125713&b=13&p=0

No matter how good your code is, someone will improve on it
tim21701
15
Years of Service
User Offline
Joined: 13th May 2008
Location:
Posted: 13th May 2008 23:15
How your code works?
I wish to start a map "Complex" - not in a format *.dbo, in a format *.3dw using thus Dark Basic Professional.
At me only the message on a mistake: " Runtime Error 8003 - Could not find path at line 17 " (DBpro 1.068).
In what folder your code should be? And what file starts your example: "Complex.3dw" (from a folder 3D World Studio 5.52) or "Complex.3dw" (from folder Leadwerks Engine SDK)?
Help me please, I only start to learn DBpro.

Excuse, for my bad English...

Login to post a reply

Server time is: 2024-05-03 12:21:12
Your offset time is: 2024-05-03 12:21:12