Texture Stretching issue with Geo nodes and Solidify modifier

Hi community!

I am currently working on a project (archviz) where I need lots of arrays of beams in different lengths and sizes. At first, I added a plane with the correct width and height of a beam and added a solidify modifier to control the length of the beam. However, when texturing, I can’t seem to be able to apply correct UVs to all sides. It seems to be impossible to box project, its always a planar projection with stretching on 2 axes.

Next I tried setting up a simple Geo nodes setup, still giving me control over the length and even the width and height of the beams, even better! Although I still come across the same issue.


[left beam: simple geo nodes setup, right beam: solidify modifier version]

Is there a way I can still keep control over the dimensions of the beams (not applying the geo nodes tree or the solidify modifier) but have correct UVs?

Thanks for your help!

In case of Solidify version, UV editing only affects the base mesh, not the end result of the modifier. So your box projection ends up being applied to a plane. Using geonodes, you have to look for ways to generate your own UVs

Maybe use Geometry Nodes after Solidify? Solidify can be set up to mark the rim polygons with different material IDs. Then you can read the material ID attribute in geonodes, and program some sort of UV correction only for those newly generated polygons. I think. Havent tried it myself

I did a test (tried to isolate polygons by material ID and then do some operation on them) and it turned out that in order to “mark” material IDs by Solidify, the object needs to contain 2 material slots. With just one, nothing works. An example:
offset by material id.blend (837.1 KB)
(It doesnt edit UVs, but I do not know what is your geonodes setup is, so no idea how to generate UVs in your case)

First of all, thanks so much for your time and the blendfile!

I’ve investigated your blend file and indeed, it does solve 1 of the 2 stretched axes by having a duplicated rim material with 90° rotated UVs. Although this works without the Geo nodes, too as I found out.

There is still the 3rd axis where stretching occurs. I don’t think it can be solved without applying modifiers at some point, which is a shame. Seems to be a limitation of blender. The only workaround I can think of is having all modifiers applied before texturing and leaving a duplicated, hidden collection without geo nodes or modifiers applied.

Or do you have any other idea?

Hello there!
you can do it like that…also

Perfect, it works! Thank you.

It’s a pleasure. :wink:
A lot of people doesn’t know this simple trick. Because of uv minded way to do things.
Long time ago, we used to use projections on volume without accessing the UV coordinates as today.
As you can notice in the texture drop down menu there is more than box projection.
And the opportunity to mix the in-between is top notch!

Yeah, I haven’t heard of that before! Thats interesting, I will play with the different options for sure!

I use this simple box mapping for pretty much everything that involves wood or beams. The thing to be aware of is that generated coords will follow some modifiers but suffer from stretching (can be countered turning off auto texture space for) - a 10m long beam will stretch more than a 4m long beam. You can’t apply those modifiers (some simple deforms i.e.).

Using object coords you don’t get stretching and box directions will be set by object coordinate gizmo. So I tend to separate out objects going in different directions and orientations. Unfortunately there is no way that I know of to rotate the box coordinates arbitrarily - set any to 90 degrees and it breaks, or use rotated external empties for object texture lookup and it will break.

One of my pet grievances. I’d like to have simple single meshed assets to work with instead of breaking them into separate parts depending on (in woods case) grain direction.