Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have a simple Blender-Model (just a few faces). I want to add 2 Textures. (a special face should get Texture 1, the other faces Texture 2). This model I want to use in XNA.

The first Texture should be replaceable at Runtime by Code (the new image is generated based on user input).

So how do I best solve this: Using UV-Maps or Normal-based Maps in Blender? How can I access the Blender UV-Mapping in XNA? Or do I completely perform the Texturing in XNA (using Code or shaders)? And how (I´m new to this)?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Blender can only export UV Maps for skinning Models in XNA. So i created in Blender a Model with 2 Materials containing a Texture (by UV maps). I exported the Model using the built-in FBX-Exporter.

In XNA the default-processor can load the FBX file. In XNA the Textures of the model can be accessed and changed by loading (or generating) a Texture2D-Object. This object can easily replace the default skin:

Texture2D bg = Content.Load<Texture2D> ("bgimage");
((BasicEffect)myModel.Meshes[0].Effects[1]).Texture = bg;
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.