Category Archives: CHOPs

Nov 12 2014

Blend CHOP tutorial.

The Blend CHOP. TouchDesigner 088. 2014.
The Blend CHOP is a special multi-input CHOP. It can combine CHOP Channel values using different weighting calculations.

1
00:00:00,233 –> 00:00:03,133
Let’s examine the blend CHOP.

2
00:00:03,133 –> 00:00:09,533
The blend CHOP is very powerful,
but its usage can be difficult
to understand.

3
00:00:09,533 –> 00:00:18,900
Unlike other CHOPs that combine
multiple inputs, the blend CHOP
uses its first input as a
controller.

4
00:00:18,900 –> 00:00:27,600
The reason for this architecture
is that the blend CHOP can
control an arbitrary amount of
inputs.

5
00:00:27,600 –> 00:00:31,233
The second input is a base
value.

6
00:00:31,233 –> 00:00:35,867
These are the values that all
other inputs will be compared
to.

7
00:00:35,867 –> 00:00:41,067
This network uses 3 states, plus
a base state.

8
00:00:41,067 –> 00:00:47,567
We will use the “Difference”
method for blending the incoming
channels.

9
00:00:47,567 –> 00:01:00,467
The states of “rx”, “ry”, and
“rz” represent rotations, and
they are applied to a geometry
component by using Python
expressions.

10
00:01:00,467 –> 00:01:03,967
The base state is 0 rotation.

11
00:01:03,967 –> 00:01:08,033
Adjusting its amount with the
controller has no effect.

12
00:01:08,033 –> 00:01:12,000
This is because we are using the
“Difference” method.

13
00:01:12,000 –> 00:01:17,300
Try using the “Proportional”
method to blend in the base
state.

14
00:01:17,300 –> 00:01:22,033
Now I increase the amount of
influence of state 1.

15
00:01:22,033 –> 00:01:30,133
Again, notice that the base
state is only calculated as a
comparative starting point.

16
00:01:30,133 –> 00:01:35,967
I’ll increase the influence of
state 1 to its maximum value.

17
00:01:35,967 –> 00:01:39,733
No other states are influencing
the blend.

18
00:01:39,733 –> 00:01:45,900
In this way the blend CHOP can
be used as a simple switch.

19
00:01:45,900 –> 00:01:50,500
Now I’ll begin combining states.

20
00:01:50,500 –> 00:01:56,933
The blend CHOP calculates state
influences in real time.

21
00:01:56,933 –> 00:01:58,933
It can be used as a way to morph
any type of value or state in
Touch Designer.

Nov 12 2014

Speed CHOP tutorial.

The Speed CHOP. TouchDesigner 088. 2014.
The Speed CHOP can be utilized as the core of complex animation engines in TouchDesigner.

1
00:00:00,100 –> 00:00:02,433
Let’s take a look at the speed
CHOP.

2
00:00:02,433 –> 00:00:08,500
The speed CHOP uses an input
value as a rate of change.

3
00:00:08,500 –> 00:00:11,867
It outputs this change over
time.

4
00:00:11,867 –> 00:00:18,633
In this example, we will use a
constant CHOP to set the rate of
change.

5
00:00:18,633 –> 00:00:26,267
With a value of 1, the rate of
change is 1 times 60 per second.

6
00:00:26,267 –> 00:00:32,000
The output of the speed CHOP
will increase by 1 every second.

7
00:00:32,000 –> 00:00:39,667
With a value of .5, the speed
CHOP will increase by .5 every
second.

8
00:00:39,667 –> 00:00:50,567
We can use the speed CHOP to
easily create time or animation
engines that are independent of
the global frame rate of Touch
Designer.

9
00:00:50,567 –> 00:00:51,300

10
00:00:51,300 –> 00:00:57,533
This example network shows the
basics of a commonly used
animation engine.

11
00:00:57,533 –> 00:01:02,667
We want an animation to be
driven by user input.

