Troubleshooting this TutorialSometimes, even though you try hard to understand the information in a tutorial, things don't work out quite like you want it to. This page is here to help you resolve any problems you might be having with using the BasicEffect class. The Common Mistakes section describes common problems that people have when doing the things in this tutorial, and how to resolve them. The Frequently Asked Questions section describes questions that people have that aren't related to mistakes, but rather, trying to understand the stuff better or exploring how it can be used. If your problem or concern isn't addressed here, feel free to add a comment below, so that I know where you're having trouble. I like to keep these pages fairly clean, so I may remove comments that I felt like have been addressed. If I remove your comment and you don't feel like the problem has been fixed, repost the question and we'll take another look at it. If a tutorial has a mistake in it, I will fix the mistake and reply to the comment with a brief explanation. However, after a couple of weeks I'll likely go back and remove the original comment as well as my reply, because, hopefully, the problem will have been fixed, and it won't be a concern any more. |
Common MistakesNone listed yet… |
Frequently Asked QuestionsNone listed yet… |


hello !
Look at my c# coding :
The psp isn't textured after applying the basicEffect class. I don't understand what.
Please explain my fault. (sorry for my bad english =) )
Daviciacos
I can confirm this as a problem, I'm having the same issue you said, the texture doesn't show up, but when I put this:
effect.Texture = guntexture (my model is of an M1911 and the Texture is a simple gray square made in paint)
effect.TextureEnabled = true;
the compiler crashes with this error: "The current vertex declaration does not include all the elements required by the current vertex shader. TextureCoordinate0 is missing."
flipping the two in any configuration doesn't fix this. The only thing I can think of is the fact that my model wasn't exactly done yet, however, creating lighting like in your next tutorial successfully lights the gun well.
I don't see anything immediately wrong here, but I don't actually think my PSP model (if that's the one you're using) has texture coordinates assigned to the vertices. That may easily be the problem that Daviciacos was having. Nero One, it sounds like you're using a different model entirely, but the compiler error that you're showing (TextureCoordinate0 is missing) tells me that this is likely the same thing. You can't apply a texture to a model that doesn't have any texture coordinates. Try applying some texture coordinates to the model (or dump in my Helicopter model which has texture coordinates) and see what happens. I suspect that will fix it. If not, please post a follow up…
Yeah… I just realized I didn't put a UV Map on the model in Blender, everythings working fine now, I'm just getting an odd warning, doesn't look too bad, only have one question though, when I applied a texture to the model in Blender (during UV Mapping) it didn't show up on runtime (the model was still white) but that was with effect.TextureEnabled set to false, setting it to true correctly applied the texture, if I removed these two would it work normally?
Yeah, if you've got everything set up correctly, a model with no texture, and texture mapping turned off, you shouldn't see any texturing. (Is that what you were asking?)
yeah, you just need to let people know that you need a proper UV map set up in blender or Autodesk in order for the texture to work
apparently the error I was having is caused when there is no UV Map Coordinates set in the exported .fbx file.
Post preview:
Close preview