Another Rotate Vector example. This time, I rotate the points of a mesh around the global X axis. In short, the point positions are treated as vectors, and then rotated about the specified axis. Of course, this requires some conversion between coord systems, which is always fun 🙂
The bottom part of the tree is just for visualization.
Not sure how Rotate Vector works? Is that 26 words (including five “the”s) of documentations not doing it for you?
Fortunately, it’s not hard to rig up an ICE tree to help visualize what Rotate Vector does.
Compound is here if you want it.
In ICE, we often work with point or particle positions, and these positions are 3D Vectors.
Now, in general, a vector is something that has both value and direction (for example, any cyclist knows that the wind has both a magnitude and a direction, and together they really define the wind 🙂
When you’re working with point/particle positions, you’re really working with position vectors that specify a unique position in space. You’re not really interested in the magnitude of the vector, just the head and tail of the vector.
For any position vector, the tail is the origin: the point (0, 0, 0).
The head of the vector is the position in space.
When you’re working with position vectors in ICE, it’s important to understand what coordinate system you are working in, because that determines the origin. For example, here’s two different position vectors for the same point:
Taking a cluster of points and moving them on to a circle turned it to be easier than I thought… At first it seemed more complicated to get at the points, because sometimes the Show Values on the output of a Filter node is, let’s face it, misleading. Based on what a certain Show Values showed me, I started off using arrays instead of Filters, and that made the graph a little messier.
First, I calculate the point I want to use as the center of the circle. That gives me the first vector I need.
Subtracting the CC (circle center) vector from the PP (Point Position) vectors gives me a set of vectors that take me from the circle center to the points.
I just resize the PP-CC vectors to get point positions that fit on a circle:
Circles, spheres, and radii…
For a couple of reasons, I was playing around a bit with spherifying/circulizing this weekend:
Based on this basic idea: “every point on a sphere/circle is the same distance from the center”, I was able to rough-out a couple of ICE trees:
Creating a circle on the surface of a mesh required just a little bit of 3d vector math. Here’s a little video that goes over using vector subtraction to move a point onto a circle. I spent more time setting up the “Show Values” in my demo then I did recording the thing.
For vectors, Get Maximum in Set returns the vector with the longest length.
For example, suppose you want to find the “highest” point on a mesh. You would not use Get Maximum in Set, because that gives you the point that is furthest away from the local origin. On a T-Rex mesh, you’d get the point at the end of the tail.