8
$\begingroup$

on my current scene I am trying to create a geometry node system that let's me distribute power poles along a street. The street is made of a curve and I can of course use that curve in combination with an array modifier to distribute my power poles and their cables along the street.

Now since the arrival 3.0 and the new geometry nodes with curve support, I was wondering if there is a smart way on how to distribute power poles or any other kind of object along a curve and additionally connect these object instances with curves/cables. Why would I want to do this? Well I was thinking about randomizing the power poles rotation, location and maybe even the scale to get a more realistic look in my scene. Having automatically connected cables between the poles would be the cherry on the ice.

Any ideas on how to approach this are welcome

$\endgroup$
5
  • 1
    $\begingroup$ Blender 3.0 is still under develoment and some things may not work as expected $\endgroup$
    – Emir
    Aug 9, 2021 at 12:04
  • 1
    $\begingroup$ @Emir I am well aware of that, but I am looking for a possible way of doing this. I am not saying that something is not working as expected. I am just asking if geometry nodes current state of design is possible of doing such things $\endgroup$ Aug 9, 2021 at 12:07
  • 2
    $\begingroup$ this might interest you: youtu.be/xt_7rtneZ6g The youtuber is in fact one of the developer of geometry nodes. But...maybe you have to wait until you can download the version in which this is in, because he often shows nodes which aren't already downloadable....except you download the latest code from github and compile it on your own. $\endgroup$
    – Chris
    Aug 9, 2021 at 12:13
  • $\begingroup$ @Chris this looks promising, thank you very much! $\endgroup$ Aug 9, 2021 at 12:32
  • $\begingroup$ You are welcome $\endgroup$
    – Chris
    Aug 9, 2021 at 12:34

1 Answer 1

29
$\begingroup$

With the current alpha, Yes.

Sort of.

Here be a curve

a curv

simpl.

distribute pole things

we resample him. then he be points of equal distance, along curv.

we convert curv to points. this lets us rotate them up, cuz otherwise they be lying down.

pole things

(then point instance as usual)

connecting them?

idk of any way to make new curv

but we don't need to! we already have a curv, lets just use him.

if you take the curv after resample, and you convert him to mesh, you get straight line between pole

straight line between pole

but there is problem. he is sleeping on ground. sad.

we bring him up by transform the profil curve

also, we can make two copy, one shift right and one shift left. then he look like power line.

look like power line

wait, is still fake

if you observ, you notice he is straight like uncook spagetti.

we want him curv like cook spaghetti.

but how we cook?

boil water

if you don't like simple straight line, we need more points to make magic. remember the curv we resample? resample him again to have more point.

now how do we transform these point? we want the point that is far away from pole to be more down.

we calculate proximity between the many point and the poles:

calculate proximity

nothing will happen, but now the proximity live inside attribute named "proximity"

we can use him to push some point down.

put spaghetti in water

now take a vector that point down

scale him by "proximity".

and add this vector to the point "position".

now points that are more far away from pole go more down

it go down

oops forgot to add salt

but he still look kind of wonky

is better to add "attribut curv map" to the proximity instead of using him direct.

make sure "attribut curv map" go from 0,0 to 1,1:

clipping values

then adjust the curv map so wire is in shape you want

tada

look we finished. we make pole with wire in attribute node!

final result

and here is final nodes in case i not explain something good.

final nodes

after Chris feedback, i find out way to reduce wonky issue

he is cause by transformed profil curv. becaus profil curv is so off-center, he is causing self-intersect geometry. completely remove the y offset from the profil curf

instead, transform result geometry by transforming it on z:

update nodes

$\endgroup$
16
  • 1
    $\begingroup$ thank you very much for that detailed explanation! Don't know why someone downvoted, but that's the kind of answer I was expecting! :) thank you very much sir! $\endgroup$ Aug 9, 2021 at 13:14
  • $\begingroup$ i tried to rebuild your solution...for me ...it did not work. If i change vector scale i get something like this: [1]: i.stack.imgur.com/hXldU.png $\endgroup$
    – Chris
    Aug 10, 2021 at 8:46
  • $\begingroup$ @Chris I got that too at one point and I'm not sure why. It's as if the points were translated along something other than the Z axis. You could try the spreadsheet viewer to figure out what's going on, but I just messed with the curve untill he look right, and it worked out. $\endgroup$ Aug 10, 2021 at 8:49
  • 1
    $\begingroup$ +1 works! thank you $\endgroup$
    – Chris
    Aug 10, 2021 at 9:26
  • 1
    $\begingroup$ @ajwood looks like this video might be more up to date (and perhaps provides a better approach?)... I'm not sure if I can find the time to convert that info into an answer right now though. $\endgroup$ Dec 7, 2021 at 10:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.