Is there some way to do UV triplanar mapping in shader editor ?
When you use some object that have subdivision and others modifiers, you loose the UV as the object is no more the same shape.
So having a triplanar mapping node would allow to get the resulting mesh well mapped without heavy UV deformations.
I’m not sure what you mean by UV triplanar mapping. But this is what I use forregular triplanar mapping with blend control. Can’t remember who made it, but it’s much appreciated and I use it constantly.
You can also manipulate the normal with some noise in the cases where the smoothed seam become obvious. It’ll introduce some stretching of course, but sometimes I prefer that over an obvious seam. The blend size itself can also be noised up of course. Outside the node group you have to setup the three planar projections.
It’s worse using box projection instead of planar or sphere.
Some Smart UV project or triplanar node would have been welcome.
I’m suprised this does not exist in the shader nodes editor.
“Tile” is the tile factor and “TriPlanarMap” goes into Vector. The map has to be tileble.
You can Append this from here. TriPlanar.blend (53.5 KB)
And I and others just gave you several to choose from. I’m not sure about the image you’re posted, but that’s not how box mapping is supposed to be used. Image node defaults to UVs, try using a different type of texture coordinates.
I’m never happy with it because you can’t manipulate the coordinates going into it, there is no control over the blend (fixed to value), and there is no control over the blending normal to help hide the blending seam.
Granted, if you want control over how a wooden chair have its wood pieces wood grain orientented with a “single” triplanar node group, you need to control with UV location which empty you’re gonna use for coordinate input and it becomes a bit more complex. Add in seamless texture mixer, and it becomes very complex. But it can all be baked down in the end to whatever UV layout is most appropriate.
Although I can’t remember exactly what methods are in place, rendered example
of such a custom setup.
Imagine that is a wood texture with grain direction you want to control. Try orienting the grain by using 90 degrees in either of the rotation values - doesn’t work. Also, still no way to drive the blend with i.e. noise. And still no way to drive the normal lookup.
Here is the node setup I’m using to choose 4 different grain directions in a piece of furniture (1 mesh). While it uses the standard box mapping image node because I don’t need anything else for this one (complex enough already), I’m using collapsed UVs in UV space to select which empty I use to drive the box mapping. This is not triplanar mapping, just a way to get around how you can’t rotate the coordinates while an empty lookup will work just fine:
The TriPlanar or box projection is not meant for such complex things. I would do a UV projection for that. I use it to simplify things. For example grunge as box projection and then decals. To keep the textures as small as possible.
For me, it’s exactly for “such complex things”, although I don’t consider a TV cabinet made up of simple cubes very complex As I work and add things, all I need to do is make sure UV face is collapsed and put approx in the right location in UV space to orient it. No need for any real unwrap, no need to check rotations, no need to fight to keep the scales right, no stencil painting, no issues due to stretching - fully automatic except the actual node setup. When you’re done, basic unwrap and bake out the result if you want. If you need other stuff like grunge or decals, you can always do appropriate unwraps for those purposes.
What I can’t do, which annoys me, is use triplanar this way on simple planes with a solidify modifier for truly nondestructive modeling, as the UV face needs to be assigned a location in UV space to behave as desired.
I think LordOdins approach may be suitable if you want to use armature or curve modifier to bend things into shape. Box mapping will follow the shape, but controlling scale stretch becomes difficult, probably sometimes impossible. This because it uses generated coords rather than object coords which you want for scale control or externally referenced orientations.
Apart from the use of procedural textures with boxmapping, I don’t see any advantage in LordOdings setup over the standard boxmapping.
But in my workflow this makes no sense at all, because I start with procedural maps and end with baked imagemaps. Either materials are so simple that boxmapping is sufficient, otherwise I just make a UVmap. Anyway, I don’t see the need to do a complex node setup instead of a simple UV-Unwrap.
When the object is not a simple shape and has many volumes, you need triplanar or some smart UV project on the output mesh.
Because the input mesh is a simple cube, but it gets subdivided and then very deformed to make any kind of rockn this is why some node able to make smart UV or triplanar to make good UV mapping is needed.
I think i will try those and will look at i also will look how Houdini do it.
Doesn’t have to be super complex or easy - it’s about getting to understand the tools at hand and how to utilize them to achieve the result with minimum amount of effort / pain. I had a real project containing 3000’ish pieces of wood (import from CAD, ifc file from customer) that I wanted to not look like a repeated texture, and obviously UV work was unrealistic. I was struggling like crazy, regular box mapping didn’t work at all due to lack of ways to randomize. I kinda made it work using custom triplanar but it was still painful as hell due to direction. Then random per island was introduced combined with origo transforms, and I solved the issue within a few hours using basic box mapping. The huge issue (bug) with box mapping is that you can’t rotate the mapping (90 deg), has a fixed blend size, and no control over normal selection to mess it up. Although in the project, only the rotation was an issue.
The tl;dr is: Learn the tools and how to exploit them together. The built in box mapping is extremely limited, buggy even. You can use UVs for other purposes than the basic two; place faces/islands on a texture, and stencil painting.
I do think use of procedural was the main idea though.
Yeah I think I realized that could be the case a couple of minutes after posting.