How to center a texture using objectPositionWS
Hi, I have a mesh with bad UV mapping. The texture and the mesh have to be cocentric. I want this to be automatic so I don't have offset the texture manualy.
My idea is to use the worldAlignedTexture node to bypass the UV problem. I want the center of my texture to be at the center of the bounds. I think Ihave to use the objectpositionWS node to get the position of the center of the bounds, but I don't know how to use it in the worldAlignedTexture node. Has anyone done something similar?
asked Jun 30 '17 at 10:31 AM in Rendering
Try something like this. It will work for XY projection. Also I think you can calculate Size by 1/ObjectRadius or one of options in ObjectBounds.
Offset parameter added to make additional adjustments for 'relative texture location'.
Follow this question
Once you sign in you will be able to subscribe for any updates here