PureGDK - 3D Programming for PureBasic

Developed or developing a new product in PureBasic? Tell the world about it.
ale870
Enthusiast
Enthusiast
Posts: 180
Joined: Wed Jul 09, 2008 7:02 am
Contact:

Post by ale870 »

Good news! Thank you!
Is there any proposed relase date? (within this year?)
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

It won't be until after DBP 7.1 and PB 4.30 are stable.
ale870
Enthusiast
Enthusiast
Posts: 180
Joined: Wed Jul 09, 2008 7:02 am
Contact:

Post by ale870 »

Hello,

I have (another) question.
I'm not a 3D expert, but I know that, in a modeling 3D program (e.g. AC3D, 3D Studio Max, Maya, etc...), I can create a complex model, then I can assign a name to every submodel (smaller pieces composing the scene).
For example, if I create a complex room, I can assign a name to every chair inside the room self (chair1, chair2, etc...). I can call tables as table1, etc...

Now, can I "find" those models in PureGDK?
Can I get its position?
Can I move it like an independent model (not moving all the room self!)?

I hope I was enough clear.
basically speaking, I need to use an external 3D editor, but I need to load all the created mesh (model) in PureGDK, then I need to manage the models inside the big model.

Thank you for your help!
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

When you create an object in DBP you assign an ID to it. You can easily create a map of which ID belongs to which name in a list or an array to "name" an object. With the appropriate data structures you can create a whole hierarchy of "names" if you like. Because no two objects can have the same ID you will never have a conflict.

Edit:

I think I misunderstood you. Your question is how to acquire the name of an object assigned in a program like 3dsmax in PureGDK? Try exporting to a .txt from 3dsmax using the Pandasoft exporter. Do a search and see if the object names are preserved.

If they are you might be able to get the object names by loading the object into DBP, parse the .x file, and match up the limbs to the object hierarchy in the file. The new .dbo format supports exporting with binary data using memblocks so you could use this to write your own .x to .dbo function to preserve the limb names.

It's a bit long winded but to answer your question: no, I don't believe you can acquire the name of individual limbs simply by loading a .x/.dbo because I don't think the .dbo format has a member which stores this data.
ale870
Enthusiast
Enthusiast
Posts: 180
Joined: Wed Jul 09, 2008 7:02 am
Contact:

Post by ale870 »

Thank you.
Does PureGDK manage subgroups?

How can I use memblocks?

Can you suggest me a link to find such information?

Thank you for your support.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

I don't understand "Does PureGDK manage subgroups? ". Can you be more specific?
How can I use memblocks?
See the PureGDK documentation for help on memblock commands. There are also many, many posts about this on the DBP forum and code snippets too.

The memblock commands are only important to DBP which does not have sophisticated support for working with pointers and memory addresses. These commands are provided in PureGDK merely for compatibility. If you need to pass a memblock to a function it would be better to use dbMakeMemblock/dbGetMemblockPtr and then just access it like any other block of memory in PureBasic.
ale870
Enthusiast
Enthusiast
Posts: 180
Joined: Wed Jul 09, 2008 7:02 am
Contact:

Post by ale870 »

I call "subgroup" a model that contain some groups (sub-models).
Since I'm not a 3D designer, I don't know how they are called techically. But some 3D engines call them subgroups.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

Sub-objects in 3dsmax is a paradigm only relevant to object construction. Consider that because there is no actual hierarchy with "sub-objects" how can one part have a relationship to another? When exporting these type of objects from 3dsmax the entire "object" will be exported and not in parts.

If you want to export a hierarchical structure and have it recognized natively by DBP you need to instead break your model into separate objects and link them together by hand. You can do this with the link tool in 3dsmax to create relationships between each part and designate "limbs".

Here is an example that enumerates the limbs in a model and prints their name:

http://puregdk.com/files/upload/obj_hierarchy.zip

The scene.max file requires 3dsmax 9 or higher to open.
ale870
Enthusiast
Enthusiast
Posts: 180
Joined: Wed Jul 09, 2008 7:02 am
Contact:

Post by ale870 »

Thank you for the info. I will check it!
matty47
User
User
Posts: 35
Joined: Fri Sep 26, 2003 10:21 pm

Post by matty47 »

Hi,
now that DBpro is updated to 7.1 and Purebasic 4.3 is out, is the new version of PureGDK being released soon?
Thanks in anticipation
Matthew
ale870
Enthusiast
Enthusiast
Posts: 180
Joined: Wed Jul 09, 2008 7:02 am
Contact:

Post by ale870 »

Same question for me :D
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

PureGDK is being worked on and will be released soon! There have been major improvements to large portions of the code base that have taken longer than expected. Most of the core portions of PureGDK have been completely re-written to provide a much more stable and verbose compile process. No more "Engine core not found." errors and so forth. :)

A few highlights:
  • New error handling routines
  • All core DBP and GDK framework libraries are now 100% threadsafe with the debugger on or off, the new error handler will provide immediate information if a collision with the GDK libraries does occur
  • Completely re-written compiler which is faster, more verbose, and command-line enabled
  • Better integration with the PureBasic IDE (no more kill program button getting stuck)
  • PureGDK rendering is now done in a screen rather than a window. Internal code changes now provide built-in support for interacting with the DBP window using native commands regardless of the parent window. Previously the DBP render window had to be subclassed to capture input.
  • Process termination is now much more stable than it was before. Previously there were some stability issues while freeing resources.
There have also been some improvements behind-the-scenes by TGC to help provide better compatibility between DBP and PureGDK.
ale870
Enthusiast
Enthusiast
Posts: 180
Joined: Wed Jul 09, 2008 7:02 am
Contact:

Post by ale870 »

Good news!
Thank you for this feedback!
Please take me updated, since I'm really waiting for this new great release!
ale870
Enthusiast
Enthusiast
Posts: 180
Joined: Wed Jul 09, 2008 7:02 am
Contact:

Post by ale870 »

Hello,

I need to create a BIG terrain, and I found that DarkBasicPro can use advanced terrain.
I red in your previous post that PureGDK can use it (I'm happy!).
The problem is I need to use several textures so I wish to know if I can use a shader to make it ( http://forum.thegamecreators.com/?m=for ... 135070&b=8 ).

More: I need to use Ageia Physics engine, so I wish to know if I can use it with such terrain system.

One thing more: Can I modify the vertex of a terrain to "link" it to another neighbor terrain?
How?

Thank you for your help!
ale870
Enthusiast
Enthusiast
Posts: 180
Joined: Wed Jul 09, 2008 7:02 am
Contact:

Post by ale870 »

One thing more: how can I enable Physics Ageia?
Post Reply