Hello,
I'm still learning quite a bit of Amplify Shader, so this might be a mundane/dumb question. I've been searching the internet and came up with very little and thus I thought I would cut to the chase and ask other users or devs of Amplify Shader.
Question: Is there a way to animate the shader's material properties through the animator and not through coding? I know obviously for programmers, this would be the easiest solution however I am an artist and want to keyframe other elements to sync with the shader setting changes.
Your help is greatly appreciated! Thanks in advance.
Animate Shader Materials
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Animate Shader Materials
Hey there, there's no such thing as mundane questions, we're always happy to help!
It's possible to animate values through the animator, but you need to have them set to property first, so that the value becomes available in the properties of the material that uses the shader and can be changed in the material inspector or by script, and then you may add them to your animation through Add Property.
Please let me know if this helps, thanks!
It's possible to animate values through the animator, but you need to have them set to property first, so that the value becomes available in the properties of the material that uses the shader and can be changed in the material inspector or by script, and then you may add them to your animation through Add Property.
Please let me know if this helps, 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!
Re: Animate Shader Materials
Hey Borba,
I appreciate the fast response! I probably should have been more explicit about what I'm trying to do.. Basically I want to have a UI image with a material shader attached to the image and be able to animate the properties through the animation editor. As far as I know (from my internet research and tinkering in Unity) I have been unable to access the material properties in animation, unless I use the process you proposed. For 3D objects this works fine, you can access the material properties through the mesh renderer in the animation editor, but for UI I can't figure out how to accomplish this because you can't access the properties through the animation editor.
I appreciate the fast response! I probably should have been more explicit about what I'm trying to do.. Basically I want to have a UI image with a material shader attached to the image and be able to animate the properties through the animation editor. As far as I know (from my internet research and tinkering in Unity) I have been unable to access the material properties in animation, unless I use the process you proposed. For 3D objects this works fine, you can access the material properties through the mesh renderer in the animation editor, but for UI I can't figure out how to accomplish this because you can't access the properties through the animation editor.
- Ricardo Teixeira
- Posts: 954
- Joined: Fri Aug 09, 2013 2:26 pm
Re: Animate Shader Materials
Hello,Yoshinjo wrote:Hey Borba,
I appreciate the fast response! I probably should have been more explicit about what I'm trying to do.. Basically I want to have a UI image with a material shader attached to the image and be able to animate the properties through the animation editor. As far as I know (from my internet research and tinkering in Unity) I have been unable to access the material properties in animation, unless I use the process you proposed. For 3D objects this works fine, you can access the material properties through the mesh renderer in the animation editor, but for UI I can't figure out how to accomplish this because you can't access the properties through the animation editor.
Unfortunately, you can't animate UI material properties; this is the case with all shaders, not just with content created with ASE. However, you can create a simple script that feeds values directly into your shader and animate that.
I recommend checking the smear sample, it's a great starting point!
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!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Re: Animate Shader Materials
@Ricardo Teixeira,
Thank you for the reply! I figured this was the case. I need to learn how to code
I was thinking of an alternative... Basically make the material shader have a input for transition time and animate the game object active/inactive state. I'm playing around with this now (just for expanding my knowledge of shaders, probably not the most efficient, as you said a script would probably be the way to go). Thanks again!
Thank you for the reply! I figured this was the case. I need to learn how to code
- Ricardo Teixeira
- Posts: 954
- Joined: Fri Aug 09, 2013 2:26 pm
Re: Animate Shader Materials
No problem, happy to help!Yoshinjo wrote:@Ricardo Teixeira,
Thank you for the reply! I figured this was the case. I need to learn how to codeI was thinking of an alternative... Basically make the material shader have a input for transition time and animate the game object active/inactive state. I'm playing around with this now (just for expanding my knowledge of shaders, probably not the most efficient, as you said a script would probably be the way to go). Thanks again!
I hope you find a viable solution, in the meantime feel free to use the attached sample as a starting point.
Don't forget to review and rate ASE, your feedback is extremely important to us.
Thanks!
- Attachments
-
- UISample.unitypackage
- (7.67 KiB) Downloaded 494 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!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!