I’m working with a half-sphere mesh that automatically rotates to always face the camera, ensuring the back faces are never visible. However, this causes the applied textures to rotate with the mesh, breaking the illusion of a seamless 3D sphere.
I’d like to create a material setup where:
The textures remain fixed in world space, unaffected by the half-sphere’s rotation.
The textures continue to pan across the mesh as intended (I am using a Panner node).
I used the Absolute World Position node in combination with a Panner node. While this somewhat works, it introduces significant stretching to the textures, which ruins the appearance.
This is how the textures look like on the half-sphere with the world position:
Does anyone have suggestions for how I can achieve this? Specifically, how can I preserve the texture’s position relative to the world while keeping the panning effect intact?
Your world position solution is about 1/3 of the way there. You’re reinventing a technique known as tri-planar mapping, or world aligned textures.
The issue is you need 3 projections to solve the stretching.
RG is top down, but you also need RZ, and GZ for the side projections, and a blend weight mask to apply them in the right spots.
There is a pre-built node for world aligned textures. It’s not great, but it should be enough to get started. Eventually I would encourage you to make your own to fix some of the problems.
Here’s a good channel that has a few videos on the topic.
Thank you for the channel recommendation, it’s a good resource. I have added a triplanar implementation similar to the last one he showcases in the video to my material, the texture orientation is not changing when the mesh is rotated which is great and exactly what I wanted.
However, in my case the textures pan across the X axis to make it seem as if the sphere itself is spinning, with triplanar would it be possible to uniformly pan the textures after I blend them from the 3 different points? Or would each of them be individually panned?
Adding the panner to the UV of each individual texture just makes them pan individually. Is it possible to add the panning after the textures are blended (with triplanar)? If so, how?
In order to rotate a tri-planar material, you would need to rotate the world coordinates. There is a rotate about axis node that can rotate positions or vectors around an axis vector and pivot point.
Edit: another option is to use local space textures instead of world space, then you can rotate the mesh instead of the texture and allow the transform position node to do all the work for you.