Best Approach for different textures/images on different box faces

Hi Guys,

This may be a stupid question since it seems I might be making something hard which isn’t. I want to create a box that has different images on different faces. Do I need a TextureAtlas for this? My first thought was that I could use a single texture with different images in different locations, but I haven’t figured out how I can wrap a single texture around the multiple faces of a box geometry despite tinkering with Texture.WrapMode.


You need an atlas and to set the texture coordinates appropriately. Or you can make each face a separate quad… whichever your skill level finds easier.

Gotcha, thanks. I need to figure out the texture coordinates details; I’m a bit of a greenhorn in these areas. I’ll dig into the docs and see what I can figure out.

You can also look at the source for some of the other meshes (like Box, Quad, etc.) and see how they setup their texture coordinates.

Excellent tip!

It took a little trial and error to figure out what I was doing with the TextureAtlas and the texture coordinates, but I got it working. I extended Box and adjusted the texture coordinates as needed. Thanks again!