Directx 9.0 and Maya 6.0 material issue


#1

I’m new with direct3d programming, what i’m trying to do is to make a simple model (with Maya 6.0) and load it on a direct3d application, the thing is that when I start the program the model doesn’t have any material on it.

I even assigned the direct shader to the model (thanks to the Directx plugin), and it still has a shadeless black color…

I took the C++ code from some tutorial of directx SDK 9.0 (december update) that loads a 3d tiger with it’s texture, I’m only changing some parameters.

What’s could be going wrong? Where can i find some info about this?
It would really be helpfull since i have been trying for days to do it…:scream:

Another thing, If objects can be exported with they’re materials from Maya, Whats are .fx for? I know it’s like a procedural material… or something like it.

Is it possible to load .fx materials directly in c++? If so, what’s the common thing to do?

Thanks for any help. :bounce:


#2

Hey,

The reason you are getting a black shapeless material is because the normals are flipped on the mesh model. For some reason (in my experience) whenever you export an .x file from a maya poly the normals are alwasy flipped.

This is what I did to fix it.

Highlight entire poly.

  1. go to poly-> normals-> setFacetoFace
  2. poly -> Normals -> reverse
  3. poly -> normals ->setfacetoFace

seems weird I know, but it will set the mesh info so the light can interact with the normals on the poly and produce shaders


#3

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.