Foliage pivot problem

Hi i’m trying to rotate leaves on foliage aorund their axis using the rotatearoundaxis node, the problem is that the pivot doesnt rotate following the mesh orientation, i need to rotate the leaves “roll” if you will on the same axis aligned to the mesh.

There is 3 axis. Which axis do you want to rotate around?

Furher, each individual leaf has its own location and axis.

Materials will normally rotate the whole object/mesh/instance and not the individual particles contained within the single mesh.

Be more specific on what you are attempting to do…

Hi thanks for the reply, i’m trying to rotate my dead leaves on the x axis, but as you can see they rotate fine been individual meshes, but when you put them in a foliage the axis keeps changing.


change the ObjectPivotPoint to use the bottom pin (Mesh Particle Pivot Location)

I fixed, it was the random yaw and align to normal of the foliage Placement settings, now i need to find a way to random rotate them after the rotate animation to make it look more natural

1 Like

So, rotate about axis is essentially additive.

If you want to rotate an item in X and then Y you have to use the output of one function as the current world position of another rotateaboutaxis node.
Calling world position node is not the updated value (because that update happens after the current tick, so its essentially the position before the change).

Secondly.
Object pivot works outside of instances - foliage is an instance (and nanite makes things worse).
You can transform 0,0,0 to local - than back to world, if all else fails.

Third, the axis on foliage painted by the brush is usually different since individual instances are given individual rotations - however, usually you have clumps of stuff merged together, not individual leafs - because performance is a thing, and the more you aggregate, the better off you are.

There are other techniques to consider for clumped meshes, such as using pivot painter, for instance.

1 Like