Mike Tirado

I am trying to load a .x model into my engine and im having a bit of trouble getting it to render properly. if i load in an x file my friend sent me it will work fine, but when i try to export my own model out of maya 7.0 the mesh renders all black. the confusing part is that the mesh works fine in the directx viewer, and my code loads other .x files fine. has anyone encountered this problem before

here are some screenshots i took debugging, my material is set up fine, but in pix you will see that theres something really funky going on.

black rendering
Pix screenshot
Materials seem good

*edit*   i forgot to mention that the texture is also getting loaded in and returning S_OK






Re: Game Technologies: Graphics .x maya exporter problems

Mike Tirado

I've been messing around with maya trying different material properties and it seems that if i give it an incandescence value you can see the texture on the model, but it still isnt being lit by the scene like the other .x model is.  im really confused as to why this  is happening.  the mesh can light itself  with the incandescence material property, but cant be lit by the scene. and my other model has no problem with lighting at all!  doh, im stumped.

*update* 
   
m_pMesh->GetFVF() is returning 0  i'm assuming that means the mesh has no FVF and this is bad.  this could be the root of the problem, and now im trying to figure out why it has no FVF.  i tried using UpdateSemantics() to change the FVF but it still returns 0.




Re: Game Technologies: Graphics .x maya exporter problems

Mike Tirado

The problem has been solved, so if anyone ever runs into this here is the solution.


With certain versions of Maya if you don't assign a vertex color it will give a default vertex color of 0,0,0. Just go into maya and open up polygon components and look at the vertex color. Flood them to white and try exporting again.

Additionally, you can open up in notepad and do a search and replace to 1.0f.


thanks to Dave Neubelt for helping me out on it!