dusting for prints

Hi everyone,

I am trying to implement a game behaviour that tries to replicate the real-life fingerprint dust effect, meaning that I want to “dust” some texture for a “hidden” texture.

My problem is to make permanent. So far I can think of two different solutions:

i) using a shader - my problem is how to make it permanent… no clue here

ii) per-pixel texture disclosure (pompous nome here) - pretty much as in real-life, where according to a mouse pass another texture would be overlaped, exactly like passing a dust brush over a surface with fingerprints, making the dust attach to the surface. Also no clue here…

Any ideas or examples?

Many thanks,

Perhaps some of the Texture2D.SetPixels would be suitable? You could write the information directly into the texture.

Another option could be to create a plane (or perhaps particle fx) that was created overtop of the areas that were dusted. If you have a lot of them you could consider having sections or scaling your plane object to increase the size of the dusting.

Couldn’t you alter the alpha channel of the texture to reveal the print as you dust?

A projector comes to mind. You’d need to keep track of when it’s been dusted or not, but you’ll need to do that in any technique.

I will look into the Texture2D.SetPixels and see how it works.

As for the other option, I’m sorry but I’m not sure what you mean with creating a plane over the dusted areas… How would this work per se?

Many thanks :slight_smile:

I believe that this would reveal the whole texture and no just the area being ‘dusted’. Please correct me if I am wrong.

Many thanks :slight_smile:

That would indeed solve the problem of having prints on top of a textures, however I am not sure how hard it is to create such a custom behaviour for the projector: showing the projected image after each pass…

I will look into the class.

Many thanks :slight_smile:

Not if just just update the alpha channel in small sections. As you swipe, you set the alpha channel in a path.

Dose this mean I would need to have the fingerprint texture divided in many parts, so that each mouse pass coordinate would correspond to the alpha for a specific small part of the texture?