9
$\begingroup$

I'm trying to recreate the surface of a coral reef, and I would like to experiment a little with geometry nodes.

My result so far, I just do a Distribute points on face, and Instance on points.

enter image description here

My main issue is that I want to preserve the green area of an instance, and cut/merge in the red area, so it doesn't obstruct the green area of the instances. But I didn't found a workaround to do it.

Any tips?

Source file

Best regards, Samih.

$\endgroup$
9
  • 1
    $\begingroup$ Very interesting question! There is definitely no simple solution here. Maybe someone (me?) has a little more time to take a closer look... Would it be possible to share your blend file in the meantime so we don't have to recreate the shape somehow? $\endgroup$
    – quellenform
    Jul 8, 2022 at 9:47
  • 1
    $\begingroup$ @quellenform I edited my question with the blend file, thanks a lot $\endgroup$ Jul 8, 2022 at 10:12
  • $\begingroup$ but you know that you can increase the distance min of the poisson disc so that it won't happen? $\endgroup$
    – Chris
    Jul 8, 2022 at 10:23
  • $\begingroup$ @Chris As I understand it, this is about the transitions (cut edges) of the individual corals. Or not? (st4.depositphotos.com/39212402/41061/i/1600/… and thumbs.dreamstime.com/z/harte-koralle-85967451.jpg) $\endgroup$
    – quellenform
    Jul 8, 2022 at 10:30
  • $\begingroup$ i have no idea.... :D $\endgroup$
    – Chris
    Jul 8, 2022 at 10:31

4 Answers 4

15
+100
$\begingroup$

Instead of deleting overlapping parts that results in heavily calculated mesh (the boolean version) ... could be more efficient to start from scratch - build base pattern structure and model coral element from cell by extrusion.

I was aiming to quellenform's reference ...

enter image description here

Here a quick test based on Voronoi pattern ...

enter image description here

The core of this pattern is based on Fill Curve node and Dual Mesh. Object border and way of points distribution can be done in many ways. Usually I would use Distribute Points on Face > Poison Disk, but here I used more even pattern from Grid + Random offset.

enter image description here

To keep just cels un-cut by object border disable Keep Boundaries in Dual Mesh node.

enter image description here

Than you can set several nodes Extrude and Scale to shape coral element ...

enter image description here enter image description here

Subdivide, Distribute Points, Shade Smooth, ...

enter image description here enter image description here

To animate egg release (mentioned in comment) you can probably easily animate last Scale node value. To randomise it probably ask a new Q (I'm not sure about good solution.

enter image description here Just don't forget to add Delete node with Top socket of Extrude node as Selection.

$\endgroup$
13
  • $\begingroup$ Very cool! I like this approach! I think this is another important step towards the solution.. Since you can select certain areas (rings) by extruding here, it may be possible to transfer the fine structure to the mesh in the process. ...just as an idea. $\endgroup$
    – quellenform
    Jul 14, 2022 at 16:58
  • $\begingroup$ @quellenform Yeah :) I like it too ... but it seems to be over my primitive skills ... it is waiting for you ... when you wouldn't be far, far a way :) Thanks $\endgroup$
    – vklidu
    Jul 14, 2022 at 19:51
  • 1
    $\begingroup$ By the way, thinking about it, I wouldn't really call what you're showing "primitive skills". In my opinion, it's a pretty decent piece of creative mastery. Just saying. Thumbs up! $\endgroup$
    – quellenform
    Jul 14, 2022 at 23:09
  • 1
    $\begingroup$ Stunning work. Perhaps some variation on this for your q. re. shaping with Float Curve ? i.e Extruding by 0 height, and then making Z some function of [distance from dual mesh before extrusion] $\endgroup$
    – Robin Betts
    Jul 19, 2022 at 18:48
  • 3
    $\begingroup$ really great work and answer, well done mate!! +1 $\endgroup$
    – Chris
    Jul 20, 2022 at 9:04
7
$\begingroup$

I just want to show you the current progress, so that you don't think I'm just talking nonsense.

Of course, this is not yet a full-fledged answer to the question, but only a small teaser.

...Please have a little patience with me, the task is a little more complex than I thought.

