Im currently trying to texture a (transparent) cylinder. I want the texture image to wrap sideways around the cylinder but not the top and bottom faces, they are supposed to just stay untextured (so transparent, in this case).

So what I did (in Blender) is UV unwrap only the side faces and leaving the top and bottom faces as they are.

However, this method doesn't seem to work very well, because when I import the .obj in Unity the top and bottom faces are mapped to a "random" place in the texture and therefore have color.

My current workaround is to map the top/bottom faces to areas in my texture that are transparent, however, this only works when textures have a transparent place, which isn't always the case.


Whether or not you take manual control of a given face's texture coordinates, it will have texture coordinates. Anyway "untextured" isn't transparent, it's the color of the material applied (perhaps a default grey or white.) So this is why as you've noticed it doesn't make faces transparent when you don't directly assign their texture coordinates.

The workaround you describe is, well, pretty much how texturing is done. Thus the word "workaround" is misleading here. Now the fact that this approach doesn't fulfill your needs isn't a problem with that approach, it's just that your needs are more specific.

First off, do you need the cylinder to have a top and bottom face? If they're just going to be transparent anyway, why even have them? Perhaps you need to have a closed surface for physics calculations or something, but you didn't specify.

Now assuming that you can't simply delete the top and bottom faces and actually need those polygons, then you could exclude them from the texture on the sides of the cylinder by assigning them to a separate texture. I'm not sure multitexturing is supported by .obj, but it's certainly supported by Unity.

Another approach would be using vertex colors. I'm not sure Unity supports alpha in vertex color, but I know it supports RGB vertex color so maybe. This approach has the advantage over multitexturing that it doesn't require a new material. I mean, just one additional material in the scene is probably no biggie, but if you don't need a new material then that's better.

  • \$\begingroup\$ The vertex color approach sounds very cool but it seems that it would require a custom shader in Unity. However a seperate transparent material also works just fine and I'm currently sticking to it. Thanks \$\endgroup\$ – Thommy M May 26 '13 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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