Archived

This topic is now archived and is closed to further replies.

InDirect3D

3DS Max to .X file to D3D == All black mesh ??

Recommended Posts

Using 3DS Max 4.2, I tried creating a simple 3d box and set its ambient, diffuse, specular and self-illumination to all bright green. Then I exported it to greenBox.3DS file Then I use conv3ds greenBox.3DS Then I use the Mesh Viewer to view the .x file, and it''s color is still green. But, in my D3DX9 application, the box shows up as a solid black box. Why is that? Did I forget to do something? Please help, Thanks

Share this post


Link to post
Share on other sites
The only time I ran into a problem like that was when I had no lights in the scene. For some reason, no color settings would work unless I put in a light. I''m not sure why that is, maybe someone else can explain it.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Normals probably missing from you model. Mesh Viewer will generate normals automaticaly if mesh doesn''t have them. Try saving your model from Mesh Viewer and see if that fixes the problem.

Share this post


Link to post
Share on other sites
Turn off the lighting:

g_pDevice->SetRenderState(D3DRS_LIGHTING, FALSE);

Or set up an ambient light:

g_pDevice->SetRenderState(D3DRS_AMBIENT, D3DCOLOR_XRGB(255, 255, 255));

Should work. If not, then I''m sorry for the poor advice.

Share this post


Link to post
Share on other sites