How to animate shader/material values
The position, morphing and rotation of an object can be animated over the parameter tab via timeline.
But how can i animate a shader or material-value over time? (Question 1)
For Example:
How can i increase the refraction-index of an object from 1.0 to 2.0 during frame 10 to 20?
If it isn't possible, is there any good "hack/workaround" or Shader Mixer solution? (Question 2)
Something like a "Connect the X-Position of a dummy-primitive and apply it to a shader value"-Brick?
I tried to connect the "Variable Brick (Root Context)" with the "FrameNumber" value to the "Index Refraction" but nothing happened.
Edit: I was wrong, the "FrameNumber"-Value seem to work somehow, but produces very strange results.
The value seem to be "1" on every frame.
Comments
Shader Mixer's Variable brick gives you access to time and/or frame number (I can't check just now, but at least one of them is available). If you can use 4Shared this is a simple example http://www.4shared.com/zip/ZI6wtq6Z/PulseTrace.html
Thank you. I solved the problem with the FrameNumber brick by creating the same shader again (no idea, what was wrong before).
Nevertheless, is there any other solution?
Hardcoding every shader animation seem a bit long-winded.
Well, it would depend what you are trying to do - you could certainly add Value bricks to set the repeat and offset of a pattern, for example.