Hot answers tagged

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
  • 83.4k
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.3k
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.3k
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
  • 73.9k
11 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
  • 73.9k
10 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,029
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
  • 83.4k
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

Create a Vector with a Value Node as each value

You can use the "Combine xyz"-node, which you can find here:
Chris's user avatar
  • 54.3k
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
  • 83.4k
9 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

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
  • 73.9k
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
  • 18.8k
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,146
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
  • 73.9k
6 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
  • 73.9k
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,540
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.3k
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
  • 13.9k
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
  • 73.9k
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
  • 32.7k
5 votes
Accepted

Geometry nodes vector interpolation issue

a very easy setup would be using this:
Chris's user avatar
  • 54.3k
5 votes

How can I pixelate a procedural texture with a pixel grid that is completely static in world space?

There may be a way that suits you in shading, to pixelate the material in Camera or Window space, but.. .. forgive me if I'm missing an important point, but your whole workflow may be simpler if you ...
Robin Betts's user avatar
  • 73.9k
5 votes

How to Turn a Cube into a Mathematically Precise Sphube to the Limits of Numerical Precision Using Vector Displacement?

I can't find a parametric expression for your surface: as far as I can see the sphube described in this paper is not the same as yours? (I could be mistaken) Here's a shot at it in Geometry Nodes. The ...
Robin Betts's user avatar
  • 73.9k
5 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

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