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.
Screenspace pattern gradient on object.
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Screenspace pattern gradient on object.
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.
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.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Re: Screenspace pattern gradient on object.
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.

(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.
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Screenspace pattern gradient on object.
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!
I've attached both a screenshot and a simple shader sample for your convenience, please let us know if this helps you out, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!