Both of the techniques described in this tip can be achieved with the Base package of DFX+ 3.1 or higher. An advanced section
below describes additional ideas available only to people using Digital Fusion 4.0.
One question that comes up rather often on eyeon's support lines is how to create a strobe effect with Digital Fusion. Invariably
people are referring to one of two different effects, either which can be considered a strobe. Both techniques can be applied with a
clever use of the Time Speed tool.
SIMPLE STROBE
Click on the image above for a 410 Kb Quicktime showing the Simple Strobe effect.
I call the first technique the Simple Strobe. This method plays a frame, holds it for a set number of frames, then plays
the next available frame and repeats. So a strobe set to 5 frames would play frame 1, hold it for five frames, then show frame 5
and hold it for another 5 frames.
To achieve this effect add one Time Speed tool to your flow, and rename it to SpeedUp. Turn off the "Interpolate between frames"
checkbox, and set the Speed slider to the number of frames you want your hold to last for. i.e. if you wanted to hold for five frames,
you would set the Speed value to 5.0.
Follow the first SpeedUp tool with another Time Speed, renamed to SlowDown. Again, set the Interpolate checkbox to off. Our
previous tool made our clip five times faster, we want this tool to make the clip 5 times slower. To do this we set the speed to
1/5, or 0.2.
The first Time Speed tool throws away one out of every five frames, and our second then takes that remaining frame and repeats
it for five frames.
Note:
You will need to double the rate if you are processing your footage as NTSC or PAL fields. For example, use 10 and 1/10 instead of
5 and 1/5 for a five frame strobe. This is because the time speed is processing twice for each frame, once for each field.
STUTTER STROBE
Click on the image above for a 420 Kb Quicktime showing the Simple Strobe effect.
The second method of strobe is more complex. I tend to refer to this as a "Stutter Strobe" as it holds a frame a bit, and then
plays a few frames. To illustrate we will assume the period is 9 frames, and the strobe is active for 4 frames.
Add a Time Speed to your source, and rename it to Stutter. Turn off the "Interpolate between frames" checkbox. Set the speed to
0.0 - effectively pausing the clip. Go to frame 0, animate the Delay slider, then set the Delay to 0.0. Now go to frame 8 and
change the value of the Delay to 8.0. Change to frame 12.0 and set the delay to 12.0.
Switch to the Spline Editor and select the first and second keys in the spline (at times 0 and 8) to Step In. This forces the
value to hold at 0.0 until frame 8 followed by an immediate jump to 8.0. The spline segment between frame 8 and 12 should be linear.
Now select all three points on the spline and select the Loop Relative mode. Unlike a normal loop which repeats the exact
same values for each repetition, the Loop Relative mode adds each cycle to the values from the last. So instead of 0-8-12 repeated
over and over you will get 0-8-12, then 12-20-24, then 24-32-36 and so forth.
Try it out for your self and see. Not sure whats going on, or having trouble following these
instructions? Download this commented sample flow to see both techniques.
ADVANCED
The advanced section requires Digital Fusion 4, as DFX+ 4 cannot be used to create macro tools. However, DFX+ 4 can read
a Macro tool created in Digital Fusion 4, as long as you have the necessary tools unlocked through the Modules.
In this case you would need DFX+ 4 with module 3 enabled to load the Macro tool.
After writing this tip I thought it would be nice if I could have a single tool do what the two timespeeds did in the Simple
Strobe example. I could have saved the two timespeeds used in our first example for later use, by dragging them together into
one of the bins. That automatically creates a DFS settings file for both tools, and places them in the Bin for easy access. But I
would rather make a macro tool using both tools but only reveal one control, for the Strobe Interval.
I need to make certain that the two time speeds are always related and controlled via a single slider - so I wanted to publish
the Speed slider of the first SpeedUp tool, and then I was going to set the Speed of the SlowDown tool using an Expression modifier.
However, I discovered that you cannot animate the Speed slider of a Time Speed.
I was about to abandon my attempt to make the macro when I realized I could use a script to fix the problem. I added a Filter
tool before the SpeedUp tool, and I renamed the tool to Interval. I chose the Filter tool because the Power slider in this tool is
Integer only - it can't be set to fractional numbers, only to whole ones. But I don't want the Filter tool to actually affect the
image, so I set the Blend slider under common controls to 0.0 and made certain the "Process when Blend is 0.0" checkbox was enabled.
Then I opened the controls for the SpeedUp tool and I switched to the InTool Script tab (it looks like a small red gear).
I entered the following script into the Frame Render Script textbox :
Speed = Interval.Power[time]
This line of code just says, Set the Speed slider on this tool to the value of the Power slider on the
Interval tool at the current time.
Now open the InTool script tab for the SlowDown tool and enter the following into the Frame Render Script textbox
Speed = 1 / Interval.Power[time]
This code also reads the value of Intervals Power slider, but this time it sets the Speed slider to the Inverse of that value,
or 1/value.
Now we are ready to publish the three tools to a macro. Save the flow before you begin (its always nice to have a copy of the
flow that made a particular Macro - I usually keep them in the same directory as the Macros themselves.
Select all three tools, right click on one, and select Macro / Create Macro from the context menu. Immediately rename the new Macro
to Simple Strobe using the textbox at the top of the dialog.
(Trouble reading the above graphic? Click here for the full size
version.)
Open the controls for the Interval tool and make certain that the Input is published (the checkbox is enabled). Now open the
Controls section of the tree for the Interval tool and add a checkbox next to the Power slider. Rename the control from Power to
Strobe Interval. Set the default value to 5, the minimum to 1 and leave the maximum as 10.
Double check that the SlowDown tool has it's Output selected, and then click on Create to finish making your Macro. The new Macro
tool will be available just like any other tool, as an entry under the Tools/Macro category. Add the tool to your flow, and see if it
performs as expected.
For more information on Macros see chapter 24 of the Digital Fusion 4 Reference manual.
|