Announcement

Collapse
No announcement yet.

How to make tiling on all sides of object ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to make tiling on all sides of object ?

    Hello !

    I want to create object with dynamically repeating texture.
    When I transform the usual object, the texture is transforming according the object
    pict.1
    Click image for larger version

Name:	1.jpg
Views:	1
Size:	56.7 KB
ID:	1178911

    I've added a blueprint with SetScalarParameterValue.
    The scale values of object is saved into 3d vector and I use the value of Y as UTiling and Z as VTiling.
    UTiling and Vtiling are the parameters defined in the Material for TextureCoord.

    pict.2
    Click image for larger version

Name:	2.jpg
Views:	1
Size:	107.3 KB
ID:	1178913

    But the texture is tiling only on front side of object, all other sides are incorrect. (pict.3)
    For example, if I use the X as Utiling and and Y as Vtiling – I get a top side with correct texture and all others incorrect.

    pict.3
    Click image for larger version

Name:	3.jpg
Views:	1
Size:	64.5 KB
ID:	1178914

    How to make a texture correct on all sides of object?

    #2
    So when I'm not mistaking this is mathematically impossible since the UV coordinates of each side represent different directions in world space. You would need a way to map the different sides to different behaviors on how to handle the scale vector. The first method that came into my mind was to use the vertex normals, but then this would lack consistency when you rotate your mesh. So there are two other option that came up:

    1) Because you are using a Blueprint actor, you could easily compose it of the different sides as individual mesh components represenenting only one side with 4 vertices. Then each side would have a seperate material instance and you can handle the tiling factors in the Blueprint.
    2) (The one I would prefer) Simply don't scale one cube but add more unscaled cubes. The hex tile texture you are using fits neatly together.

    I don't know if this is an option for you but I hope it helps.

    Comment

    Working...
    X