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

Started by
3 comments, last by InDirect3D 21 years, 1 month ago
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
Advertisement
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.
D3DXComputeNormals

[Piebert Entertainment] [Ask The All-Knowing Oracle A Question]------------------------------------------------------------GDSFUBY GameDev Society For UnBanning YodaTheCodaIf you want to see yoda unbanned then put this in your sig ------------------------------------------------------------DAIAGA Dave Astle is a God Association. To join, put this in your sig!Founder and High Priest of DAIAGA[edited by - YodaTheCoda on December 10, 2003 1:57:54 PM]
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.
"Who's John Galt?"

This topic is closed to new replies.

Advertisement