Amplifying your potential.
Page 1 of 1

Screenspace pattern gradient on object.

PostPosted: Mon Dec 04, 2017 2:44 pm
by Gallahalt
Hey, I'm having issues masking a screenspace pattern using a gradient from the bottom of a mesh to the top. I've successfully worked out how to get my pattern into screenspace using the provided "Screenspace Detail" example, but I have no idea how to go about masking it to specific areas of a mesh.

This is my first time playing around with shaders and Amplify, so I'm pretty confused. Thanks for any help you guys can offer.

Re: Screenspace pattern gradient on object.

PostPosted: Mon Dec 04, 2017 4:06 pm
by Amplify_Borba
Hello Gallahalt, thank you for getting in touch!

Would it be possible for you to provide some additional details and an example of the type of effect you're trying to achieve, so that we may best help you?

Looking forward to your reply.

Re: Screenspace pattern gradient on object.

PostPosted: Mon Dec 04, 2017 10:57 pm
by Gallahalt
Thanks for the reply! I'm not at the computer I attempted the shader on right now so I'll try to illustrate what I'd like to achieve with some images I got off of google. I couldn't find an exact working example of what I wanted, but I think I can explain it well enough.


(Ignore the mesh outline)

So I managed to succesfully get my texture into screenspace and tiling over my character, but I'd like to restrain it to a gradient that's based on the Mesh's height. So the bottom of the mesh would be white and the top would be black, so that the screenspace texture is restrained to only the lowest parts of the mesh.

I was attempting to use the Y value of the vertex position to do this, but I got pretty confused and don't quite understand the concepts behind it yet.

hopefully this makes more sense.

Re: Screenspace pattern gradient on object.

PostPosted: Tue Dec 05, 2017 3:32 pm
by Amplify_Borba
You could possibly use the Vertex Position node's Y coordinates together with a Smoothstep node to control the resulting gradient's intensity and positioning.

I've attached both a screenshot and a simple shader sample for your convenience, please let us know if this helps you out, thanks!
(1.65 KiB) Downloaded 2 times

ScreenPositionBlend.jpg (181.81 KiB) Viewed 19 times