Yes , you can load objects with so called "multi sub object material"
The reason you can do this is because load object is nothing more than a C style wrapper for D3DXLoadMeshFromX function. It loads the x file but you have no access to the materials (limb texture()function returns negative numbers as image ids).Personally i don't like engines where useful data is hidden from the user...
DBO also supports multi sub object materials , unfotunately 3d world studio can't export dbos with multi subobject material , instead each time a new texture is applied to a face , it creates a separate limb with that texture.At export you will en up with : numOfTexturesInScene == numLimbsInDBOFile.
This is a problem... why ? because the :
- transform
- render states
- materials , textures
are set for each limb in the DBO before it is drawed.This could be slow if you have lots of textures.
Also the original question was "What Can We Do To Fix DB Pro"
Well here are my thougths on this question.AKA what would I change in DBPro :
1 . Object handling :
the syntax :
load object objectId , filename
shuld be changed to :
objectId = load object (filename)
I mean seriously , do we need to iterate trough the whole object list (or map or whatever) to find the object we need ? This is really time consuming... And also why should i keep track of my FREE object slots ? To avoid the "object already exist at line.." error ? This is absolutely useless.If i dynamically allocate an object in c++ the new returns a pointer to the object which is guaranteed to be unique for every new object in the program.So why not use the returned pointer instead of passing in constant ids ?
myObject = load object
2 . structure... DBPro badly needs a parent child structure !
object id = load object fileName , parent
3. OOP behind the scenes ! All entities should derive from "DBEntity" class. This way all objects (lights , sounds , objects particles , etc) can be automatically attached to each other (parent child hierachy)
myObject = load object "torch.x"
light1 = create light myObject
sound = load sound "fireSound.wav" , myObject
The above code loads a torch model , an attach a light source and a sound to it. So if you move , rotate , scale the torch , all it's children are move rotates scales automatically.
3 . Static geometry handling.
DBO is ok for a simple animated model / enemy etc but it is horrible for large levels. The map format should have the following features :
- octree optimisation
- material sorting
4. UDTs with arrays
5. functions returning by reference or pointer
6. function parameters passing by reference or pointer.
So thats what i'd like to see in future versions of DBPro
[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]