material only visible when lit

Node-based Shader Editor

material only visible when lit

Postby DaLiberator » Fri Jun 09, 2017 10:45 am

Hi,
I would like to create a material that reveals a second texture only when you are shining a flashlight on it. The light is held by player and moves around.
DaLiberator
 
Posts: 2
Joined: Fri Jun 09, 2017 10:41 am

Re: material only visible when lit

Postby DaLiberator » Fri Jun 09, 2017 12:30 pm

I found the example but am still not sure how to feed the transform and rotation values to the shader. Second question is once I have the transform and rotation, how do I get it to reveal only where the light is hitting?
DaLiberator
 
Posts: 2
Joined: Fri Jun 09, 2017 10:41 am

Re: material only visible when lit

Postby Ricardo Teixeira » Fri Jun 09, 2017 12:46 pm

DaLiberator wrote:I found the example but am still not sure how to feed the transform and rotation values to the shader. Second question is once I have the transform and rotation, how do I get it to reveal only where the light is hitting?


Hello,

I think that we might be able to provide a sample that simply reacts to a specific light value. I will get back to you as soon as possible.

Check the Smear sample included in the main package, it demonstrates a simple way to use external values to control specific actions in your shader.

Thanks!
Sales & 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
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: material only visible when lit

Postby Ricardo Teixeira » Fri Jun 09, 2017 2:15 pm

DaLiberator wrote:I found the example but am still not sure how to feed the transform and rotation values to the shader. Second question is once I have the transform and rotation, how do I get it to reveal only where the light is hitting?


Hello,

We made a sample that generates the effect that you want to achieve, please examine the attached package and let us know if you have any questions. Use the Color to be Filtered property to define which light color will drive the blending effect.

Thanks!
Attachments
UV light Example.unitypackage
(21.4 KiB) Downloaded 202 times
Sales & 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
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 7 guests