0
$\begingroup$

OK, so I've been using the shader editor, to scale a texture, with the texture coordinates, vector mapping, and image texture nodes. But when I look at the uv editor, the texture looks the same. It is scaled on the model, but if I export it as fbx, it looks like the texture was never scaled, even if I embed the texture. How can I export the scaled texture?

$\endgroup$
2
  • 4
    $\begingroup$ Fbx format only supports very basic textures. See: blender.stackexchange.com/questions/57531/… for a full explanation. $\endgroup$
    – John Eason
    Commented Jul 31, 2023 at 16:15
  • $\begingroup$ The UV Editor shows the image texture, and the UV map is mapped onto it from bottom left (0, 0) to top right (1, 1). Everything you do with a Mapping node in the Shader Editor is a procedural post effect manipulating how the texture is placed on the UV map (or the other way round?), it is not changing the actual UV layout. FBX does not support most of the Blender specific nodes (like Mapping), so if you want to scale the texture for export you cannot do it procedurally, you have to change the actual layout in the UV Editor so that it matches the desired result without Mapping node. $\endgroup$ Commented Aug 1, 2023 at 7:27

1 Answer 1

0
$\begingroup$

As mentioned in my comment, the FBX format does not support many of Blender's nodes, in your specific case the way you manipulate the texture with a Texture Coordinate and Mapping node is lost when exported to FBX.

Looking at the UV Editor does not show the changes from the Mapping node, because as the node setup already suggests, the Texture Coordinate node outputs the UVs which are then manipulated afterwards with the Mapping node - the changed UVs are not written back into the UV map if you know what I mean. In this way, the Mapping is a procedural effect like a Subdivision Surface modifier, which does not actually change the original underlying mesh but only the visible appearance.

Now you might want to know what you can do get the same mapping of the original UV layout when you cannot use the Mapping node. This is quite easy when you have the values of the node.

In the following example I use a texture as bump map. Let's say I scaled the UV map by a factor of 3, moved it 0.2 m on X and 0.7 m on Y. Then the mapped UVs look like the cube on the left side, and the original UVs without any Mapping node look like the cube on the right side:

uv mapped and original

In order to make the right cube look like the left one first of all make sure the Pivot in the UV Editor is set to 2D Cursor and the cursor is in the bottom left corner (should be by default), to verify this you could open the sidebar with N and under View > 2D Cursor make sure Location X and Y are both set to 0.

2d cursor as pivot

Now you have to apply the values that are set in the Mapping node to the UV map. It is important to keep the correct order: 1. scale the UVs and 2. move the UVs.

  • Select them all with A if they are not already selected. To scale them by a factor of 3, press S3Return.

    scale uv map

  • Now you can move them by the according values in X and Y direction by pressing GX0.2Return and GY0.7Return. And the result now looks exactly like the cube on the left.

    move X

    move Y

If your mapping has different Scale values for X and Y you can of course scale them separately as well like you are moving X and Y separately, as long as scaling is done before moving.

Since a UV map is 2-dimensional, the Z component is not important for these operations. However, if you also rotated the UV on the Z axis with the Mapping node, you can replicate this in the UV Editor as well (and only Z rotation, since X and Y distorts the UV in 3D space which I do not know how to achieve in 2D).

The important part is, rotating also has to use the 2D cursor as pivot and most important: it has to be done before all the other translations. So it is 1. rotate, 2. scale, 3. move. And contrary to scaling and moving where you can use the same values as in the Mapping node, for the rotation you have to use multiply the angel by -1 to get the correct result. Here in the following example the Mapping node is set to a value of 45°, so in the UV Editor you have to rotate by -45° by pressing R-45Return:

rotating uv map

Now you can go on like before scaling and then moving the UV map and the result on the right cube will again be the same as on the left cube:

rotated result

$\endgroup$
2
  • $\begingroup$ If I may ask, does your example only support scaling down, to make it smaller, or will the uv editor make more texture if I scale it up. $\endgroup$ Commented Aug 2, 2023 at 14:25
  • $\begingroup$ @Geichelb3512 I do not know what you mean by "make more texture". The texture is a single image of a fixed size in pixels. Scaling the UV (larger or smaller) only determines how often the texture fits onto the object's faces and thus how often it is repeated and/or how large or small it looks on the object. $\endgroup$ Commented Aug 2, 2023 at 17:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .