Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework anti-tiling #317

Merged
merged 1 commit into from
Feb 11, 2024
Merged

Rework anti-tiling #317

merged 1 commit into from
Feb 11, 2024

Conversation

outobugi
Copy link
Collaborator

@outobugi outobugi commented Feb 5, 2024

This implements a new anti-tiling method. The UV is moved around a point (UV+0.5). The result is jittered/dithered and less chaotic than the old broken rotation. Obviously no anti-tiling is made for every texture.

I removed 'noise3' and used the textures alpha to blend the domain transitions. This is because the noise blending looked messy when blending two or more of the same texture together.

I also removed normal map rotation as it is redundant because nothing is rotated anymore.

Closes(?) #145
Fixes #201

@outobugi outobugi added the enhancement New feature or request label Feb 7, 2024
@TokisanGames
Copy link
Owner

TokisanGames commented Feb 8, 2024

This is an improvement over the old uv_rotation. And it may help some users with a cheap, psuedo detiling on some textures, so it can close #201.

However, it's not an adequate detiling option so #145 can stay open and be renamed.

v0.8.2 vs this PR

checkerboard.mp4

I removed 'noise3' and used the textures alpha to blend the domain transitions. This is because the noise blending looked messy when blending two or more of the same texture together.

I'm conflicted about this. noise3 is used to add noise to the blending edge of textures. I see that it does strengthen the normals in the textures that are rotated, away from the edges of texture blends.

However removing the noise makes the blending pattern between textures much blocker and far more difficult to paint with a natural blend.

Blending between textures is far more important to me than the rotation feature.

This does consider the texture height on the blend more so than before, so some textures like rock through grass do blend better. But other textures very easily turn into squares and are much more difficult to blend without these squares.

Without noise3

image

With noise3

image

Perhaps we can keep noise3 and average it into the height with a user settable factor (per texture maybe, or at least for all).

@TokisanGames
Copy link
Owner

TokisanGames commented Feb 8, 2024

Here is the blend with this PR and no noise3

image

With noise3

image

Here is both averaged, which is an improvement.

image

Here is both added. So far, I think this is the best option. Painting is good and the height of rocks is improved over the main branch. And the rotated textures still has most of its height.

image

@TokisanGames
Copy link
Owner

This is an improvement, so I will add noise3 to the height (unless you want to) and merge in this PR today or tomorrow.

Dither those tiles
@TokisanGames TokisanGames merged commit 1dc283c into main Feb 11, 2024
12 checks passed
@TokisanGames TokisanGames deleted the anti-tile-fix branch February 11, 2024 17:55
@TokisanGames
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rotation inconsistent in/out side of regions
2 participants