0
$\begingroup$

I'm learning shader nodes. An important output/data type in nodes is the 'vector'. I know vectors in two senses (that are probably mathematically related, but practically distant enough to be thought about as separate I think): as in linear algebra (a 'thing' with direction and magnitude), and as in C++, a one-dimensional matrix or 'list' of values. How should I think about 'vectors' in Blender? They seem to be used as lists of values (e.g. a tuple of X,Y coordinates for the UV output of the 'Texture coordinate' node) but also as vectors in space, like for a normal. Or is a normal vector a list of length 3 with element 0 the X, element 1 the Y and element 2 the Z coordinate of the endpoint of the 'linear algebra vector', if that vector would start at [0,0,0]?

$\endgroup$
3
  • $\begingroup$ As a data type it's just a list of values. Basically an array, but the language might provide it more features. Perhaps the way to think about it is that it could be used in any of the ways you just listed. $\endgroup$ Commented Jan 31, 2023 at 19:50
  • $\begingroup$ I see, thank you. $\endgroup$
    – Roel
    Commented Feb 1, 2023 at 9:16
  • $\begingroup$ One thing that tied me up in the shader tree is that it can be difficult to visualize the negative values you can generate. Everything just shows up as black. Absolute value or math -> add can help $\endgroup$ Commented Feb 2, 2023 at 1:12

0

You must log in to answer this question.

Browse other questions tagged .