12
00:01:02,667 –> 00:01:08,567
When the button is clicked, its
state changes from 0 to 1.

13
00:01:08,567 –> 00:01:16,567
A chop execute DAT will run a
Python expression that resets a
speed CHOP.

14
00:01:16,567 –> 00:01:17,400

15
00:01:17,400 –> 00:01:26,433
We use the output of the speed
CHOP to drive an animation, in
this case the size of a
rectangle.

16
00:01:26,433 –> 00:01:34,000
In the rectangle TOP, I multiply
the speed CHOP value by 20, so
we can better see its effect.

17
00:01:34,000 –> 00:01:39,333
When I click the button, its
state changes from 0 to 1.

18
00:01:39,333 –> 00:01:43,767
I’ve set the speed CHOP’s limit
type to “Clamp”.

19
00:01:43,767 –> 00:01:49,800
This forces the speed CHOP to
hold at a maximum value, in this
case 10.

20
00:01:49,800 –> 00:01:56,967
If the button state is 0, the
“Reset” parameter of the speed
CHOP will be pulsed.

21
00:01:56,967 –> 00:01:59,700
This resets the speed CHOP.

22
00:01:59,700 –> 00:02:01,200

23
00:02:01,200 –> 00:02:09,300
This user interaction can take
place at any point on the Touch
Designer master timeline.

24
00:02:09,300 –> 00:02:11,300

Nov 12 2014

Info CHOP tutorial.

The Info CHOP. TouchDesigner 088. 2014.
The Info CHOP is a frequently used Operator. It can help you diagnose and monitor performace issues in TouchDesigner.

1
00:00:00,233 –> 00:00:02,600
Let’s examine the info CHOP.

2
00:00:02,600 –> 00:00:06,567
The info CHOP is a deceptively
simple operator.

3
00:00:06,567 –> 00:00:12,033
Its’ job is to place information
about an operator into a CHOP.

4
00:00:12,033 –> 00:00:20,533
This information can be used to
provide a framework to match the
parameters of other operators
to.

5
00:00:20,533 –> 00:00:25,000
This network starts with the
default movie in TOP.

6
00:00:25,000 –> 00:00:32,733
It’s wired to a resolution TOP,
which I’ve used to alter the
settings of the input TOP.

7
00:00:32,733 –> 00:00:38,667
It’s bypassed for now, and I’ve
wired it to a null TOP.

8
00:00:38,667 –> 00:00:42,900
The info CHOP references the
null TOP.

9
00:00:42,900 –> 00:00:44,033

10
00:00:44,033 –> 00:00:50,933
In this example, let’s look at
the resolution and aspect
channels.

11
00:00:50,933 –> 00:00:53,700
I’ve created a constant TOP.

12
00:00:53,700 –> 00:01:02,933
This TOP uses the info CHOP to
create its resolution and aspect
parameter settings.

13
00:01:02,933 –> 00:01:08,467
We’ve used the info CHOP to
match one operator’s settings to
another.

14
00:01:08,467 –> 00:01:09,900

15
00:01:09,900 –> 00:01:18,600
The original movie in TOP has
resolution and aspect settings
of 800 by 450.

16
00:01:18,600 –> 00:01:21,467
Let’s look at the resolution
TOP.

17
00:01:21,467 –> 00:01:31,600
I’ve created a custom resolution
setting of 500 by 100, and a
custom aspect of 5 by 1.

18
00:01:31,600 –> 00:01:42,500
When I enable the operator by
turning off the bypass toggle,
we see the effect of the
resolution TOP instantly.

19
00:01:42,500 –> 00:01:54,533
By using the info CHOP, we’ve
created a way to automatically
drive the parameters of one
operator network by changing
another.

20
00:01:54,533 –> 00:01:58,500

21
00:01:58,500 –> 00:02:06,500
In this example, we’ll use the
info CHOP to help us analyze
Touch Designer’s performance.

22
00:02:06,500 –> 00:02:14,233
We measure performance by
examining how well our processes
perform by the millisecond.

23
00:02:14,233 –> 00:02:22,033
We can always middle mouse click
on an operator to quickly get an
indication of its performance.

24
00:02:22,033 –> 00:02:33,067
But in some cases we need to
analyze performance over long
periods of time, or compare
performance between multiple
operators.

25
00:02:33,067 –> 00:02:44,500
In this example, I’ve used
select CHOPs to isolate the
“cook_time” channels from two
info CHOPs.

26
00:02:44,500 –> 00:02:52,667
The first info CHOP is
monitoring a quicktime movie,
the second is monitoring a wave
CHOP.

27
00:02:52,667 –> 00:03:02,733
I’m looking to spot fluctuations
in performance over time, so I
use a trail CHOP at the end of
the network.

28
00:03:02,733 –> 00:03:17,200
Since the processing, or cooking
of an operator occurs so
quickly, the trail CHOP is
useful for keeping, and
displaying, a longer term record
of cook states.

29
00:03:17,200 –> 00:03:25,467
Here, I can instantly see that
my movie playback suffers from
irregular performance spikes.

30
00:03:25,467 –> 00:03:34,000
Now, armed with this knowledge,
I can modify the input file or
other parts of my network
accordingly.

31
00:03:34,000 –> 00:03:36,000

Nov 12 2014

Trim CHOP tutorial.

The Trim CHOP. TouchDesigner 088. 2014.
The Trim CHOP can help you customize and fine-tune CHOP data.

1
00:00:00,533 –> 00:00:03,467
Let’s take a look at the trim
CHOP.

2
00:00:03,467 –> 00:00:11,067
We can use the trim CHOP to
shorten or lengthen the channels
of the incoming CHOP.

3
00:00:11,067 –> 00:00:17,033
This example network shows two
common methods of using the trim
CHOP.

4
00:00:17,033 –> 00:00:22,500
The first method is to simply
trim a range of samples.

5
00:00:22,500 –> 00:00:30,233
The second method, which is more
complex, is to evaluate a range
of samples over time.

6
00:00:30,233 –> 00:00:39,333
We start with a wave CHOP, with
one channel named “chan1”, which
is comprised of 600 samples.

7
00:00:39,333 –> 00:00:49,667
The trim CHOP named “trim1” is
set to trim the incoming sample
range using absolute unit
values.

8
00:00:49,667 –> 00:01:06,133
By setting the units values to
“Absolute”, and setting the
discard method to “Exterior”, we
create a new sample range of 60
samples, or 1/10th the original
sample range.

9
00:01:06,133 –> 00:01:17,767
The second method uses the
current frame in Touch Designer
as a reference point to evaluate
the incoming sample range.

10
00:01:17,767 –> 00:01:33,167
With start and end settings of 0
to 1 second, we create an
animating sample range of 60
samples, which is our global
frames per second setting.

11
00:01:33,167 –> 00:01:44,633
Touch Designer uses the current
frame, which is always updating
and moving forward in time, as
the start reference point.

12
00:01:44,633 –> 00:01:46,300

13
00:01:46,300 –> 00:01:54,400
This network is designed to help
us visualize the “Relative To
Current Frame” method.

14
00:01:54,400 –> 00:02:01,433
We start with a noise CHOP that
is set to create 600 samples.

15
00:02:01,433 –> 00:02:10,267
We use a trim CHOP to create a
sample length that is 1/10th that
value, or 60 samples.

16
00:02:10,267 –> 00:02:12,533

17
00:02:12,533 –> 00:02:21,267
The op viewer TOP will create a
2D image of the noise CHOP
operator.

18
00:02:21,267 –> 00:02:27,533
The rest of the TOP network is
designed to only for
visualization purposes.

19
00:02:27,533 –> 00:02:28,567

20
00:02:28,567 –> 00:02:33,167
I’ll stop to play head and back
it up to the first frame.

21
00:02:33,167 –> 00:02:37,233
We are no longer moving forward
in time.

