Page 1 of 1

Top to Bottom Gradient Shader

PostPosted: Mon Apr 01, 2019 3:40 am
by Jcadman
Hey! For the project I'm working on we're trying to get a shader working that sets a top to bottom gradient on an object regardless of its orientation.

This is as far as I've been able to get:


Image

Image

It does apply a top to bottom gradient, but the colours can end up slightly skewed depending on the object it's on because of the way it's being masked and the gradient maintains its orientation instead of staying top-to-bottom even if the object spins.

I found an example of a graph that has it working in Unreal, but I'm not sure how to translate it into Amplify

https://answers.unrealengine.com/questi ... d-uvw.html

Re: Top to Bottom Gradient Shader

PostPosted: Tue Apr 02, 2019 1:36 pm
by Amplify_Borba
Hello, thank you for getting in touch and for your support!

According to the shared example, you'll need to make use of the World Position node in order to produce a gradient that is not influenced by the object's rotation.