0
\$\begingroup\$

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)?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

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;
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .