Method to make Texture Coordinate "Generated" to look the same as "UV"

Hi guys
Today I am writing this post to ask you a simple (?) question
that I thought I could solve it myself easily but at the end that I couldn’t solve it…

Here I have a simple cylinder mesh

Please notice the upper loop and bottom loop’s size are different
(When they are having the same size, the problem that I will describe below will not happen, but I need this shape, not equal up and bottom size)

and now I show you my material shader set-up

This is not a very complicated shader set-up and I like this material so much… but I want this material to be set in Generated instead of UV in “Texture Coordinate”
The reason is because, I want it to keep it’s texture not distorted and enlarge and expands correctly when I scale it up or down. (With UV, it doesn’t enlarge but stretches and distorts it)

so I’ve changed the texture coordinate’s UV to Generated and I show you how it looks

The texture looks broken… Well, I thought it could be easily solvable by playing with the mapping’s rotation but no matter the rotation value I give
It doesn’t look the same or similar as when I’ve set the texture coordinate to UV. (Well, the look that I want it to have is to have the black rectangles from up and down, the one you can see in my 2nd picture with texture coordinate set to UV)

In most cases like these, I used to play with Mapping’s rotation
and the problem were solved (with cubes or plane) but with cylinder,
especially when cylinder’s top and bottom loops size are different I couldn’t solve this problem…

So I want to ask to Blender Shader and Material Experts

  1. Is there a way or trick to make the texture to look the same as when the texture coordinate is set to UV and Generated ?

  2. Is there a way to make the texture to expand without stretching and distortion even when the texture coordinate is set something else than Generated ? (This can surely solve my problem too)

Thank you in advance for helping me and I attach my example blender file with the object and material shown in the screen shot

generated to look as UV.blend (538.8 KB)

So turn “Correct Face Attributes” on in the Options dropdown in the header in Edit Mode, now your UVs will behave like you want

1 Like

Thank you for the quick reply!!
I wasn’t aware of this option! Thank you for letting me know this
but I think it doesn’t look the same as when the texture coordinate is set to Generated


This is the screenshot taken with “Correct Face Attribute” ticked
but as you can see the rectangle shape is there but the scale of rectangle is reduced (or, the size is reduced and density is increased)
What I want it to be is to keep the size but expand the texture infinitely following the size of the object in edit mode (like in generated)

Please notice the difference between this original with the one scaled up with “Correct Face Attribute”

I also tried the “Keep Connected” as well but this also modified the texture’s look


as you can see the rectangle are having square look when they come closer to top loop T_T

so, this correct face attribute method is a great method but it can’t solve my current problem > . <

==update==

I see, your method surely works when the object is plane or square.
I just tried to scale up a plane with checker texture with texture coordinate set to UV with “Correct Face Attribute”
and yes, it behaves 100% same as when it’s connected to Generated

but it’s not working for my object in question (Cylinder with different top bottom loop size)

Please notice when you scale up a plane with checker texture
with texture coordinate set to Generated
or with texture coordinate set to UV but with “Correct Face Attribute”
the size of checker will not be changed right ? but it expands, the checker square’s count increases

The same should be applied to my object, the texture should stay and expand but as you can see with this method the texture is getting small as the object’s scale increases in edit mode.

The ‘Generated’ coordinate system is just the normalized object space. (the bounding box of the object, where the 3 axis, X, Y and Z, are scaled and moved to the interval between 0 and 1.
Contrary to the UVMap, which is a 2D coordinate system, the ‘Generated’ is a 3D coordinate system; and both are completly different.
The only way to make the ‘Generated’ look like an UVMap, is if the UVMap is a Top-Down projection. And that’s because image textures only use the XY coordinates for mapping (except if you using cube-projection).

In your case, a good UVMap should be more than enough. You can then scale and translate the UV coordinates, to control the size and tiling of your texture.

And a short note about streching and distortion… Whenever the surface of your object cannot be fully mapped into a unwrapped plane, there will be streching and distortions. And the way you can mitigate those, is to have textures that are precisely created for a specific UVMap.

3 Likes

Thank you for the clear explanation so I think I need to set my texture coordinate to UV, modify the UV map and use Joseph’s “Correct Face Attribute” setting

I want to tag both answer as solution (Since I am using the both methods suggested) but sadly it seems like I can only tag one.

Thank you for helping me guys I wish you nice days

Hopefully without adding any confusion, I’ll just mention that Generated also reacts to some modifiers (such as Simple Deform/Bend), and Object Data/Texture Space modifications. Object Coordinates does not do any of this, but is perfect to obtain real world dimensions. Applying the modifier ruins the texturing, but its something I use from time to time, but sadly the builtin box mapping fails using it this way, so not suitable to “bend wood” and simply use box mapping.

1 Like

Thank you for letting me know this!