Page 1 of 1

Get rid of the Dirt node "feathering"?

Posted: Fri Jun 14, 2019 9:31 pm
by ChrisH
Is there any way to get a sharp result of the Dirt node?

I've been a bit annoyed by how "feathered" the output of the Dirt node (which I otherwise like).
No matter what I've tried (like Gradient with Constant interpolation) I can't get a sharp result.

Today I wrote a OSL script that limits output to two possible values (0 or 1):

Code: Select all

    if (Value < Limit) {
        return 0;
    } else {
        return 1;
    }
(Applied to each channel)

This works fine for any texture (procedural or image, including Vertex Color) I've tried, except for the Dirt node, where the result still has "feathering".
This is not logical (like Boolean logic..): The result can't/shouldn't have any other values than 0 or 1!

Then I thought that maybe the output of the Dirt node is a "low res" and gets scaled up. But when I tried with a 16x16 image texture (a gradient) I could still get a sharp edge.
(It might still be true, it could be scaled after the processing...)

Is there any other way around this?
(Other than using a baked texture)

Why is this an issue?
Because:
1. It's not consistent with other textures.
2. It limits the choices for the artists.
3. Dirt (and rust) does have sharp edges.

Re: Get rid of the Dirt node "feathering"?

Posted: Sat Jun 15, 2019 9:36 pm
by Phantom107
Did some tests and although it's not perfect, I guess it's pretty close....

Basically I hooked the dirt node into a comparison node, see pics
octaneforum3.JPG
octaneforum.png
octaneforum2.png