Mapping wood textures by layer

I’m trying to apply a wood texture to the components in my model by layer.
In my model I have timbers that are in all three of the main orientations: X,Y,Z
For the timbers that are in the X direction the mapping works well. For those I have used a material with the default WCS/OCS (box style) mapping.
For the timbers that are in the vertical Z direction, I just created a duplicate of the X material, and rotated it, keeping the WCS/OCS (box style) mapping, and that works great for those…
The problem comes in when trying to apply the texture to the parts that are in the Y direction. With the WCS/OCS (box style) mapping I can’t get the grain to run in the right direction on the most important faces. I fiddled around with the mapping channels a bit, and created a new material for the Y timber that uses a mapping channel instead of the WCS/OCS (box style). With this method I was able to get the grain orientated correctly on some of the faces, but not all of them…
Anyone have any ideas how to set the mapping for the Y orientated timbers, that will apply them correctly by layer?
It’s almost like the rotation tool, for the mapping, on the box style could do with having rotation in another direction as well…
Or what would be really handy is if the wood grain mapped to the length of a part no matter it’s orientation.
Cheers!

Wood texture.3dm (702.8 KB)

Hi @Zander ,

Here’s how I’d fix the mapping…

5 Likes

Hi Brian, thanks for taking the time to make this very nice video.
I am aware of how to change the mapping on particular objects. I guess what I was wondering was if there was a way to change it permanently for that material & layer, so that any object I put on that layer adopts that mapping.
The timbers in my model are actually being generated by a grasshopper script, and what I was hoping was that depending on the layer that the objects are output to, it gets the correct texture applied to it. Parameters in the grasshopper script could be changed many times, and the objects in the model replaced over and over, and to then have to go back and correct the mapping for certain objects every time is a bit tedious.
Is there not a way to create a new mapping channel that will orientate it correctly, that can be permanently applied to that material and layer? But it seems like the mapping channel doesn’t really affect the rotation of the texture?
Cheers

Hi @Zander ,

I don’t know what your GH def looks like but in a quick mock up I can get this looking like you want by flipping the direction on the profile polycrv. I duped the edges from your model so I’m guessing this would work in your GH file too.

I believe the Human plugin for GH also has some texture mapping tools but I haven’t played with them myself.

Hey, yes I wondered whether there was something I could do in Grasshopper to fix it.
I replicated your script above, and it doesn’t work for me? That’s flipping the profile curve on the end of the timber and then extruding it… but no matter which of the three materials I apply to it, the grain does not go in the right direction. Could it be another setting in my model?



I’ll take a look at the Human plugin.

Thanks!

Rhino 9 grasshopper has new texture tools

Post a 3dm and GH file or just the GH, if you’re sure the materials are the same as in your previously posted 3dm and I’ll take a look. If I could rotate the box mapping orientation applied to the objects in GH itself, I think it would also solve the issue. Maybe Human allows that.

Some yes, but we still need object UV controls. I’m told it’s on the list :slight_smile:

1 Like

Looks like the Human plugin is no longer compatible with the newer versions of Rhino, and is not being developed any more?

Rhino 9!? When’s that coming out? :slight_smile:

Here is the Grasshopper script where I’ve tried to replicate the way you flipped the curve, and the Rhino model that has the materials in it.

Probably just something really simple that I’m doing wrong

Thanks

Flip curve.gh (4.5 KB)
Materials.3dm (533.6 KB)

I was able to install the Human plugin in Rhino 8’s GH using the PackageManager command. However, I don’t think it has the ability to do what I wanted after all.

I found another way though using OCS mapping set up after you bake out all the Y timbers and done on all of those objects in unison. Maybe this will be an alternate solution.

Rhino 9 is years out but once the devs start working on any UV tools in GH, I’ll be testing and providing feedback. Personally, I’d like full node based editing in GH for UVs, materials, environments and render settings. There is some stuff now for materials in the v9 WIP available on Rhino - Downloads in the Rhino menu of GH. As more gets added, it’ll land in the WIP too but I don’t know when this area will be worked on.

I hope that helps.

2 Likes

Hey Brian

Yes that’s definitely an easier way to fix it. Thanks!

I guess in an ideal world the rotation for the mapping in the texture would have the ability to rotate in all three axis? Something like this:

And even better, for the style of mapping there would be an option to set the texture to run the length or width of the objects. This would mean you don’t have to have different materials and layers for objects that ore in different orientations.

Cheers

1 Like

My hope, when we can control UVs in GH would be to use a simple bounding box analysis and then orient a mapping widget based on the vector of the longest dimension.

FYI @AndyPayne @kike

1 Like