As of 2.76 there is a built-in option to handle this.

In Blender Internal there was an option to turn this off (called Clip)

Is there a way to do this with Cycles?
I know you can just scale your textures up with a transparent background, but you end up with textures much bigger than they need to be.

Is there a way to this, and if not, why not?

  • $\begingroup$ Where is the clip option? Link is broken $\endgroup$ – VRM Jun 7 '16 at 15:18
  • $\begingroup$ @NᴏᴠɪᴄᴇIɴDɪsɢᴜɪsᴇ Are you referring to the BI link? If so, it should be fixed now. $\endgroup$ – gandalf3 Jun 7 '16 at 16:46

Cycles node system is very flexible and allows you to manipulate the UVs in pretty much any way you like.

The UV channel can be used as if it were just an image where U and V correspond to red and green channels.
These can be separated and manipulated using math nodes to create a mask you can use to clip the texture. Here's a screenshot of a node setup doing that:

 screenshot of suggested node setup

This uses the clip mask group to mix the texture to black. You could also use it in a mix material node to mix with a transparent shader or the like.

While making such node groups is a relatively long process, you can append or link the node group whenever necessary after you've made it once.

  • $\begingroup$ what are those places where a node is connected to the connector between to other nodes?? $\endgroup$ – gandalf3 Jun 22 '13 at 22:40
  • $\begingroup$ @gandalf3 they are reroute nodes, they don't have any futional purpose, they're there just to make the setup clearer. You can add them by shift-dragging over a connection. $\endgroup$ – hjaarnio Jun 23 '13 at 11:36

As of this commit (will be in 2.76), there is now an option to set the coordinate extension mode similar to BI:

enter image description here


You can simply use the mapping node and check the min and max boxes. Set the number of repeats in the values next to max check boxes.

Check my example here: https://dl.dropboxusercontent.com/u/62273197/MappingNode.png

  • $\begingroup$ Thanks, I got it to work, sort of. I guess I still don't understand how the mapping node works. I can't change the size of the texture. Textured, Material, and Rendered views all display different results.. If someone can explain the the mapping node in detail, maybe that will help. $\endgroup$ – gandalf3 Aug 7 '13 at 23:49
  • $\begingroup$ Yeah.. the location, rotation and scale values are in fact weird. My workaround is to create a separate UV layout to position the "decal" exactly where I want. Then I use the min and max check boxes to avoid tiling. $\endgroup$ – Utopia780 Aug 8 '13 at 22:33
  • $\begingroup$ It should be noted that with this technique, the outer pixels will be stretched. If the outer pixels are all transparent, then it works great. $\endgroup$ – gandalf3 Aug 29 '13 at 22:45
  • $\begingroup$ @gandalf3, Why exactly are the outer pixels stretched? I've run into this problem quite a lot. $\endgroup$ – Anson Savage Jul 29 '15 at 22:55
  • $\begingroup$ @AnsonSavage When the texture coordinates are clamped to 0..1, all coordinates outside of that range will be equal to 0 or 1. Pixels that are mapped to exactly 0 or 1 (along an edge) will be mapped everywhere there is a 0 or 1, "duplicating" them on the clamped coordinates and giving a stretched appearance. See blender.stackexchange.com/q/2629/599 for ways to avoid this $\endgroup$ – gandalf3 Jul 29 '15 at 23:03

Ooh! I just had to deal with this the other day.


Those are the tutorials that I found helpful. Unfortunately, as far as I could tell, it's really a longer explanation than can be laid out here, but I found those tutorials only after a dangerous trip to Mordor and back...

Hopefully it'll save you some time hunting them down. Cheers!

  • $\begingroup$ the one on blender artists seems like the simplest way of doing it, but I couldn't get it to work.. seems only to work for where your uv map is not bigger than the texture? $\endgroup$ – gandalf3 Jun 23 '13 at 0:27

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.