I have this scene in where the trees are falling down in a radial fashion:
How can the Z-axis of the trees to be aligned so that the trees would fall like so:
.Blend file:
NOTE: The falling trees spreading is animated by using scene time
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.
Sign up to join this communityI have this scene in where the trees are falling down in a radial fashion:
How can the Z-axis of the trees to be aligned so that the trees would fall like so:
.Blend file:
NOTE: The falling trees spreading is animated by using scene time
You could subtract their positions from the central cylinder, align them to that vector, and take the Z value from that alignment. Object Info should be in Relative mode:
Because you're using a grid for base distribution, that creates "river"s of blank space though, maybe you'd like to scramble their initial positions first? If that's something you'd like to get rid of, obviously.
Update: Noticed that one part of the circle was pointing the opposite way with my setup. That's because of your proximity object's Z position not being $0$. Resetting its position gets rid of it, but if it's, say, a spaceship landing in a forest it'll have to have a Z height so to permanently solve the problem, you can "flatten" the subtraction vector (by multiplying its Z value with $0$):
The difference to other solutions: With this variant, you also get a soft curve (controllable with the
Float Curve
node) when the trees fall, and the angle can be limited to a certain range!
If you use Geometry Proximity
to calculate the distance, you have the following options:
First scale a duplicate of your cylinder on the X and Y axis to a very small value. This is the object you use for Geometry Proximity
because if you used the original object, the trees inside the object would fall inward instead of outward.
Calculate the direction of a tree to the center with the node Substract
(vector). Scale this value in one direction or the other, depending on where you want the trees to fall. The cross product of this direction and the up-vector is then your axis, for your rotation.
As angle for this rotation you use the value Distance you got from the Geometry Proximity
node. Depending on how you change this value, you can achieve a smooth falling of the trees (in this example I used the Float Curve
node for this).
Instead of feeding the Align Euler to Vector
node with the angle, use Rotate Euler
instead, because this gives you the possibility to control the rotation optimally! In addition, you have the option here to include a previously created rotation of the objects.
You then only need to pass the resulting value directly as a rotation when instantiating the objects with the node Instance on Points
.
This example shows the change in the radius of action as a function of the timeline:
And this example shows the result when the cylinder is approached:
Here is an overview of the node group:
I also took the liberty of making a few changes to the node groups in your file:
Geometry Proximity
during instantiation. This will give you a unique rotation for each instance.The advantage of this restructuring is that it is not only more flexible and clearer, but also runs more performant and you can achieve more than a doubling of the frame rate (5fps with your variant, and 12fps with my solution).
Here is the blend file: