I have a game where you can paint surfaces with different paint and I wanted to give the paint texture, but due to the nature of my paint splats they have to overlap with one another to look good. Of course this means if I want to use materials I can’t because the Z fighting would be very obvious and would look terrible.
With Materials:
(its kind of hard to see but in game it looks terrible)
Up until now I settled with smoothplastic as it has no texture detail and therefore there is no z fighting. I then remembered how Unreal Engine has World Aligned Textures and was wondering on how I could recreate that effect using the Texture object in ROBLOX and its StudOffset U and V properties. However, I am very lost on how to approach this.
(Go to WorldAlignedTexture near the bottom)
(You can see where they overlap here but that is because the image has transparency - you get the idea I hope)
Basically, I want to be able to take the position and size of a part into account and use them to create an offset that means the origin point that the textures would “start” from would be at world 0, 0, 0, meaning no matter where they are they would line up perfectly with one another. I don’t care too much about rotation as I wont be using the Y component (relative to the flat face), in other words none of this:
I attempted this myself but it did not work the way I wanted it too, and I also couldn’t figure out how to accommodate for size.
TL;DR: I want to be able to make the texture object line up with the world’s origin so that the textures of any overlapping parts line up perfectly seamless, regardless of size or position. I don’t really mind about rotation since it’s probably impossible with what tools we have.
Is there any way I can do this?