From MilkShape3D to Direct3D without .x files

Started by
2 comments, last by Limal 21 years, 9 months ago
I want to use MilkShape3D, but first I must convert model from .ms3d format (right-handed, like OpenGL) to left-handed coordinate system (intelligible for Direct3D 8.1). I wondering how can I do it? If Anyone know, please give me solution. I''ll be intebted. PS. In program "Skeletal Animation Tutorial" (Real SOON Now - Brett Porter) is used header , in header delivered with MilkShape3D SDK - isn''t. Why? I think it have link with "char" type in C++. PS.2 I want to using .ms3d format because it is very economical. The .x files can be 5x bigger than .ms3d file.
Advertisement
header in Real SOON Now - "pshpack.h"
in MilkShape3D - "ms3dspec.h"
to convert the coordinate system, while u r reading the vertex indexed list, read every triangle from CW to CCW, for example, from 0,1,2 to 0,2,1.

in your rendering routine, negate the final Z value (z=-z). (if playing animation, negate after transformed)

that''s it, i use this method in my engine, hope this help.
Thank You for fast reply.

In my converter (build in Borland C++ Builder) I switch verticies and negate Z.

I have a question:

I must negate also Z-normal.

-pGroup.pVertex[ID[j]].normal[3];

?

This topic is closed to new replies.

Advertisement