Rotating texture with Mapping node problem (bug?)

Hi All,

I have a small problem trying to do a simple “box mapping”. I’m using a really simple scene to show the problem:

If I use a Mapping Node and I only change the Scale or the Position it all works OK, but if I decide to rotate the map around Z 90 degrees (to change the direction of the texture in the top face), the texture stretches in X and Y.



I think rotating the texture around Z should “project” the X and Y faces accordingly, not the way is doing it right now.

I’m not sure if this is a bug or just the way this is intended to work… Wanted to make sure before reporting to the bug tracker.

Good question. I don’t know.

I ran into this same issue with the new mapping node last night. My particular problem was solved by pressing “Texture” button at the top instead of using the default “Point” setting.

Edit: After a closer look at your setup, you migh have a lot more control by UV unwrapping your object, then just adjusting it exactly where you want it.

You are rotating the texture around the object’s texture coordintates, not the world texture coordinates. check your axes in local mode, are they aligned with the world axes?

Edit: that is probably not the problem. If you are box mapping, by rotating an axis in the mapping node you are not rotating a single face you are rotating the entire box projector. Thus this is normal and expected behavior.

If you want control over individual faces use UV mapping as see360 suggests.

Will simply rotating your original image texture by 90 in photoshop/gimp work for your purposes?

or;

Before the current implementation within the texture node, the mango production team built a node group to do box mapping. See here:

http://mango.blender.org/production/blended_box/

My modified version of their blend file is here:

http://www.pasteall.org/blend/25070

All I have done is add individual mapping nodes to each of the textures feeding the top/front/side colour to get individual control over rotation, and pull the bsdf out of the node group to just have a colour output you can use in more complex materials.

Only one rotation input channel should be changed in each mapping node, the others left as 0.