Download

World position material in all vertical directions?

Hi!
I got an idea to make world position materials for buildings’ walls, so they would be perfectly seamless no matter how poorly are the walls/meshes placed.
I managed to set it up thanks to this video…and multiplying the X and Y textures.UE4 Tutorial: World Position Materials - YouTube
The problem is, it doesn’t look good, when it’s placed on a surface with rotation of multiples of 90 and values around them.
The “neighbouring” textures are drawn as “ultra stretched” at the surface I look at…I don’t know, how to describe it better, simply, it makes ugly horisontal stripes.

I’d like to ask you, if there’s a better way to reach such result or if there’s another solution, maybe if there’s a way to lower its opacity at certain normals? (it would be visible only at angles it’s supposed to be visible, else its opacity gets lower and lower, so it doesn’t disturb the neighbouring surface)

Maybe I’m missing something but the picture doesn’t look bad, it looks like it’s working… Where’s the problem?

Alternatively, you can look into tri-planar projection.

Thank you for your reply :slight_smile:
Triplanar projection! That’s it! Thank you!

About the image, those cracks are another texture with noise mask added using lerp. I should have remove that one, I guess. It’s probably confusing.
The problem with the texture, those horisontal lines at the white texture, they’re not supposed to be there.

Ah! Very obvious indeed. I thought that was part of the look. :rolleyes:

Yes try out tri-planar, it might help!

That’s exactly what I needed, thank you!

It’s funny, how important it is to know lots of nodes, else you start achieving something in a harder and less efficient way with worse results.
So, thank you for helping me to discover this useful node.