5

I've created a geometry node setup where instanced objects act as proximity objects used to displace a ground. Whenever the proximity objects are close together, there is a glaring edge between both objects. Is there any way to fix this issue?

enter image description here

MrChurch2005
  • 129
  • 6
  • if you don't show us your setup...we can only guess...so pls provide a blend file (you can delete everything except the problem, if you want) – Chris Oct 23 '22 at 17:58
  • 1
    @Chris ... even original version seems to me clear - anytime proximity meets another proximity generates edge ... but I didn't find any other option to smooth it than multiply noise, that hides the issue than solves it :) I'm looking forward for solution. – vklidu Oct 23 '22 at 19:22
  • I think the solution for this is to find a way to apply a smooth minimum function to the distance field – Gorgious Oct 23 '22 at 20:28
  • My bad. I was going to use a different screenshot but decided to use a matcap to make the issue more apparent. – MrChurch2005 Oct 24 '22 at 00:21
  • @vklidu you removed your screenshot and now there's another close vote – Markus von Broady Oct 24 '22 at 09:45
  • 1
    @MarkusvonBroady ... sorry ... I wrote already - issue is described enough from my opinion and also marked in screen ... author also attached blend, so I don't think anyone can complain here. I don't know why people continue vote for more details. – vklidu Oct 24 '22 at 10:23

2 Answers2

6

Here is some way ...

Smooth > Factor 0-1

enter image description here

Node Tree

enter image description here

Node Group - Smooth ... original article with detailed info ... enter image description here


For stronger effect or dense topology you can just add more iterations ... or if someone smarter knows how to multiply the effect without crazy iteration - don't hesitate to fix the answer :)

Smooth Modifier

Much easier would be just output vertex group from GN and add Smooth modifier, but there is not straight-forward way ... devs opinion.

But thanks to Markus von Broady you can use his hard-work :)

enter image description here

vklidu
  • 36,165
  • 1
  • 61
  • 135
4

Using a technique I learned from vklidu here:

Coral reef - How to blend scattered instances

You can connect each point to nearby points (rather than connecting each point to all other points).

This already enables you to do some interesting stuff, for example once you find the nearest point, you can lerp between that point and self a little (let's say 99% nearest point, 1% self), and from there look for the nearest edge of that vklidu's geometry; now a rather straight-forward setup will allow you to use a Switch to access the other vertex of this edge, and now you can use Vector Math: Distance to decide on weights for an interpolation of your choice. This would smooth creases between two points, but not corners between 3 and more points (intersections of creases).

However, you can take this vklidu geometry, subdivide that 1-3 times with a simple subdivision (this will alter falloff) and then with Catmull-Clark:

Unfortunately [or maybe it could be useful] it still produces creases, but this time going from peaks to valleys:

You can raycast a new grid on top of that, to produce your own topology, and you can Catmull-Clark it to maybe try to remove those new creases:

Perhaps you could move a step further and base the displace on a formula involving both the distance to the nearest point and the raycasted depth…

Markus von Broady
  • 36,563
  • 3
  • 30
  • 99