Search Results
7/10/2025, 11:01:25 AM
Had an incredible breakthrough tonight. I finally figured out a smart way to clump curves together. I was DYING trying to figure this out for WEEKS. All of my ideas involved rotations. First I would align the points, and then rotate them to fit the direction of the curve. I tried a dozen different variations, and they all failed due to one thing: gimbal lock. No matter how sophisticated the rotation method was, I just couldn't beat gimbal lock. Eventually, I had to face the harsh truth: That no matter what quaternion support blender nodes *claims* to have, the output will always end up in standard euler, not quaternion. Therefore, I will always encounter lock. I had to find another way.
So I finally put my mind to it, and realized there was a simple solution all along: Lerping. All I really had to do, was get the starting tangent, normal and cross product for each guide curve. Project the root points to each, dot product, and that gives me the relative distances of the root points to the guide curves. And then for each point of the curve, offset by those distances. And voila! Perfectly clumped curves. They don't gimbal lock, because they're not rotation based.
There is one problem however. I made it so that the normals of the clustered curves, rotate in such a way, that the mesh faces perpendicular to the guide curves. I did this because the mesh is flat, and so if they're all facing one way, then when you look side-on, the clump seems to disappear. So by making them perpendicular to the guide, it mitigates how much you can see though. That much works perfectly, the problem however, is if I try to mix between the regular normals and the perpendicular normals. It creates twists in a few of the strands. Not 100% sure why, but I think it's because parts of the strands are mixing "over", and other parts are mixing "under", so to speak. And the twist is point where it changes from over to under, or under to over.
Anyway, I'm happy.
So I finally put my mind to it, and realized there was a simple solution all along: Lerping. All I really had to do, was get the starting tangent, normal and cross product for each guide curve. Project the root points to each, dot product, and that gives me the relative distances of the root points to the guide curves. And then for each point of the curve, offset by those distances. And voila! Perfectly clumped curves. They don't gimbal lock, because they're not rotation based.
There is one problem however. I made it so that the normals of the clustered curves, rotate in such a way, that the mesh faces perpendicular to the guide curves. I did this because the mesh is flat, and so if they're all facing one way, then when you look side-on, the clump seems to disappear. So by making them perpendicular to the guide, it mitigates how much you can see though. That much works perfectly, the problem however, is if I try to mix between the regular normals and the perpendicular normals. It creates twists in a few of the strands. Not 100% sure why, but I think it's because parts of the strands are mixing "over", and other parts are mixing "under", so to speak. And the twist is point where it changes from over to under, or under to over.
Anyway, I'm happy.
Page 1