22
00:02:37,233 –> 00:02:44,167
The trim CHOP has extracted the
first 60 samples of the noise
CHOP.

23
00:02:44,167 –> 00:02:45,067

24
00:02:45,067 –> 00:02:50,833
The TOP named “over1” shows us
the effect of the trim CHOP.

25
00:02:50,833 –> 00:02:54,733
The area in white is the
extraction area.

26
00:02:54,733 –> 00:02:56,033

27
00:02:56,033 –> 00:03:00,233
Let’s play, then quickly pause.

28
00:03:00,233 –> 00:03:06,333
The trim CHOP reference point is
synchronized to the playhead.

29
00:03:06,333 –> 00:03:18,600
As we move forward in time
again, the trim CHOP reference
point moves forward as well,
constantly updating the
extraction range.

30
00:03:18,600 –> 00:03:20,600

Posted In
Tagged
Nov 12 2014

Clock CHOP tutorial.

The Clock CHOP. TouchDesigner 088. 2014.
The Clock CHOP helps you control timings in TouchDesigner.

1
00:00:00,433 –> 00:00:03,600
Let’s take a look at the clock
CHOP.

2
00:00:03,600 –> 00:00:13,500
The clock CHOP can help you keep
track of time, and manage time,
and it has a large set of
parameters to help you do this.

3
00:00:13,500 –> 00:00:18,833
In this example I’ve set the
hour format to a 12 hour format.

4
00:00:18,833 –> 00:00:30,300
We’re going to use the clock
data to create a simple clock
display, by using a very complex
looking single line Python
expression.

5
00:00:30,300 –> 00:00:37,800
The 3 channels we are interested
in are “ampm”, “hour”, and
“min”.

6
00:00:37,800 –> 00:00:45,067
I’ve broken the contents of the
Python expression into segments
here in a text DAT.

7
00:00:45,067 –> 00:00:53,233
This is a good way to see the
difference between a multi line
and a single line Python
snippet.

8
00:00:53,233 –> 00:01:05,700
The Python code used in the text
TOP parameter named “text” has
exactly the same purpose and
output as the multi line code.

9
00:01:05,700 –> 00:01:12,267
To see the effect of the multi
line code, let’s start by
opening the textport.

10
00:01:12,267 –> 00:01:17,133
We can press the clear button to
reset the contents the textport.

11
00:01:17,133 –> 00:01:26,767
We middle mouse click over the
text DAT to pull up the context
menu, then select “Run Script”.

12
00:01:26,767 –> 00:01:28,100

13
00:01:28,100 –> 00:01:38,167
The second example network
illustrates a way to use the
clock CHOP to keep track of
Touch Designer specific timings.

14
00:01:38,167 –> 00:01:45,033
I select the “Since Program
Start” option of the Start
Reference parameter.

15
00:01:45,033 –> 00:01:51,333
The select CHOP allows us to use
only the channel we need, in
this case seconds.

16
00:01:51,333 –> 00:01:57,333
We will create an event that
happens every 10 seconds in
Touch Designer.

17
00:01:57,333 –> 00:02:08,500
I use the math CHOP to divide
the incoming seconds value by
10, then turn the resulting
floating point number into an
integer.

18
00:02:08,500 –> 00:02:16,133
We now have a count of every
tenth second that has elapsed
since Touch Designer started.

19
00:02:16,133 –> 00:02:27,733
Now I use a chop execute DAT to
create a customized event that
will run every time the math
CHOP changes.

20
00:02:27,733 –> 00:02:40,533
In this case, every 10th second
that has elapsed will cause the
phrase “Time To DO SOMETHING” to
be printed to the textport.

21
00:02:40,533 –> 00:02:41,767

22
00:02:41,767 –> 00:02:49,167
The clock CHOP is a powerful
tool that can help you manage
timing logic in Touch Designer.

23
00:02:49,167 –> 00:02:51,167

Posted In
Tagged