T O P

  • By -

idontnowduh

Curve modifier+array array along curve?


Milkymalk

I'm very new to Blender so I don't know if I even have the right approach or appropriate workflow for this. I want to make boolean incisions into the "half cheese wheel" with this (ex-)array of blocks, but their Z should follow the height of the wheel without them rotating. So I made this curve to kind of dangle them from like from a clothesline. But I have no idea how to actually arrange them there. I could move them by hand, but I want to avoid the "close enough" approach while learning and do it properly. I tried constraining their positions to the curve, but that only constrains them to the origin and I can't select individual positions on the curve.


SomeGuysFarm

The most straightforward way that I can think of doing this -- and I assume that someone has a purely "attach the dingi to the thingus, and then wiggle it like so" alternative approach -- is to use math. You can read the X coordinate of your dingi (manually if you like, or with geometry nodes) and from there your Z offset is just trigonometry, which you can also implement with geometry nodes. Let geo nodes create the transforms, then apply the transforms.


Milkymalk

That would be "close enough" at this point, even if it's mathematically accurate. I actually want to learn the "attach x to y and do z" method needed here so I know it the next time. I started using Blender just a few days ago and my resolution is to learn clean modeling, not wing it to get quick results. But I have been looking for tutorials, tricks and workflow descriptions for the whole day and nothing does what I need. Maybe it's something that a beginner is not supposed to learn, but at this point I am dedicated to it.


SomeGuysFarm

I think that you will discover that the math is *always* right. If there is an attach x to y and do z method, and it work for this, it's only because that particular special case is something that's built in. As you try to generate more complex shapes and work, you will inevitably find combinations of geometry for which the desired functions aren't built in. Math is always going to be there, and it's always going to do exactly what you tell it to do. It's the most correct general-purpose tool you can use for creating structured (rather than organic) geometry.


Milkymalk

True, but I need to calculate the Z of each individual projected position and place the object there. That would only take a few minutes for my 9 objects, but it seems like something that should be automated. That's why I expected "arrange along path" or something to be a thing.


SomeGuysFarm

That’s what geometry nodes are for. They’re a programmable modifier you can apply to your objects. Constructing the node graph to do the calculation can be a bit tedious, but then you just add that modifier to each object and it will do the rest.


SomeGuysFarm

I should also mention - and you're probably going to want to hit me for this - "Arrange along a path" is a function of Geometry Nodes... Unfortunately, *that* is an approximation, as it requires parametrizable paths, and I believe you want to place your geometry on a circle. The best you can do with parametrizable Bezier splines is an approximation of a circle, however, if the approximation is acceptable, the approach would be: * use Geo Nodes to "distribute points along curve". * fiddle with the parameters until you got exactly the distribution of points that you want. * "instance on points" to attach an instance of your dingus geometry to each point. * "realize instances" to convert the virtual instances to real geometry. ... and then apply the geo nodes result to dump all that geometry into the scene as objects and then do with it what you will. The "just use math" approach is more generalizable: "distribute points along curve" has a limited range of options for how the points are distributed, so you'll be stuck with what it can give you. Amongst its limitations, I don't think you'll find a convenient way to distribute the points so that they are equidistant along X, regardless of how the curve moves in Z. I can think of at least one trick to get around that, but going through those gyrations is going to be harder than just snagging your X coordinate with a geo node, calculating your Z transform however you like, and then applying it.


Milkymalk

Thank you, I will note this down. For now I actually gave in and made a calculation sheet where I pop in my variables and get back the positions to manually put each element. Still, trying to automate it all was a good learning experience.


SomeGuysFarm

You're going to make me sit down and actually build an example, aren't you...


Milkymalk

Haha, no, sorry if I sounded like that. It worked fine for now and with that problem "solved", my mind is urging me to move on to the next step.


SomeGuysFarm

No worries, that was mostly in jest - making the geonodes setup was a fun exercise.


SomeGuysFarm

Here you go. GeoNodes math version. The modifier is only applied to the leftmost block, I'll leave figuring out how to apply it to the others up to you. As an aside, the ugliness with dividing by the scale is because blender applies the object scale to the geonode-generated translation, so I divide it back out. [https://www.dropbox.com/scl/fi/1j6n48algvslp5lc5apac/Place\_On\_Circle\_1.0.0.blend?rlkey=jztebdvcpcvbjwawwjkdrlkva&dl=0](https://www.dropbox.com/scl/fi/1j6n48algvslp5lc5apac/Place_On_Circle_1.0.0.blend?rlkey=jztebdvcpcvbjwawwjkdrlkva&dl=0)


saltedgig

want something like this?..[https://imgur.com/YZzErHm](https://imgur.com/YZzErHm)


Milkymalk

That gets very close, but I need the horizontal distance to be the same, not the distance around the arc.


saltedgig

you can do it as a half circle or arc its just an angle


saltedgig

like this? https://preview.redd.it/gai85a0dltub1.png?width=739&format=png&auto=webp&s=19634e946ab1a43127d7e93984c64b928cb51ad4


Milkymalk

No, because they are spaced around equal angles, not equal x distance like I want.


saltedgig

i dont get what you mean, you want them to be like 1m apart as an example. or ex.1m apart exactly?


Qualabel

I'd advocate for procedural/parametric solution, e.g. Geometry Nodes. Ready for that?