9
$\begingroup$

I'm trying to create a row of street lights, both the lamp pole and a spot light. Since i can't simply join these two and use an array + curve modifier to set this up (using an array modifier + a curve modifier always deforms the mesh) so i came to the conclusion that working with collections and instances would be my best bet.

To get to my current result i parented the spot to the lamp mesh. Then i parented those two objects to a plane. after that i parented the plane (and so also the lamp mesh and the spot) to a curve that i converted to a mesh. I then activated Instancing for the curve with verts which resulted in something like this:

enter image description here

As you can see the lamps all face the same direction, while i want them to be rotated inwards. There's an option for 'aligning the objects to vertex normal'

enter image description here

but enabling this exposes a multitude of problems:

  • Problem 1: it turns out there's two instances of every object. (i have no idea why)
  • Problem 2: the street light meshes get deformed.

enter image description here

  • Problem 3: the actual lights all face toward the same place

(I drew over the lamp directions with blue arrows for visibility)

If anyone knows how i can get this to work i'd really appreciate it, but other techniques are welcome too.

$\endgroup$
9
+300
$\begingroup$

You almost got it. You can do it by using an array + curve modifier, you just need to use the plane as an instancer.

Select the plane, add an array modifier and set the length to "fit curve", and set your curve. Add a curve modifier, set it to your curve again. Make sure to parent the lamp post to your plane, then go to the plane's object properties and select "Faces instancing". Here you go : enter image description here

Note that this will not work well if you use a 3D curve.

How to tweak the workflow for a 3D curve :

Instead of using a simple plane for the array + curve combo, use an elongated plane in the Y axis.

enter image description here

Then after the Array and Curve modifiers, add a Weld modifier and tweak the distance until the vertices in the local X axis merge. You should now have a series of segments, with both vertices of each segment on the same XY plane. These segments follow the 2D curvature of the curve object.

enter image description here

Add a Screw modifier on the X axis, set the angle to 0°, the steps to 1 and the screw property to a small value.

enter image description here

Now enable instancing on faces.

enter image description here

$\endgroup$
15
  • $\begingroup$ Hello Gorgious; so do you have any idea how it would be possible to do it with a 3D curve in the latest versions? I was wondering if geometry nodes could solve the problem $\endgroup$
    – moonboots
    Jan 20 at 7:24
  • 1
    $\begingroup$ Haha Thanks Robin !! I sure hope there is an obvious solution we just keep missing >< $\endgroup$
    – Gorgious
    Jan 29 at 21:38
  • 1
    $\begingroup$ Looks like no takers... If there's a better way, I can't find it :) Recently, I had to go back to this answer of yours to do it at all . It seems ridiculous to have to twist yourself into a pretzel to do something so commonplace. Nonetheless, I'm very grateful for your ingenuity! And I'm sure others will be, too, until Everything Nodes or somesuch fixes it. I guess there must be an AN answer, but it should be native, really. $\endgroup$ Feb 4 at 17:11
  • 1
    $\begingroup$ great I had a big doubt ;) I wanted to make a tutorial about the different methods of duplicating along a curve, I will cite you of course $\endgroup$
    – moonboots
    Jul 12 at 16:49
  • 1
    $\begingroup$ well I think your method is pretty easy so I will stick with it ;) but yes one day I will need to learn GN $\endgroup$
    – moonboots
    Jul 12 at 18:36

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.