4
$\begingroup$

I have this 2D image of a network I created:

enter image description here

I'd like to convert this to 3D using geo nodes, such that the circles are spheres, and the lines are thin cylinders. I want to do this such that I have one parameter that I can turn up to increase the number of triangles like so:

Knob at 1:

enter image description here

Knob at 2:

enter image description here

Knob at 3:

enter image description here

And so on.

What I've tried so far has failed. First I made a triangle object by deleting one of the vertices of a square and selecting all then F (to fill in a face).

enter image description here

Then, I added point instances of spheres to that:

enter image description here

enter image description here

When I tried subdividing however, I did not get the exact same shape I drew:

enter image description here

enter image description here

$\endgroup$

2 Answers 2

9
$\begingroup$

easiest way I can think of is using the Grid Node, it's perfect for this...

node setup

the blend

$\endgroup$
4
  • $\begingroup$ Wow! I could not be more impressed! Thank you thank you thank you. My one question is: are these lines connecting the spheres not a mesh? I'm curious how I could make them cylinders / a mesh so that I can add a material to them. $\endgroup$
    – Hmm
    Apr 12, 2022 at 5:20
  • 1
    $\begingroup$ you're welcome Hmm, thank you for the nice question..! you would need to convert those curves to mesh using a profile curve to be visible in render... just updated the blend $\endgroup$
    – alambre
    Apr 12, 2022 at 5:29
  • $\begingroup$ Yay! Exactly what I wanted. Thank you so much again that was very kind of you. $\endgroup$
    – Hmm
    Apr 12, 2022 at 5:42
  • $\begingroup$ didn't explain it but it's really simple, you use the grid node, rotate it 45º and delete the top part, then place sphere instances to vertices... for segments you convert grid to curve and back to mesh... the 'map range' node is used to scale components, didn't do the math, those are just approximated values and depends on the max level you need $\endgroup$
    – alambre
    Apr 12, 2022 at 18:54
2
$\begingroup$

I know that there's already a checked answer for this question but in case you want to try out another method to create the network, here's a hardcore way of achieving the network :)

You can, ideally, have two points at the starting (or 1st position of your network) that you can use to instance the first two curve lines of your network. Since these lines are instances, you can take their indexes and use the Modulo math function to a mask so that you can tell Blender to rotate the lines in 2 opposite directions. It'd look something like this. enter image description here

Now, we need to repeat this step for every iteration (or knob) for the network to keep expanding. For this to work, you'd need to be able to select only the last points of every iteration (or knob). Since you're using curve lines from the beginning, you can take advantage of the Endpoint Selection node with Capture Attribute to achieve this.

enter image description here

These "last points" can be re-used for instancing the UV spheres later on. Our node setup at this point would look something like this. enter image description here

Once you're done with the 1st iteration (or knob) of your network, you can group all the nodes together and start passing out the needed outputs to keep repeat the process over and over again.

With 8 iterations: enter image description here

You can keep doing this until you're satisfied with the result. Here the full node setup: enter image description here

enter image description here

For this method, there are a couple of things that are worth to be noted:

Advantage points:

Lines length: You can adjust the lines (thus increasing the overall size of the network) and still be able to keep all the lines and spheres correctly connected. enter image description here

Angle: The spreading angles can be freely adjusted. enter image description here

Disadvantage points:

Peformance-wise: the more iterations you have, the more time it'd take to process things.

Time-consuming: Passing each output through node groups one by one takes quite some time.

Here's the blend file in case you want to take a look later. Extra reminder, it's recommendable you're using Blender 3.2+ since there are some nodes that aren't available in the 3.2 or below version.

$\endgroup$
2
  • $\begingroup$ oh that's some heroic work right there :)) $\endgroup$ Apr 12, 2022 at 8:13
  • $\begingroup$ nice work, but some loop nodes would really help here... also this answer seems less specific in the sense it would work for other shapes too $\endgroup$
    – alambre
    Apr 12, 2022 at 18:58

You must log in to answer this question.

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