Displacement and Texture Stretching

Hello,

I am wondering if there currently is any possible solution to avoid texture stretching when using displacement?
I love the displacement effect but on flat and curved geometry where you have well defined shapes like bricks
it’s just such a pity to see this clear stretching band of the verts being pushed out without the uv’s at least
being able to adjust. This would make such a huge difference.

Valve developed something called seamless scale specifically for this case.
https://developer.valvesoftware.com/wiki/$seamless_scale
I’m just guessing UE4 currently has no such thing but can it be done?/faked or via something else?

Hey Chesire -

I will let our developer’s know of your request. I will say though your example is presenting some of the caveats that the Valve lists for this particular technic, “This is not a total solution - there are still some situations where stretching will occur (such as sudden 90° outcroppings). It’s handled as best it can be, though.” 90 deg. turns will always have a slight stretching effect as you are compressing new vertices into a very small portion of your UV space.

I will keep you up to date as I hear anything.

Thank You

Eric Ketchum

Thanks for passing the issue along Eric.

However, I was actually interested in whether it’s possible to address the current displacement texture stretching one way or another as opposed to my example being concrete evidence of things not working one way or the other.

Current displacement produces texture stretching on everything. If you keep the height fairly low with a good amount
of tesselation you are able to get away with things visually but any inspection up close will reveal less than visually pleasing results for sure.

If one looks at the iterative parallax examples (11 steps iirc) provided with the starters content, the same visual stretching appears due to the height offset but is remedied at least a bit due to the option of providing a ‘tile inset’ texture which masks the stretching.

Is something like that also possible with displacement?
Or would a shader mapping uv’s via the landscape (separate x,y.v texcoords) work?

Needless to say I’ve done a fair amount of testing on this but fail on all counts.
It just doesn’t seem possible to approach displaced geometry on the UV-level(??)
That’s why I pasted in the Valve links. It seems something is at least possible but my technical skills
require a bit of assistance perhaps :slight_smile:

Any help on this would be greatly appreciated!

The trick with the iterative Parallax examples are they are based on adjusting the pixel shader according to a transformed camera vector at each step the gradient which is mostly a 0 or 1 map is adjusted toward the camera thus giving the illusion on the final material that you have a depth setting.

The problem with enacting something similar is that the tessellation and displacement are run via the vertex shader and only interact with the vertices of the mesh the material is applied and camera relationships cannot be tricked as vertex location cannot be adjusted based on camera position in the way a pixel can.

In regards to the Valve Seamless Scale, It is not exact referring to the World Displacement as the Unreal Engine refers to it. Displacements in Hammer and Source “are brush surfaces that have been converted to a mesh of polygons that can be freely distorted and sculpted into various shapes.” In Unreal Engine terms it is closer to our Landscape or Geometry tools.

Thank You

Eric Ketchum

Thanks again Eric!

How did you even figure out how to make a material with bump/displacement work… I’ve been trying for weeks… Nothing… =/