Simple Dirt cleaning process

Hi,

I am trying to create a simple way of clean dirt of a small object to expose a code. I have spent far to long on this for how much of my game its meant to be lol.

Everything i find points to using lerp. having 2 materials and then line trace the mouse to make the touched parts of the dirt material opaque.

I tried asking ai for help but i think they have stop feeding the hamsters because it has no idea what it is talking about.

Are there any resources for this? Is this the best method. Should i just not both because its not a simple thing to create and with the amount of my game its actually in its not worth it.

Thanks in advance.

1 Like

Yes, lerp.

Moving the lerp is not really the problem, you just change a scalar parameter in the material instance. How you give the player the feeling they are cleaning it, might be the main problem.

What the player experiences varies:

One click and the dirt suddenly disappears

or

One click and the dirt slowly disappears

or

Scrubbing the mouse of the surface for a few seconds until it’s gone. And so on…

Anyway, the main base color concept would look something like this:

This is extremely basic, but changing the dirt param from 1 to 0 gives

dirt

1 Like

Thanks for reply but lerp does not seem to be in 5.5.4 which is why i think the ai is throwing a spanner. I am happy for click or rub. thinking about it as my game is a clicker game clicking so it slowly gets cleaner and cleaner seems to fit.

1 Like

Lerp has been in the engine since 3.0 :slight_smile:

Hold L and click in the material graph.

1 Like

:rofl: “as if by magic the shop keeper appeared” right click and type lerp and its not there!!

Thanks you soo much

1 Like

Here it is ( when you type ‘lerp’ )

It’s what lerp stands for :wink:

You can get it to look a lot more like dirt or dust, but that would depend on the actual example.

1 Like

Lol brilliant thanks for your help. got it working exactly how i want now. thanks

1 Like

Good stuff :star_struck: