daimaku

hello i have a problem loading a model that i have made it in 3d studio max 9, the model is a human all with texture, but when i put it in the content pipeline and try to run or compile the program the compiler send me this error

Error 2 BasicMaterial has a texture, but geometry does not contain texture coordinates. E:\my games\prueba01\prueba01\enzo.X prueba01

What i need to do to correct this how do i put texture to a geometry what does it mean



Re: XNA Game Studio Express error loading model in xna framework

cronholio

You need to assign a set of UVs to your mesh so the texture can be applied. If you have assigned UVs in Max, you need to see whay your exporter is not including them in the X file.





Re: XNA Game Studio Express error loading model in xna framework

daimaku

i have checked all the part of my mesh and all have an uv map, i don't know why the panda exporter don't export the uv coordinates, how do i check this



Re: XNA Game Studio Express error loading model in xna framework

cronholio

Just to make sure we are on the same page, you open the UV editor in Max and see the unwraped wireframe mesh, correct

 If that the case, open up your .x file in the Direct 3D viewer application that comes with the DirectX SDK (nder utilities) and see if it will show you the UVs. Or, if the x file is in the ascii format, open it up in a text editor and look for this section:

MeshTextureCoords {

13;

0.8085998;1.237794,

1.152267;0.8330591,

0.8741654;0.8591328,

...

}

I don't know the particulars of Max 9 or the X exporter you are using so I can't be of much help. It maybe there's some flag you need to specify on the exporter to export your UVs or it may be something silly like the exporter expecting your UV set to have a particular name.





Re: XNA Game Studio Express error loading model in xna framework

Lord Zarquon

You may need to play around with some of the options in the Panda exporter. I had trouble exporting UV coordinates incorrectly on models with bones. The only way I managed to fix it was to export the model twice, once with the 'Bones' checkbox unticked, and once with it ticked. Then, using a text editor, I manually copied the MeshTextureCoords section of the boneless .x file over to the one with bones.

I've also had trouble with Panda not exporting UV coordinates if they're baked onto mesh, but it worked fine when I had a UVW modifier in the Modifier List.

Another thing that may cause this is if Panda is exporting any dummy objects from your scene, seeing as they wouldn't contain mapping coordinates.

And, although it sounds like one of those 'have you made sure it's plugged in' suggestions, you'll also want to make sure you have the 'Mapping coordinates' checkbox ticked.




Re: XNA Game Studio Express error loading model in xna framework

daimaku

i'm tired, i have tried a xxxx number of options, configurations, checked and unchecked option and allways is the same, if the model show in the game the only thing that i can see if a big square and the other option is the maps coordinates error, to go easy with this "issue" i have a new question, What is the best software for making the models to the xna framework i 'm talking about the compatibility thing. i have tried maya 8.5 but i can't see any directx .x file exporter plugins for maya, these is a really mess, a lot of 3d software but i don't see the exporters around here, all the exporters are for the old version.



Re: XNA Game Studio Express error loading model in xna framework

cronholio

If you have Maya 8.5 you can try using Maya's built in .fbx exporter instead.

 

Or, if you really want to use X, have a look at the Direct X SDK. There is source code for previous versions of X exporter for both Maya and Max. You can probably build them for current versions of Maya and Max without much effort.