thedo
I think you will need to write a custom processor - something like this (shamelessly robbed from Shawn Hargreaves blog - which any sane XNA developer should check daily ;))
[ContentProcessor]
public class CustomEffectModelProcessor : ModelProcessor
{
protected override MaterialContent ConvertMaterial(MaterialContent material, ContentProcessorContext context)
{
EffectMaterialContent myMaterial = new EffectMaterialContent();
string effectPath = Path.GetFullPath("MyEffect.fx");
myMaterial.Effect = new ExternalReference<EffectContent>(effectPath);
return base.ConvertMaterial(myMaterial, context);
}
}
Heres the link to the blog entry in question - http://blogs.msdn.com/shawnhar/archive/2006/12/07/rendering-a-model-with-a-custom-effect.aspx
I expect you'll want to modify that quite a bit, but i think all youd need to do would be to change the external reference to your new texture and be away. Of course this will only affect the build stage - so it wont be dynamic. I suppose you could force it to load all the textures and then switch at runtime based on some data in a tag somewhere, but its difficult to say without knowing what resukt youre after
N