Skip to main content
44 votes
Accepted

TypeError: Element-wise multiplication: not supported between 'Matrix' and 'Vector'

Blender 2.8+ Matrix multiplication The question code method was in place for Blender <=2.79.9. Blender has since adjusted its mathutils module, replacing the ...
batFINGER's user avatar
  • 84.6k
17 votes

Project scene to plane in real-time

As has already been mentioned, the same techniques as used in Zoom Windows Magnification can be used here - but this is very dependent on getting the vector maths correct, which is also critically ...
Rich Sedman's user avatar
  • 44.9k
16 votes
Accepted

How can I make my procedural brick texture map correctly to both a cube and cylinder?

I think one issue with your original solution was due to lack of 'absolute' on your tests on the Normal - it's allowing for > 0.5 but not for `< -0.5'. Also, '...
Rich Sedman's user avatar
  • 44.9k
12 votes
Accepted

Camera Data "View Vector" Interpretation

The View Vector is in Camera space, but the Normal is in World space. You need to transform one of the vectors to the other space if you need to compare them. I learned this now so I mark this ...
Jackdaw's user avatar
  • 4,119
12 votes
Accepted

Radial vector displacement

The strategy in this example is to generate the displaced position Q of the shading point P (in an originally planar Object ...
Robin Betts's user avatar
  • 78k
12 votes
Accepted

How to make instances twist about a curve

Do you mean something like this? Each link's points are rotated about its local Y by a function of its local X, before being instanced on a circle, and then converted to a mesh. ... which can be ...
Robin Betts's user avatar
  • 78k
11 votes
Accepted

What happens when a vector is fed into a value slot of the add node?

🟣 Vector values convert to ⚫ scalar values by averaging all three components, therefore the following material should be white: (both branches compare as equal) ⚠ At very big values the $ε = 0$ ...
Markus von Broady's user avatar
9 votes
Accepted

Unrotate a square polygon with Python: all 3 axes

Use the edges. The bmesh module has some methods for faces to calculate the tangent vector of the face based on its edges. For example sake will use the tangent vector created from two longest non ...
batFINGER's user avatar
  • 84.6k
9 votes

Please explain logic of this transparency material nodes

This seems to be some form of crude "Wipe" effect. By using the object's local Z coordinate as input and running through the Less Than math function it basically makes an horizontal line ...
Duarte Farrajota Ramos's user avatar
9 votes
Accepted

How to obtain the vector normal to the camera plane

Local -Z axis of the camera. To get the global vector representing the camera view, it's -Z axis can multiply cam.matrix_world @ Vector((0, 0, -1)) The rotation ...
batFINGER's user avatar
  • 84.6k
9 votes
Accepted

Mathematically, what does Faceforward function mean?

I don't think there's much mystery to what the function is doing. The mystery (to me, anyway,) seems to be in the vocabulary used to describe it, and when you would want to use it? The ...
Robin Betts's user avatar
  • 78k
8 votes
Accepted

What is the Center in Vector Rotate Node

This is what is happening. The grey arrow is the vector (0,0,1) in object space. The red ball is the 'Center' of the Vector Rotate node.The green arrow is (0,0,1), Vector Rotated by 90° about the ...
Robin Betts's user avatar
  • 78k
8 votes
Accepted

How do I calculate the normals of a point group?

(Using Blender 3.6.5) Documentation: Preliminary remarks: As very well explained by Mr A in his proposal, Principal Component Analysis is a well adapted framework for this class of problems. One part ...
StefLAncien's user avatar
  • 5,117
7 votes
Accepted

How can I "bend" object coordinates?

If you can align the object with the coordinates somehow, and then change it procedurally to the final shape, you can use the Generated coordinate space: It shouldn't be too hard considering it ...
Markus von Broady's user avatar
7 votes
Accepted

How to create Shape Keys in Geometry Nodes, including support for curve handles?

Shape Keys in Geometry Nodes Here is my solution. I completely rebuilt this with a different, simpler approach. The Relative Key is now always the basis geometry. The object to put the Geometry Nodes ...
Mentalist's user avatar
  • 19.3k
6 votes
Accepted

Geometry nodes: How to distribute points on valleys only?

The valleys and flat areas where things grow can be identified by a combination of the normal and the curvature of the mesh. Geometry Nodes can distribute plants to follow this pattern. For example, ...
Ed Tate's user avatar
  • 5,196
6 votes

Geometry nodes vector interpolation issue

To escape the limitation that RGB color-components can't have values outside 0-1, you can make your own 'Mix Vector' node-group, whose output is ...
Robin Betts's user avatar
  • 78k
6 votes
Accepted

Geometry Node: Find perpendicular vector to the given vector

⚠ Beware of the traps. ❌ Taking a cross product with any other vector has a chance of taking the cross product with self. ❌ Producing another vector is tricky: rotating a vector by 90° around $x$ and ...
Markus von Broady's user avatar
6 votes

What is the Center in Vector Rotate Node

Yes, the Center is the pivot point around which the vector is rotated. That is correct. But in your example, you use a vector pointing from $(0,0,0)$ in the direction $(0,0,1)$. Then you rotate it ...
quellenform's user avatar
  • 37.8k
6 votes
Accepted

How can I find two vertex indexes per face on a mesh to create a secondary alignment vector

If you just want to stabilize them so you don't really care about which edge of the face they're on they align with, you can simply Sample Nearest edge for its ...
Kuboå's user avatar
  • 8,870
6 votes
Accepted

vertex positional difference alternative using numpy

...
Markus von Broady's user avatar
6 votes
Accepted

Why multiply a normal?

A normal is pointing outwards of a geometry perpendicular to its plane (in case of a vertex the mean of its connected edges/faces) and it has a length of 1. The Offset in the Set Position node is what ...
Gordon Brinkmann's user avatar
5 votes

Bump node doesn't produce bump from normal vector

The problem here isn’t the Bump node but how the Noise Texture is being used. With no input to the Noise Texture it will automatically assume Generated coordinates and with nothing connected to the ...
Rich Sedman's user avatar
  • 44.9k
5 votes
Accepted

Linear environment gradient

Use just the information for the Z (vertical) axis. You can place the gradient where you need it by modifying the coordinates.
susu's user avatar
  • 14.1k
5 votes
Accepted

Please explain logic of this transparency material nodes

It will help to look at the values you're operating on. If you go to Edit -> Preferences -> Add-Ons and enable Node Wrangler you gain a lot of functionality and keyboard shortcuts in the node ...
Allen Simpson's user avatar
5 votes
Accepted

Vector Displacement not showing same result as the mask of it

I can't be sure this is your problem without seeing a bit more of your shader-tree, but.. There's a difference between Generated-space and Object-space coordinates, where render-time displacement is ...
Robin Betts's user avatar
  • 78k
5 votes
Accepted

Combining vector displacement and standard black and white displacement nodes

Try this setup with a Vector Math set to Add. It should work for you.
Christopher Bennett's user avatar
5 votes
Accepted

What does ''Axis'' input of Vector Rotate node do?

This question on Stack Overflow has an accepted answer that discusses the mathematics of rotation around an axis other than one of the three coordinate axis: A product of the aforementioned matrices ...
Marty Fouts's user avatar
  • 33.3k

Only top scored, non community-wiki answers of a minimum length are eligible