Ability to mesh paint world-Z aligned textures

Currently if you try to paint a texture that is world-Z aligned, it paints the texture as if it was using the mesh’s regular UVs (so if you paint somewhere on the mesh, the painting appears somewhere else in the world).

My use-case: I was going to use a single world-aligned texture mask to paint in my rain and puddles, dirt etc across a couple of city blocks, made from modular paths/road (vertex painting just requires a lot of tessellation to give the accuracy I’m after). But I guess there would be other applications for this too.

I’m not sure what the best way would be as far as UI goes - since there is a “Is default meshpaint texture” in a texture sample, maybe there could be a “Use This UV for texture painting” underneath it, so it knows how the texture is mapped. Or I guess in the UV dropdown where you select the UV channel, you could have a “WorldZ” option, and underneath a multiplier, which you could match up to the coords you are using (not as elegant).

For now I’ll just be hyper-tessellating and manually triangulating all the ground meshes + combining with a noise texture to try and make it look like it’s nicely painted.

I don’t understand what you mean with “the painting appears somewhere else in the world”.

what would you say should be the expected behavior? Unreal has no notion about world-Z aligned textures in the context of the actor you’re painting because the world-Z aligned only exists in the material
I’m pretty sure it’s just an issue in your material

“the painting appears somewhere else in the world” is just describing what happens if you try to do what I’m asking for, which is unsupported currently.

I’m requesting support to paint a texture as it is aligned on the mesh you are painting. It can read the texture samples from the material so presumably with some code it could also read the UVs that the texture sample is using. Currently it assumes that the texture your are painting is aligned to a default, unaltered UV.

can you show your material, the world-Z aligned part?

Just plug any kind of modified UVs into a texture sample (it doesn’t have to be world UVs), apply the material to a mesh and then try to paint on that texture - it won’t paint as you expect because it doesn’t, as you say, “have any notion about the UVs”. And that is what I’m saying would be fantastic - if it DID know about the UVs on the texture you are painting, and applied the transformation as you paint (so the painting always appears where you are brushing, no matter what the UVs are).

Not only could you then paint on world-aligned textures as I described, but you could also paint on tiling wall textures for example (the painting you do is obviously going to tile too, but that could still be useful). I’ll bet some level artist at Epic has already asked about it, and I’ll bet it’s not super easy.

If applying the UV transformation as you paint causes slowdown, a checkbox or project setting can be used. If the same texture sample is used twice in a material, thats OK because the “Use This UV for texture painting” would tell it which one to get the UVs from. If they have a texture dependent fetch (texture used to modify the UVs), that might be a bit complex so that could remain unsupported.