PureGDK - 3D Programming for PureBasic
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!
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!
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.
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.
I don't understand "Does PureGDK manage subgroups? ". Can you be more specific?
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.
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.How can I use memblocks?
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.
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.
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.
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:

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.
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!
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!