DirectX File, beginner's question !
Posted on 2001-06-19
Hi all ...
I create a space craft using 3DStudio Max4, it is a frame (group) which contain 3 main meshes : GUN, COCKPIT, BODYCRAFT. I group it together as CRAFT_GROUP.
I save it as *.3DS, then I export it into *.x files.
My question :
1. Using 3 tools (converter from MS-Dx 8.0 SDK, 3D Explorer, and 3D Viewer), all gave me wrong x files. One X file give a craft with wrong direction (the craft face down, the gun face up ...??), another give me craft without guns, and another giving me a "NICE AND COMPLETE" craft, but not in group anymore (CRAFT_GROUP is gone, replaced by 3 child meshes)... How to solve this problem ?? ?
2. Then, I create a simple space craft which all the thing embedded in one object (the gun, body and cockpit). Conversion is fine .. although now the space craft is facing up (craft.x) ... Now I tried to use it in Borland Delphi (WDirectX). Next strange behaviour occurs ... no texture ! The space craft is simply mono-color : grey, without shade. But when I see the craft.x using 3D Explorer or 3D Viewer, it has texture ! So who's fault ? I suspect my code is wrong, so I replace the craft.x with dolphin.x or car.x (taken from MS-DirectX 8.0 SDK), it works fine ! The car is green, the dolphin is silver ... So, where is my mistake ?
I read this from SDK :
SetRenderState( D3DRENDERSTATE_LIGHTING, DWord(TRUE))
Only works for vertices which include a vertex normal.
What that means ?
I keep making new space craft with different color, different texture bitmap, or even without texture ... all is displayed with no-shading grey color ...
I can e-mail my craft.x / craft.3ds if someone is insterested ...