Faking light direction with a vector property and gradient

Your feedback is very important to us. We are listening.

Faking light direction with a vector property and gradient

Postby jyoung » Fri Mar 15, 2019 8:55 pm

Hey all,

In the past I worked on a game where our shaders faked directional lighting with a gradient texture. Essentially you'd input the direction in x,y,z and that would correspond to a gradient. I'm trying something similar in ASE, but having a hard time with how to represent that in a usable way.

If I test it by tossing a directional light into the scene and using light direction node, it works as intended.
Image
Image


However, we don't use lighting in our game and I'd like to control that direction with manual input if possible. Something like an x,y,z input that makes sense to the user. If I use a vector 3, it technically works, but it's difficult to make it point the right way.
Image

Something that works more like rotation values would be ideal(so rotating 90 degrees on Y would make it look like it's coming from the left for example). Perhaps there's a completely better way to do this? Or, some direction as to how to get more sensible values for the user to input would be great.

Thanks!
Jason
jyoung
 
Posts: 1
Joined: Fri Mar 15, 2019 8:29 pm

Re: Faking light direction with a vector property and gradie

Postby Amplify_Borba » Wed Mar 20, 2019 9:32 am

Hello! Please note that this forum is mostly aimed at product support rather than development support, and although we usually try to provide assistance in regard to this sort of requests, we've been quite overloaded lately and as a result we're unable to provide this type of support at this time.

I suggest that you look into the Trigonometry Operators, such as the Radians node, in order to provide the user with the desired value range.
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 General Discussion

Who is online

Users browsing this forum: No registered users and 12 guests

cron