Odd question I can’t seem to wrap my head around at the moment, but I have a material I want to tile, but in between the repetitions, I’d like an arbitrary amount of empty space.
Think laying out a tiled floor where the texture is just one tile, edge to edge, and instead of having the tiles laid out seamlessly, I’d be able to space them out.
What I am trying to is paint some tiles onto surfaces vs using an actual tile mesh, but I don’t necessarily need them to be side by side as a contiguous pattern. With actual meshes I’d have the BP space them out, but since this is in a material, I’m just not getting the UV maths to get this working.
Normally, when a texture is sampled, it will always find a pixel in the UV space of 0 to 1, infinity repeating (in other words, 2.3 samples the exact same pixel as 1.3, and 1045.75 samples the exact same pixel as 0.75 - only the fractional matters.)
There is not really such thing as “empty” for a wrapped sample.
What you can do is lerp between two seperate sets of texture samples with their own coordinates (ie a tile texture and a grout texture).
If you are using actual tile meshes, I don’t see why you would need this. The floor/grout could simply use a different material and each tile will have it’s own UVs, which will automatically be correct for that tiles position.
Although I generally don’t think using meshes for individual floor tiles is a good idea (even with Nanite), and especially with Lumen (as small objects get culled more quickly)
This more a stupid-UV tricks. I’ve done some simple things like warping UV’s to simulate water, etc.
This is more like you said, vs using an actual static mesh, I can paint in a tile-texture which can have some stuff like mold, cracks, etc pushed onto it in the material. It’s more that as I can currently do things, it just tiles… and I don’t want that
This effect could easily be accomplished with a spline-mesh with the meshes painting their PBR+Height into the RVT, they would just come out as bumps and shader-lookups on the singular surface that is the heightmesh. I get this, done this, but it occurs to me that if I took a texture like this:
I’d be able to paint in tiles directly as a landscape layer, skipping some of the overhead, and working closer to the RVT itself. I can already do this with a contiguous texture like broken flagstones, or using BrickAndTile UVs or the like, but I what I would really like is the arbitrary space between the tiles.
What you showed me above does the scaling and the border, but if you notice, when the border increases, it overlaps the texture, it doesn’t push/scale it to fit in between. I’d need, at whatever scaling, left to right, UVs 0 → 1, then space, then UVs 0 → 1, space, rinse/repeat.
Ultimately you’d be able to paint in tiles that pop up out of the heightmesh, with whatever spacing, staggering, etc…