Posted: 27th Jun 2007 21:05
Hi I posted this in 3d chat, but not sure how many people are reading over there.

Basically I created a model in 3d studio, set some materials properties, and exported the model. When I load the .X object in darkbasic, it appears colored properly, but just dull plain coloring with no particular material properties.

Is there something I am missing to make objects appear in game like they do in 3d studio?

Thanks in advance for assistance.
Posted: 27th Jun 2007 21:40
DBP works with the textures from 3dsmax, but does not apply the settings from the material files. The material files store a lot of data that you can set manually inside the DBP commandset, such as ambience, transparency etc. Some of the other effects which are rendered in 3ds max can be obtained in DBP with the use of shaders. For more information on shaders and DBP, visit this thread:

http://forum.thegamecreators.com/?m=forum_view&t=79849&b=8
Posted: 27th Jun 2007 21:59
Thank you, except I did not use just one material type for the model, otherwise it would be no problem to setup the values using the DBP commands.

I used a few different materials in the model, so I don't want to apply an effect to the whole object, I want each part of the model to appear with its individual material settings. Or, perhaps this is not possible?
Posted: 27th Jun 2007 22:23
Ok as I read more about this, I think I am beginning to understand my problem.

Correct me if I am mistaken at any point please:

Setting material properties in 3d studio is useless, the only time i'll see those rendered is in 3d studio itself. When I export the object to .X none of those materials are saved, just the colors of the surfaces.

In order to display an object using multiple materials (via the DBP commands), I would have to:

1) Save/Export each portion of the model that uses a different material seperately.

2) Load each "piece" of the model as seperate objects in DBP, applying the different material settings to each along the way.

3) Align the objects through code to re-assemble the "pieces" into the original model.

At this point, if I could "weld" the model together into a single object for the purpose of movement/rotation/etc, then this would be fine, otherwise manipulating this frankenstein object would be a total nightmare.
Posted: 28th Jun 2007 0:19
Well you have a few options there actually. If your model has multiple meshes, you can assign them as limbs in dbp. Then you can texture the limb (see example in help files). Additionally you might be able to get away with no limbs if you UV wrap your model. 3DSMax has a very nice UV Wrapper.

So if you want to apply specific settings to different parts of the model, you can apply the settings on the limb level in some cases, or on the per-object level in others. It may be necessary to export different parts of the model as seperate objects, depending upon what you wish to accomplish.