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?
-
$\begingroup$ 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) $\endgroup$– ChrisOct 23, 2022 at 17:58
-
1$\begingroup$ @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. $\endgroup$– vkliduOct 23, 2022 at 19:22
-
$\begingroup$ I think the solution for this is to find a way to apply a smooth minimum function to the distance field $\endgroup$– GorgiousOct 23, 2022 at 20:28
-
$\begingroup$ My bad. I was going to use a different screenshot but decided to use a matcap to make the issue more apparent. $\endgroup$– MrChurch2005Oct 24, 2022 at 0:21
-
1$\begingroup$ @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. $\endgroup$– vkliduOct 24, 2022 at 10:23
2 Answers
Here is some way ...
Smooth > Factor 0-1
Node Tree
Node Group - Smooth ... original article with detailed info ...
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 :)
-
$\begingroup$ "Much easier would be just output vertex group from GN and add Smooth modifier, but that is not (and never be) possible" - I've done that… Similarly saving to UV map $\endgroup$ Oct 23, 2022 at 22:16
-
$\begingroup$ What blender version are you using? In blender 3.3.0 one of your nodes in the smoothing group is undefined. $\endgroup$ Oct 24, 2022 at 1:18
-
1$\begingroup$ @MarkusvonBroady ... I'm going to check that :) thanks ... $\endgroup$– vkliduOct 24, 2022 at 7:55
-
1$\begingroup$ @MrChurch2005 blender 3.4 sorry ... Vector Mix node is missing? You can use Color Mix node instead in lower versions. $\endgroup$– vkliduOct 24, 2022 at 7:56
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…