No announcement yet.

World Aligned Texture Blending on Rotation

  • Filter
  • Time
  • Show
Clear All
new posts

    World Aligned Texture Blending on Rotation

    Hi, sorry if this is a noobish question but I have an object set to use world-aligned textures but when the object is rotated (or curved along a spline), the texture appears to overlap with itself at a certain point.

    Click image for larger version

Name:	973369de4d2a9f73f9853fcf89d54542.jpg
Views:	1
Size:	344.2 KB
ID:	1174844

    This is the texture as it should normally appear.

    Click image for larger version

Name:	88cf5efff9053231a471ee9f5b72fef3.png
Views:	1
Size:	931.4 KB
ID:	1174845

    This is the rotated version demonstrating the texture overlap.

    Click image for larger version

Name:	08c499d93b0cdb8991be0e34b748778e.png
Views:	1
Size:	137.2 KB
ID:	1174846

    This is the material setup for reference.

    Is there any way to fix/avoid this?

    Your material is world aligned so is aligned to the world no the mesh. You see overlaps because the texture is projected from all sides to the mesh.

    To do a local align of the texture you should make that from 0 using other nodes. (There aren't pre made nodes for that)
    Hevedy - Instance Tools:
    Hevedy - Image Tools:


      Thanks for the info, are there any tutorials on how to do that?


        This is pretty easy actually.

        place down the node "BoundingBoxBased_0-1_UVW". Hook that up to "Worldposition".

        Then you also need to take vertex normal and transform it from world to local space and hook that to the world normal input.

        There are various other ways to achieve this as well such as using "local position" but I haven't tested them.

        FWIW, on 45 degree angles it is expected that you will see a crossfade between 2 projections. You can change the transition projection contrast by adding a scalar param to that input on the function.
        Ryan Brucks
        Principal Technical Artist, Epic Games