Incorporating 2 types of models

Started by
0 comments, last by unbird 8 years, 5 months ago

I try to mix 2 types of models in my game engine.

One type is .X, the other one is .dae

The dae is a little bit strange.

When I wrote a renderer for it, I had to invert the up-vector for the view matrix

D3DXVECTOR3(0,-1,0);

But for the x files,

The up is usually D3DXVECTOR3(0,1,0);

How do I integrate 2 sets of assets into one usable set of assets?

Should I totally forget about the .x format, and concentrate on the .dae format?

And let the camera up vector be inverted as is?

Update:

Funny

When I set the camera pos of D3DXVECTOR3(0,5,5) and the target of D3DXVECTOR(0,0,0) I had to invert the camera

When I set the camera pos of D3DXVECTOR3(0,-20,5) and the target of D3DXVECTOR(0,0,0) I didn't have to.

Thanks

Jack

Advertisement

Those are just file formats. Convert them at load time into ONE coordinate system and only one so all your models are consistent. If you e.g. look at the Assimp importer: There are a couple of post-processing flags to do such conversions automatically (handedness, etc.). Furthermore: For load speed a binary format is recommended anyway, so that you don't need to do a post-process every time.

This topic is closed to new replies.

Advertisement