Aight, I'm following up on two recent posts: replacing arrays with geometry nodes, and the idea of a vector being not just a location, but a direction.

So, let's say we're making a circular array, we'll usually want the duplicates to be rotated as well. How do we do that?

Pictured, we have a simple circular array, but those cubes are all turned the same way.

1/?

Follow

This is where geometry nodes start to get a little more complicated. The round cyan connectors we've used so far pass geometry forward along the pipeline, but here we need to use the purple diamond connectors, which are called Fields. Fields are computed for each element individually, and can take complex input.

We're not doing anything super complex today. In the pic, we're using an Align Euler to Vector node, which aligns an axis to a given point. What point? Their position!

· · Web · 1 · 2 · 4

We're telling the node to align each instanced cube's Y-axis to its own position. Why does this work? Because that "position" is an arrow pointing away from the origin point... so we're actually telling the node to point our cubes away from the origin.

Here, I've made that a little more explicit with some very unsubtle models.

For a little extra credit, we can further tweak the rotation with the vector math node. By inserting it after the Align Euler to Vector, we can adjust the rotation coming out. Here, I've added a little extra rotation along each object's X axis. so they're now pointing up and out, while the animation shows what happens when we animate that property.

Caution: nodes don't pass rotation to each other in degrees of arc (i.e., 360 degrees), but rather in radians, where a full rotation is 2 Pi.

Sign in to participate in the conversation
Mastodon.ART

Mastodon.ART — Your friendly creative home on the Fediverse! Interact with friends and discover new ones, all on a platform that is community-owned and ad-free. Admin: @Curator. Currently active moderators: @ScribbleAddict, @TapiocaPearl, @Otherbuttons, @Eyeling, @ljwrites