Jump to content
  • Advertisement
Sign in to follow this  
pjank42

Multitextured mesh

This topic is 4243 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey I've created a mesh with Mesh.box(2,2,2) and now I want to put texture on it. I know how to put a single texture on all 6 sides, but I want to put one texture on 5 of the sides, and another one on the last one. Do anybody know how to do that?

Share this post


Link to post
Share on other sites
Advertisement
You want subsets.

Not sure what the exact .NET names are, but there is an attribute table and an attribute buffer - both need to be filled up. They don't define the materials or textures used, rather they define the different regions that exist. For example, your mesh has 12 triangles and 10 of them belong to one group and 2 belong to another - you then make two calls to DrawSubset() with appropriate index and pipeline configuration.

Note that you may have to split the vertex data to get the correct texture coordinates, but from your comments it sounds like you've already got this sorted [smile]

hth
Jack

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!