Tag Archives: CHOP

Nov 12 2014

Switch CHOP tutorial.

The Switch CHOP. TouchDesigner 088. 2014.
The Switch CHOP is a fundamental multi-input Channel Operator.

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

2
00:00:03,533 –> 00:00:07,400
The switch CHOP is a commonly
used operator.

3
00:00:07,400 –> 00:00:11,767
It allows for the switching of
any different type of CHOP.

4
00:00:11,767 –> 00:00:15,567
It has a minimal set of
parameters.

5
00:00:15,567 –> 00:00:20,633
Its inputs are indexed starting
with 0.

6
00:00:20,633 –> 00:00:27,133
Index entries that are higher
than the number of inputs are
ignored.

7
00:00:27,133 –> 00:00:33,667
Fractional entries are rounded
down to the closest integer.

8
00:00:33,667 –> 00:00:39,000
Here I use the index .5, which
rounds down to 0.

9
00:00:39,000 –> 00:00:45,967
I’ve built this network to
further illustrate the concept
of channels and samples.

10
00:00:45,967 –> 00:00:57,767
We have a circle TOP whose R, G,
and B parameters are set to
evaluate the 20th sample of the
switch CHOP.

11
00:00:57,767 –> 00:01:07,767
CHOPs can hold any arbitrary
number of channels, and each
channel can hold any arbitrary
number of samples.

12
00:01:07,767 –> 00:01:15,267
Therefore, the switch CHOP will
hold the exact number of
incoming channels and samples.

13
00:01:15,267 –> 00:01:22,800
I’ll change the Python
expression to evaluate only the
1st sample of the switch CHOP.

14
00:01:22,800 –> 00:01:27,700
When the index set to 0, we
select the 1st input.

15
00:01:27,700 –> 00:01:30,533
It only has 1 sample.

16
00:01:30,533 –> 00:01:35,200
Index 1 will select the 2nd
input.

17
00:01:35,200 –> 00:01:42,533
We can middle mouse click on the
CHOP to determine how many
samples it holds.

18
00:01:42,533 –> 00:01:51,900
It has 600 samples, and we are
evaluating only the 1st, in this
case a value of 0.

19
00:01:51,900 –> 00:01:58,500
The 3rd CHOP has sixty samples,
also starting with a value of 0.

20
00:01:58,500 –> 00:02:05,233
I’ll set the Python expression
to evaluate the 500th sample.

21
00:02:05,233 –> 00:02:12,733
Since only the 2nd input to the
switch CHOP has at least 500
samples,

22
00:02:12,733 –> 00:02:20,667
the Python expression will give
us the last available sample
from the other inputs.

23
00:02:20,667 –> 00:02:29,767
Input 1 has only 1 sample,
therefore the Python expression
evaluates to the value .5.

24
00:02:29,767 –> 00:02:34,567
But what about the 3rd input,
index 2?

25
00:02:34,567 –> 00:02:41,600
Shouldn’t it evaluate to a value
of 0, which is the value of the
last sample?

26
00:02:41,600 –> 00:02:45,567
We should have a black circle,
but it’s grey.

27
00:02:45,567 –> 00:02:54,200
Touch Designer gives us the
ability to change the way
out-of-range samples are
evaluated.

28
00:02:54,200 –> 00:03:01,067
I’ll change the “Extend Left”
and “Extend Right” parameters to
“Hold”.

29
00:03:01,067 –> 00:03:08,400
Imagine now a straight line
instead of a repeating cycle of
sample values.

30
00:03:08,400 –> 00:03:10,400
Now the 500th sample evaluates
to 0, which is the last actual
sample value in the 3rd input.

Nov 12 2014

Join CHOP tutorial.

The Join CHOP. TouchDesigner 088. 2014.
The Join CHOP can append multiple types of incoming channel datatypes. This allows you to sculpt or craft specialty waveforms.

1
00:00:00,800 –> 00:00:04,367
Let’s examine the join CHOP.

2
00:00:04,367 –> 00:00:12,533
I’ve set up 3 example networks
here, each network illustrates
different approaches to using
the join CHOP.

3
00:00:12,533 –> 00:00:17,500
In this network we will append 3
CHOPs together.

4
00:00:17,500 –> 00:00:24,367
We start with the ramp from 0 to
1, and end with a ramp from 1 to
0.

5
00:00:24,367 –> 00:00:27,667
In the middle we have a noise
CHOP.

6
00:00:27,667 –> 00:00:33,900
As you can see, the join CHOP
will stack one CHOP after the
next.

7
00:00:33,900 –> 00:00:44,800
Using the “Preserve Length”
method, with no blending or
overlap interpolation, the CHOPs
are simply appended together.

8
00:00:44,800 –> 00:00:51,767
We can better visualize the join
by changing the seed parameter
of the noise CHOP.

9
00:00:51,767 –> 00:01:00,767
By maintaining an overlap region
of 0, any overlap shape
parameter I choose has no
effect.

10
00:01:00,767 –> 00:01:02,967

11
00:01:02,967 –> 00:01:12,700
In the second example network,
we’ll look at the “Insert Blend
Region” option of the method
parameter.

12
00:01:12,700 –> 00:01:21,400
We join 3 chops with single
sample values of 0, 1, and .5.

13
00:01:21,400 –> 00:01:31,033
We can see that the join CHOP
has interpolated a simple ramp
between the incoming values.

14
00:01:31,033 –> 00:01:40,967
By using the “Insert Blend
Region” method, we can define an
overlap region between each
incoming value.

15
00:01:40,967 –> 00:01:47,567
We can also control the shape of
the overlap blend.

16
00:01:47,567 –> 00:01:59,767
As I increase the overlap
region, you’ll see that the join
CHOP creates a smoother and
smoother interpolation between
the incoming values.

17
00:01:59,767 –> 00:02:06,600
It does this by creating more
samples than the total of the
original inputs.

18
00:02:06,600 –> 00:02:16,533
It uses the extra samples to
create more fine tuned steps
between the original inputs.

19
00:02:16,533 –> 00:02:26,533
In this example we’ll use the
“Overlap Sequences” method to
join the to incoming waveforms.

20
00:02:26,533 –> 00:02:41,500
We’ll join a triangle and a sine
wave, and you’ll notice that
there is a disparity in the end
value of input 1, and the start
value of input 2.

21
00:02:41,500 –> 00:02:49,033
We want to interpolate between
these 2 values, to create a
smooth join.

22
00:02:49,033 –> 00:02:57,067
This is similar to adjusting
Bezier handles on keyframes, or
points on a spline.

23
00:02:57,067 –> 00:03:05,367
As I increase the overlap
region, you’ll see the join
become smoother and smoother.

24
00:03:05,367 –> 00:03:11,733
If I use the “Cubic”
interpolation method, I can
shift the bias.

25
00:03:11,733 –> 00:03:20,133
This will determine the
influence that either the first
or second input will have on the
overlap.

26
00:03:20,133 –> 00:03:30,233
The join CHOP parameters are
very powerful, and will allow
you to fine tune your blends to
an exact specification.

27
00:03:30,233 –> 00:03:32,233

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