Odd Displacement behaviour when creating dunes

(Project file: https://mega.nz/file/ESpXABRI#f49-ZcxvAqs7kwlAJDjMu2Q5kBURA5HpwAiX4GsWiIg)

(Gallery: https://imgur.com/a/L3B2bef)

Recently I’ve been working on a method for creating sand dunes.

The final result achieves the look that I want, but as I have gone over my work; I’ve found the method to be problematic when I try and change the direction of the dunes.

(see galley image 2)

In the project file I’ve duplicated my setup; with the above having the gradient facing another direction.

(see galley image 3)

As you will see, the dunes do not look the same; instead there is an odd bump/lip on their edge.

(see galley image 1)

The gradient and displacement face roughly the same direction in the original; and I’ve kept the same difference in the above.

I’am perplexed as to why this is happening; if you guys could take a look and figure out the solution/answer I’d greatly appreciate it.

(Update: thanks to HYLK for helping me realise & solve the issue :+1: )

Hey, this is because the displacement device has to perform some sort of edge handling. I explain it in this video.

Right now there is no “true” solution to this problem, however, you can use a mask to prevent displacement of the edges to prevent edge artefacts.

I hope this helps!

I think I have miscommunicated the issue; I’m not so much talking about the edges of the extent, but the ends of the dunes themselves (just before they drop off).

I’ve rewritten the post to hopefully make it a bit clearer.

If I however am misunderstanding you, please clarify if you can.

(edit: I discovered via using a displacement device at the end that the effect can be reproduced by mirroring; I tried mirroring the angle of the displacement [e.g. grad=74 degrees/dis=56 -> 236], but that didn’t work, any thoughts?)

(edit 2: see update)

Ah I see, that has nothing to do with the edge handling indeed.

I think the issue has nothing to do with the displacement device, but is caused by the gradient device instead. Because you use a discontinuous gradient, the Curves device creates some sharp edges. At certain angles, these edges are more pronounced than others, causing the effect. I suggest increasing the blur’s distance parameter’s value.

After adding a two pixel blur:

1 Like