• News

• Industries

• Learning & Support

• Community

• Marketplace

# Can each square be rotated and scaled?

This an awesome technique I saw on youtube:

This only randomizes the position of the vector noise. I am wondering if there is a way to randomise the scale and rotation of the atlases as well?

Thanks

This technique is altering how tex coords plots textures onto uvs.

To rotate them in addition is possible, but must work off different texture rotations. So you would end up with multiple graphs for each rotation angle and lerp them together in the end. Quite expensive for little gain.

Scale is already implemented in this example, but is for the entire thing. You cannot scale certain tiles to be bigger than others, it won’t look natural.

What is being achieved in this example works because all the tiles are square and so are pixels. Tex coords are pixel based so its a trick with the tech.

A better route is to use this as a base and then add extra geometry for your variation. This can be single planes with the texture mapped to them where they can be rotated and scaled individually and placed around the ground for visual breakup.

One counter to this whole approach is that games are rich with assets, so trying to make a uniquely endless floor that is covered by other assets for visual breakup and interest doesn’t pay off as well. Think dark souls, the world is mostly brick and tiles - lots of assets cover over the floors and walls to reduce the tiling and make it more interesting than just bricks everywhere.

Thanks for replying, ConradG. So scaling the individual tiles randomly isn’t possible? Thanks for explaining the rotations requirement. Seems it would be expensive. If these can be implemented. then textures without pattern, like grass, dirt can be made more unique looking when randomised.

I am familiar with the techniques you pointed out and I use them. Just making enquiries about this technique if it is possible.

Will make do with the way it is then. Thanks.

To consider scaling of a tile:

1. Scale the uvs of the texture sample and write that scaled texture to the same shuffled location. Result is showing only part of the tile, essentially just burrier not bigger.
2. Affect the mask so that certain tiles are larger. I only see this working if you draw the bigger tiles on top of the smaller ones. Rotation could be added but they follow the same rotation.
I think the effort to do this is far more controllable by authoring assets by hand that achieve the same affect. That goes for time investment as well.

Grass and the like are different than tiles in terms of pattern break up.

For example, you could have 3 versions of the same grass texture, a normal one, a 90 degree rotated one, and a scaled one. Take all 3 and mix them using a grayscale splat map which is scaled up to cover large areas. The result is a field of the same altered grass textures that hide the repetition. This is a common trick when dealing with large meshes that use the same tiling texture - grass fields, large rocks, dirt hills, sand shores, etc. Additionally, multiplying the ao or using the ao as an alteration mask can break up patterns.

Yeah, I agree, by hand would be the best approach.
I am familiar with blending more than 2 textures to hide tiling. I am just trying to find out if more features can be added to the technique in the vid out of curiosity.Thanks.

Is there a way to control the mipmap distance if you are using ddx and ddy.for the texture parameter?https://youtube.com/watch?v=waIxQV6yDgE
From this vid:https://youtube.com/watch?v=0VAhyIGyHigYou can control mipmap distance using a scalar parameter.

I suppose it could be controlled. Might want to play with the different mip settings like Sharpen# or something.

As for ddx and ddy. It’s common for textures to be processed in 2x2 pixel blocks. In the first video link, a way to reduce the obvious mipping is to make the texture twice as big in a clean way. Thereby having the one pixel of color take up a 2x2 block - it will be less but not gone.

Unreal’s Tex Coords is 256x256 at most IIRC.
More about that hereand here. It ultimately depends on the hardware of the end user, so some may experience subtle artifacting.

The solution of the second video is nicely done. Turning mips off and letting AA do the blending work is a route, though a little funny to see it as a minecraft example because it was originally developed for wide use, i.e. low end hardware. We might be getting close to better standardized mipping solutions, but having multiple for different quality platforms is what most developer’s do. Whether it’s with the application or as a separate build of the game with quality features removed altogether.

Thanks so much, ConradG, Really appreciate the help.