Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am not familiar with 3D graphics, and I'd like to know the right way to render some 2D figures on different points of a wider face of a 3D object. My 3D object is just a cube representing a poker table. I have a 2D png for players' placeholders, and I'd like to render these figures on the 3D object where needed. An alternative solution would be to render the whole face with a big picture containing all the placeholders figures. However, it would be a waste of memory and thus less efficient.

What do you suggest?

share|improve this question

To render on the cube, the images must be used as textures and in Unity that means assigning the images to materials (probably with the Diffuse shader) and assigning the material to the object's MeshRenderer.

However, it's a bit more complicated than that, because the system needs to know how to map the texture to the various vertices in the cube, and there are many different ways to go about this, including merging the various images into one texture, or having multiple textures in one material, etc. There is no right or wrong way, although making all the figures into one image instead of several is usually more efficient, not less efficient, and is likely to use less memory.

Usually the 'easiest' way to set this up is to create the object in a 3D modelling program and export that in a form that Unity can read. However even this is relatively complex for a beginner unfortunately.

share|improve this answer
thank for your answer. In my case it can't be more efficient as I just have to duplicate the same png in four different points of the cube and rotate it in two of them. This png is far shorter than the cube face area. I already have the 3D object in Unity as an import from a Blender exported object. I just need to know how to render a small png on four different points of a cube face. – Jun 2 '12 at 13:10
Worrying about efficiency with a technique you've never used is premature, especially with a maximum of 8 or 16 images? What Kylotan suggests, building 3D objects and placing them in the scene, is the best way forwards. – Patrick Hughes Jun 2 '12 at 15:11 you don't need to do any rotation - you just need to tell the system how to map parts of the image to points on the triangles that make up the cube. Unfortunately that is complex to do by hand which is why it is usually done in the 3D modelling package. – Kylotan Jun 2 '12 at 15:51
Thank you Patrick and Kylotan so you mean I should do that in Blender (for instance) and export the mapping as well. – Jun 2 '12 at 16:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.