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 / 3D World Studio Loader for DarkGDK

Author
Message
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 4th May 2008 08:37
Looking great man and thanks for doing this as I would have never had the time.

"The dilema I have at the moment is wanting to provide easy access for people not wanting to jump into the code at the deep end but still keeping it reasonably efficient."

That is always the biggest challenge of open source projects. I haven't fully studied the code yet, but I'll bet it's fine. I always give up in the end and sacrifice neatness as you can tell by my code. And I never really have enough time to make it as eay to follow as I would like to. Is the code you posted the latest one? I haven't gotten fully back into c++ yet, but I wanna start back real soon.

I have pretty much quit with DBP and all coding for now as life is pretty busy ATM. I will come back and update the DBP code to show your changes when I get time if no one else has by then. No timetable on that though. I still wanna put it into the open source engine. I'm gonna make a better open source engine for Nuclear BASIC when it's done. And probably port it to Nuclear Fusion as well. The alpha testing is coming along nicely and I love having a developer listen to you and not just blame everything on directX.

Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 4th May 2008 11:49 Edited at: 4th May 2008 13:44
Hey ... welcome back man ... great to see you!!!

Quote: "Looking great man and thanks for doing this as I would have never had the time."

Your welcome LIT, your work deserved a wider audience.

Quote: "Is the code you posted the latest one?"

Yes, although I'm planning on releasing an update today incorporating the additional functionality detailed in the posts above. It's a really simplistic search facility but will at least give those who can't or don't have time to code there own something to work with!

That's going to be the final update as thats pretty much as far as I intend taking it. People can just run with it and modify it as they need. There should be sufficient example code in there now for people to expand on.

I'm no great C++ programmer to be honest so bare that in mind when looking at the code. The hardest part to be honest was testing for memory leaks. TGC really did us no favours by not releasing a debug version of the DGDK library this time round, unlike on previous occasions. My requests for a debug version have gone unanswered. As a result, I was forced to remove all the DGDK code in order to test the OOP side and ensure that the final app cleaned up properly!

Quote: "I have pretty much quit with DBP and all coding for now as life is pretty busy ATM."

Sorry to hear that but I must admit, with my failure to get any convincing dynamic shadowing up and running in DGDK and the continuing hassle with never knowing when bugs are going to be fixed I'm starting to look elsewhere myself. Nice to hear things are going well on the Nuclear front. That’s something I aught to take a look at as well as Josh's new ver 2.0 engine

Quote: "I love having a developer listen to you and not just blame everything on directX."

I wouldn't know ... I've never experienced that yet

Quote: "will come back and update the DBP code to show your changes when I get time if no one else has by then."

That would be cool, as I know a few people have asked about that.

The only real change was the second build option I added where I basically do away with multi limbed objects creating them all as individual objects so I could take advantage of the blend mapping functionality. This also allows TGCs built in frustum culling to come into play which doesn't work with multi-limbed objects. Although you of course have a solution to that!

The only other change that immediately comes to mind was the positioning of mesh objects. I seem to recollect that I had to subtract 180 from all of the axis to get the orientation consistently right. It was a kind of empirical fix as I never quite understood why .. lol

Anyway ... thanks for the shout LIT. Great to know your still alive and kicking. I'm sure whatever direction your headed in is probably one we'll all want to keep an eye on so let us know what you're up to from time to time and good luck

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: 5th May 2008 01:45
Update for 3D World Studio Loader for DarkGDK

Following my own integration of this loader code into my engine and the requests from a few others for help on extracting data on Entities, VisGroups and Key Data I reviewed the code and have added a new level of functionality designed to aid this.

This comprises a series of new functions within the C3DWScene class providing support for data extraction. Please note that these provide some simple search facilities which are by no means particularly efficient. I’m assuming, like myself, most people will be using these during the level preparation stage and, as such, speed wasn’t considered that critical. If dealing with large numbers of entities and objects or where searching within a game loop you might want to code your own.

The code is released as a patch to the existing loader and can be found in the first post of this thread below the original download links. Backup your original code files and simply replace the existing ones with the patched ones to apply it.

For anyone who has already taken the code and integrated into their own engines I have identified the changes to the four key files with the comments 'Added in ver 1.1' which should allow easy identification of the changed or additional code.

Full details of the new functions are available in the updated '3D World Studio Loader for Dark GDK.htm' file accompanying the patch. I have placed some example code showing these in action in the new main.cpp file, un-comment the code block to use.

Hope you find this useful.

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 May 2008 02:12
Thanx PixelPerfect

P.S. @ LIT - Cheers! Good to see you around!

mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 7th May 2008 00:37 Edited at: 7th May 2008 00:39
Thanks Pixel Perfect for new Update.

its really great work.

http://www.nvidia.com/docs/TEMPLATE/482/nv_logo_footer.gif
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 7th May 2008 01:23
Thanks guys. I think this should now enable most users to harness the full power and design potential of 3DWS. Glad you like it

No matter how good your code is, someone will improve on it
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 13th May 2008 12:20 Edited at: 13th May 2008 12:22
hi Pixel Perfect,
This is link of my demo project and contian me.3dw file,
Click here
Quote: "i would like to ask u question. how i can access any object in me.3dw for example make red Barrel move(dynamic) or change some properties of tree like Transparency.i write in darkgdk :
dbLoadObject("objectName",objectID);
dbMoveObject(objectID,5);
i should know object id for red Barrel or tree to access it:"

can i do this in new update of 3dw loader?????
if yes. please make red Barrel move for example.
Thanks..

http://www.nvidia.com/docs/TEMPLATE/482/nv_logo_footer.gif
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 14th May 2008 00:07
Hi mouness, in answer to your question ... yes you can do this with the new update. As you correctly say, you need to know the internally generated ObjectID for the barrel and the tree.

The way to do this is as follows:

1. Open you level in 3DWS and select the barrel.

2. Select the barrel by clicking on it in the perspective window and then click on the selected object in either of the other windows (this is neccessary or you can't bring the properties up).

3. Choose properties from the edit menu or press Shift+Enter to bring up the properties dialog

4. In the classname box type 'barrel'

5. Click on the Add button to display the New KeyValue window and enter 'name' for the KeyName and 'barrel1' for the KeyValue, then click OK.

6. Do the same for the tree setting the Classname to 'tree' and the KeyName to 'name' and the value to 'tree1'

7. Save the level.

8. Replace your existing level in your project with this one.

9. Use the following code to obtain the ObjectID assigned by the loader:



So basically, in 3DWS group similar objects by giving them the same classname, that way, if you want to act on all of these collectively, you can search and return objectIDs based on just the classname.

Secondly, ensure you give them a unique name by assigning a name Key and Value. This way you can identify individual objects and return their ID.

So, if for instance you had 5 barrel objects all with the classname 'barrel' and named 'barrel1' to 'barrel5' if you wanted to say hide all the barrels then you could do the following which demonstrates the use of the ? wildcard character (this will return any value for the position in which it is used):



The functions use a vector<int> (similar to an array) to enable one or many items to be returned giving greater flexability than just allowing a single item to be returned at a time.

It's up to you how you use this but I hope that demonstrates a simple use of just one of the functions as well as providing a direct solution to your question.

No matter how good your code is, someone will improve on it
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 14th May 2008 11:52
Thanks pixel u r realy Perfect

http://www.nvidia.com/docs/TEMPLATE/482/nv_logo_footer.gif
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 14th May 2008 21:11
lol I wish Glad you're happy though, let me know how you get on.

No matter how good your code is, someone will improve on it

Login to post a reply

Server time is: 2024-04-23 09:11:43
Your offset time is: 2024-04-23 09:11:43