Start time from zero / Storing StartTime

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

Start time from zero / Storing StartTime

Postby tapsteady » Mon Jun 11, 2018 11:56 pm

Hi!

I'm looking for a way to reset time to 0 and remap the 0s-4s to 0-1 for a slider to get a one time animation once the shader is applied / object is created.

Is there an easy way to do this? Or an easy way to store the time at the start (StartTime) and subtract it from the current time?

Thank you!
tapsteady
 
Posts: 3
Joined: Mon Jun 11, 2018 11:51 pm

Re: Start time from zero / Storing StartTime

Postby tapsteady » Tue Jun 12, 2018 12:01 am

Basically what's being asked here, but Amplify didn't post the answer :(

viewtopic.php?f=8&t=320&hilit=increment
tapsteady
 
Posts: 3
Joined: Mon Jun 11, 2018 11:51 pm

Re: Start time from zero / Storing StartTime

Postby Amplify_Borba » Tue Jun 12, 2018 10:12 am

Hello, thank you for getting in touch!

Since shaders can't store states themselves, the only way accomplish this is to pass some kind parameter to the shader - e.g. we can reset a shader time via script, but not via shader.

This is an expected limitation, and all the options we can think of involve making use of a script:

* Create a Dissolve Time parameter which you reset every time you trigger a dissolve

* Use a simple script to do the time calculations and update the Dissolve Amount material parameter via script

Feel free to check our Smear sample, which provides an example on how to use scripting together with a shader, and don't hesitate to let me know if you have any further questions, 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!
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 4 guests