So what I’m trying to achieve is something like the ‘Pin Material’ tag in Cinema 4D that bakes a tri-planar texture so whenever you animate it to move/deform the texture stays in place, as exemplified on the bottom gun where the texture shifts around since its animated.
I know I can bake the texture as an image, but just finding a method that doesn’t require exporting a texture.
It’s a bit of a workaround, but you can make that type of stable box mapping by using two UV-maps and combining them to create 3D texture coordinates.
If there’s a better way I#d love to know, but this seems to work
Here’s one way to set it up:
- Select your object and go into edit mode.
- Go to the UV Maps panel in the Object Data Properties tab in the Properties Editor, create two new UV maps and rename them to to ‘XY’ and ‘XZ’.
- With the ‘XY’ UV map active: go into the top view and then project the UVs using UV > Project from View (Bounds)
- Now select the ‘XZ’ UV map, go into the front view and project the the UVs, again using UV > Project from View (Bounds).
(You don’t have to use the bounds option, but it makes it easier to keep the scale consistent.)
You now have two UV maps storing fixed X, Y and Z information for your objects and can combine them in the Shader Editor with a setup like this:
You can use the combined UV coordinates with the box mapping option for image textures. Because the UV map is scaled to fit into the UV bounds you’ll probably have to scale the texture with a mapping node.
Now, no matter what you’re doing to your model, the textures should stay fixed.
Huge thanks for the detail response, unfortunately I didn’t get it working as its all stretched and still shifts around.