By default, a newly-created K-3D document contains an instance of the TimeSource plugin. TimeSource provides storage for several time-related parameters:
Time-varying behavior is introduced into a document by connecting the TimeSource “time” property to input properties on other nodes using the Visualization Pipeline. Since “time” is a k3d::double_t, it can be connected directly to any other k3d::double_t property. For example, the following pipeline connects the radius of a Sphere to the current time:
In this scenario, the radius of the sphere will always be equal to the current time. If an animation is rendered from time t = 0 to t = 4, the radius of the sphere will smoothly change from 0 to 4 over the course of the animation.
Of course, you may add nodes to the pipeline to manipulate the time value prior to use. For example, you might want the Sphere radius to change at a different rate than time:
Here, the ScalarMultiply node applies a scaling factor to the current time value before it’s used by the Sphere. Many other plugins are available to manipulate scalars - for example you might combine ScalarAdd to offset time, ScalarModulo and ScalarSine to provide repetitive behavior, and ScalarSourceScript for fully-generic scripted behavior.