Shearing instances in geometry nodes

I am making a geo nodes for walls(and doors), but I am having trouble figuring out how to shear the instances. Here is my current node setup:


The delete geometry node just erases the ends. This looks like:

This makes is so I can use edges to express walls. However, if i raise a point to create a ramped wall, I get this:

It follows the rotation sometimes correctly, sometimes not. I believe this is due to my align rotation node, but what I really want is this:

Is there a way to accomplish this?

Hi Trebleclef,
you can do this with the new Matrix nodes.
Remember that the first three columns of a transformation matrix are just the direction vectors of each axis (the first three rows of the fourth column is the translation):


The lenght of these vectors define the scale in that direction. And if you offset them, you can shear it. If you want to shear it by some specific angle you can simply calculate the tangent of that angle and use that as the input. For example like so:

To combine this shear matrix with the existing transformation of your instance you have to multiply them. For example like so:

The order of multiplication is crucial when working with matrices! This setup here will first shear the instance and then apply its original transform on top of it. If you want the shearing to happen after the scale (like in Houdini for example) you have to separate the instance transform and combine the matrices together yourself.

Now if we shear it with the Y-input it will look like this:


Note that you actually have 6 shearing coefficients - not only 3 (like i did in my example). So this might not shear in the direction that you want. If you need the rest of them, just add a new input and connect them to the rows like so:

Hope that helps

7 Likes

Thank you so much, it looks like this solves what I was doing for the end caps as well, I will try to learn as much about matrices in blender, I didnt know these nodes existed.

1 Like