Version 0.8 - use model built-in materials...

Jan 15, 2012 at 10:25 PM

Hi again,

This may be a stupid question, but I cant seem to find a way to load my model (fbx), which has various materials assigned to various meshes, using xnaf engine.

All the GameObject3D constructors seem to require a Material object passed in, which of course bypasses the materials defined in the model itself.

 

thanks!

Coordinator
Jan 16, 2012 at 3:08 AM

The only materials valid are the engine’s materials, you can’t load an fbx and expect to use the shaders that it references. Moreover, the engine is a deferred renderer, which means that it’s more complex and normally third-party shaders should not be used without an adaptation.

The idea is to do all the rendering using the build-in engine’s technology. Sorry.

 

Bye. José.

 

Ps: there are empty constructors for GameObject3D.

Jan 16, 2012 at 8:09 AM

Thanks José.

Hmmmmm...so youre saying basically - for example, that if you wanted to combine all your Murcielago models, into 1 model file, you would not be able to assign individual materials to all the individual components of the car. You have to have a separate model file for each indivudual part.

If this is the case, is there a way to access the multiple individual components of a model file and then assign them individual materials?

Ciao

Joao

Coordinator
Jan 16, 2012 at 8:26 PM

Currently, yes, you have to do it that way. I don’t know if this will change or not (some optimizations are more difficult to implement). Moreover, I don’t think it’s so important, you have to batch to the less materials possible. I.e. you have to use few materials and with specular and diffuse textures (even if the diffuse texture only gives constant colors) you will produce more material variety.

 

But I understand if you see it like a pain in the… you know… the ass :p

 

Bye!! José.