3DS Max to .X file to D3D == All black mesh ??
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
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.
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.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement