Screenspace pattern gradient on object.

Node-based Shader Editor

Screenspace pattern gradient on object.

Postby Gallahalt » Mon Dec 04, 2017 2:44 pm

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.
Gallahalt
 
Posts: 2
Joined: Mon Dec 04, 2017 2:37 pm

Re: Screenspace pattern gradient on object.

Postby Amplify_Borba » Mon Dec 04, 2017 4:06 pm

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.
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!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Screenspace pattern gradient on object.

Postby Gallahalt » Mon Dec 04, 2017 10:57 pm

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.

Image

(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.
Gallahalt
 
Posts: 2
Joined: Mon Dec 04, 2017 2:37 pm

Re: Screenspace pattern gradient on object.

Postby Amplify_Borba » Tue Dec 05, 2017 3:32 pm

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!

ScreenPositionBlend.zip
(1.65 KiB) Downloaded 317 times


ScreenPositionBlend.jpg
ScreenPositionBlend.jpg (181.81 KiB) Viewed 2468 times
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!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron