Extrapolate clamped texture with fixed color

I want to set a small texture onto a large object, that only consists of one face. So I unwraped this face (in Blender) and scaled it up in the UV editor. The more I scale it up, the smaller the texture is on the object. (I hope it’s understandable: The unwrapped faces goes beyond the normal borders of the uv map.)

The problem is, that the pixels outside the texture are just continued from its border pixels, but I want them to be transparent (or any other color that I set).

As you can see, the corners of the stop sign are already transparent, so most of the object is blue as desired, but it also touches the border and – depending on the LOD – either the very thin black or the bigger white border of the sign are extrapolated to the sides beyond the texture.

Please note that I disabled tiling in my texture asset by setting “X/Y-axis tiling method” to Clamp. You can find this option in the section “Texture” under Advanced.

While you can achieve that by modifying the material, I would consider this:

  • Scale down the stop sign in a texture editing program just a little(while keeping the texture size constant)
  • Draw a narrow blue frame around the texture borders

Well, nearly two years too late, but at least someone cares of my problems :slight_smile:

My result:

Looks like a hack, but you can easily define a frame in the material editor. Connecting the “Scale” parameter to the “Texture Scale” input node is not necessary, but let’s you scale the texture additionally.

2 Likes