changing material/texture at runtime
#2
Hi,

Sorry for not answering for so long.

If I understand you correctly you would like to show the texture image with the lines that would represent the unwrapped uv maps at runtime from shown 3d model.

The texture image can be get from the object's Model - it should be a DifffuseModel with ImageBrush.

The lines of the unwrapped uv maps can be get from the TexureCoordinates.

For example if the TexureCoordinates[0] == (0.5, 0.5) andTexureCoordinates[1] == (1.0, 1.0) this means that the first Position (from Positions collection) will use the middle pixel (0.5, 0.5 is in relative coordinates) from the texture image. The second Position will use the bottom right pixel of the texture.

So you can simply add lines to the texture image based on the TexureCoordinates.

A good description of using TextureCoordinates can be found on http://blogs.msdn.com/b/danlehen/archive...89627.aspx
Andrej Benedik
  


Messages In This Thread
changing material/texture at runtime - by glindo - 07-29-2010, 08:18 PM
RE: changing material/texture at runtime - by abenedik - 08-11-2010, 10:36 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)