UV independent material.

Sometimes you need to use a texture as a scaling guide when building a structure, this little node set allows you to use the “box” uv mode in world space. Another issue of “box” mode, is that if you like sharp pixels on your guide textures, you’ll notice that using “Closest” prevents your textures from repeating properly.

So here is a little node graph (which i just keep inside a group) that will correct the UVs that are fed into your texture.

Now all you have to do is plug that node into your texture UV node. And it’s done!

Explanation on what’s exactly going on with this:

When setting a texture to use “box” uvs & and “closest” for the filtering, it causes a weird behavior where the texture will only accept uv values that are within the standard UV space (0.0-1.0).

The solution:

  1. Separate the position components X Y Z
  2. Add 1000 (or any other round value) to each of the position components (this prevents them from being negative… at least up to -1000 meters)
  3. Modulo the result by 1 (constraints the result to a repeating 0.0-1.0 value space).
  4. Recombine X Y Z into a vector.

 

Kyrah Abattoir
Creator of BDSM and fetish content in Second Life since 2004.

Seasoned 3D artist and programmer, aspiring video game creator.

October 2024
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  
Archives
Categories