12
$\begingroup$

What do the four buttons (texture, point, vector, and normal) at the top of the mapping node do? It by default uses point and I have never changed it. But in the answer to this question David mentioned changing it to texture (which makes intuitive sense). But technically what do these buttons do? I have always thought the mapping node is the same as using a vector > split XYZ and math nodes to manipulate the components, in fact I often do this instead of a mapping node if I want to plug some other nodes into the values.

$\endgroup$
6
$\begingroup$

The mapping node works by changing the coordinate system. This is why (when left on the default point setting) you have to put in a larger number to scale a image down. What is you are actually doing is scaling the texture coordinates up.

When set to Texture you are still changing the Coordinate system, not the texture. The only difference between Point and Texture is that for texture all the values are inverted.

Try it, when set to point a value of 2 is required to make the texture repeat 4 times.
When set to texture to get the same repeating 4 times the value must be .5.

I would highly recommend going through the cg cookie tutorial (archive) about the mapping node.

$\endgroup$
  • $\begingroup$ Thanks, that cg cookie series is amazing! But for completeness could you add explanations of the vector and normal buttons? $\endgroup$ – PGmath Dec 20 '14 at 20:37
  • $\begingroup$ @PGmath The only information I could find about the other two options Vector and Normal are these few lines. ""Vector Transform a direction vector. Normal Transform a normal vector with unit length."" I have never used either of those 2, and I could not find out much about them. $\endgroup$ – David Dec 21 '14 at 0:50
  • $\begingroup$ Strange, I will try to find some time to do some experimentation and see if I can figure out the difference. Thanks again! $\endgroup$ – PGmath Dec 21 '14 at 1:01
  • $\begingroup$ @PGmath I spent about an hour, and still can now write what those two do. $\endgroup$ – David Dec 21 '14 at 1:02
  • $\begingroup$ @David using point will make the texture fit "as many times" within the texture on a given axis. So a value of 2 will make the texture fit 2 times not 4. i.stack.imgur.com/bcxvs.png and i.stack.imgur.com/aoTtC.png $\endgroup$ – cegaton Dec 21 '15 at 3:31
5
$\begingroup$

I know this is an old question, but maybe someone still finds useful what I found. The tooltips actually explain the difference:

  • Texture: Transform a texture by inverse mapping the texture coordinate
  • Point: Transform a point
  • Vector: Transform a direction vector
  • Normal: Transform a normal vector with unit length

If you want to understand it deeper, like I did, this might not be enough for you. I looked in the Blender source code, and I found the following comments:

  • Texture: to transform a texture, the inverse transform needs to be applied to the texture coordinate
  • Point: forward transform
  • Vector: no translation for vectors
  • Normal: no translation for normals, and inverse transpose

What does all this mean? Direction and normal vectors should not be translated because they represent a direction, and normal vectors should be transformed with "inverse transpose"

At this point you might ask (as I did...): "Hey, isn't the Vector mode redundant if all it does is that it ignores my Location values?". The answer is that the calculations are faster if one knows in advance that there is no translation. A different, faster code is called inside Blender. So yes, Vector has the same result as Point with 0, 0, 0 Location, but it is calculated faster.


So how should you use this node? For texture transformations you can use either the texture or the point as David explained in his answer. If you are an advanced user and you want to transform direction or normal vectors, use the corresponding options, and don't be surprised when the Location values are ignored.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.