enter image description here

But this much I can promise: It will be 100% procedural and super flexible (I hope):

enter image description here

...yes, and the node tree will grow big

enter image description here

...and yes, even the fine structures can be created here with Geometry Nodes. I'm curious myself how this will look with a good shader.

enter image description here

$\endgroup$
1
  • $\begingroup$ Due to the low number of upvotes, I unfortunately see no reason to complete this answer, and as usual publish the blend file.... So this time these screenshots will have to suffice as inspiration. $\endgroup$
    – quellenform
    Sep 15, 2022 at 22:16
5
$\begingroup$

version Boolean

You can try create a coral without a hole and Boolean hole after distribution.

enter image description here enter image description here

Just since Boolean it would be probably calculation heavy :)

Note: Min Distance for Poison Disk distribution helps prevent overlap inner(higher) ring.

version Material-Transparent

Much lighter would be to hide those obstruct parts of mesh by assigning Transparent shader to those faces.

Before enter image description here

After enter image description here

Factor saying what faces will be transparent ...
You can use Circle object (filled with tris), scattered at the same places as Corals. For that purpose I created node Group from your node tree and duplicate it. Like that it is easier to keep scattering corals and circles synced when you change some scatter parameter.

enter image description here

Node Group (your scattering setup) enter image description here

Use Circle object as Target in Geometry Proximity node. This node assigns values (attributes) to each scattered coral's vertex depends on Circle's face distance (at Spread Sheet window you can see those values under Mesh > Face Corner).

enter image description here

These values can be translated into Black&White mask and used as factor for mixing Solid and Transparent Shader.

Plug Distance socket into Group Output node. I call it "Hole", but can be anything. Under Modifier Properties expand Output Attributes and name it this attribute (I used "Mask").

enter image description here

Switch to Shading layout. In Shader Editor add a Material and add Attribute node. Use the same attribute name used in GN (in my case "Mask"). If you plug Fac socket directly into Material Output > Surface socket you can see darker color at centre of each coral., but since this color is generated by Circle object, darker are also obstruct outer parts of coral lying in area of circles. To contrast this factor I used Math node > Greater Than

enter image description here

... but now we have transparent also whole centre of coral element. To avoid it I created a second material and assigned it to this centre part of coral that we don't want to be affected by transparency. For this simplicity and better illustration I used just bright pink color.

enter image description here

Anyway ... even you solve obstructing parts corals elements wouldn't be blended seamlessly as seen on screens). So, you should consider to start from some pattern or low res to be be able blend it in a process.

$\endgroup$
3
  • $\begingroup$ Hi, the thing is that I want to animate the center area (like eggs that pop out from holes), and I can't achieve that with mesh booleans. $\endgroup$ Jul 8, 2022 at 15:59
  • $\begingroup$ I can check that issue, but main Q still remains -Would your computer handle boolean calculation? Isn't the Material version with Alpha better choice? Also Your Q is aiming to parts inside a holes, but quellenform's reference reminds me another issue your approach cant handle -blending parts of cells out of holes. It sounds to me you should start completely from different side ... like some voronoi pattern? Probably would helpful real image of your goal. Thanks $\endgroup$
    – vklidu
    Jul 9, 2022 at 21:22
  • $\begingroup$ I'm far, far away from a computer with Blender right now, so I can't work on this wonderful question any further, but I think you're absolutely right: you'd have to approach this from a completely different angle. I was also thinking of a Voronoi pattern, and you would have to work more from the outside in towards these shapes, but the more I think about it I come to the conclusion that Geometry Nodes or Blender are not the right choice for the task at all. This is more a task for Houdini because of the complexity... $\endgroup$
    – quellenform
    Jul 9, 2022 at 21:38
5
$\begingroup$

So I decided to take part of the idea of Vklidu. But the idea with material looks viable I think.

From the voronoi pattern, I instantiate points on mesh faces, and I scale the size of instances based on face area. Also, I adjust my model a little bit to avoid overlapping.

node setup

mesh

We can still see some overlapping, but since it's outside the camera, It's okay for me.

render

It would be great to merge vertices only where instances are intersecting, so it gives a more organic look.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .