Sign in to follow this  
pjank42

Multitextured mesh

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this