Tag Archives: CHOP

Nov 13 2014

Filter CHOP tutorial.

The filter CHOP. TouchDesigner 088. 2014.
The Filter CHOP can help you smooth, affect, or otherwise adjust incoming channel data.

1
00:00:00,567 –> 00:00:03,900
Let’s take a look at the filter
CHOP.

2
00:00:03,900 –> 00:00:10,000
The filter CHOP can smooth, or
sharpen, the incoming chop data.

3
00:00:10,000 –> 00:00:22,533
This sample network merges
unfiltered and filtered CHOP
data, so you can easily
visualize a side-by-side
comparison.

4
00:00:22,533 –> 00:00:33,533
The filter CHOP has 2 very
important parameters, the
“Effect” and “Filter Width”
parameters.

5
00:00:33,533 –> 00:00:36,567
We start with a noise CHOP.

6
00:00:36,567 –> 00:00:44,533
We can create different types of
animating noise, and see the
effects of filtering.

7
00:00:44,533 –> 00:00:50,133
The merge CHOP combines the
filtered and unfiltered data.

8
00:00:50,133 –> 00:00:54,467
The yellow line is the raw data.

9
00:00:54,467 –> 00:01:03,500
I’ll right click on the merge
CHOP, and choose “View” from the
pop-up menu.

10
00:01:03,500 –> 00:01:14,533
This is one of several methods
you can use to simultaneously
monitor different regions of the
Touch Designer workspace.

11
00:01:14,533 –> 00:01:19,767
I’ll adjust some of the noise
CHOP’s parameters.

12
00:01:19,767 –> 00:01:29,533
There are 7 types of filters,
and it is worth investigating
the effects each has on incoming
data.

13
00:01:29,533 –> 00:01:36,967
Some filter and width
combinations introduce more
delay than others.

14
00:01:36,967 –> 00:01:43,967
An “Effect” setting of zero
eliminates filter processing
altogether.

15
00:01:43,967 –> 00:01:55,433
Increasing the “Filter Width”
parameter causes more of the
surrounding sample range to be
included in the filter
calculation.

16
00:01:55,433 –> 00:02:05,133
Each application of the filter
chop may require a different
fine tuning of filter types and
parameters.

17
00:02:05,133 –> 00:02:15,900
Some applications may be
extremely accuracy or time
sensitive, while others may not.

18
00:02:15,900 –> 00:02:23,767
You can sharpen incoming data
that may be too smooth, to
create a greater value range.

19
00:02:23,767 –> 00:02:30,467
You can also de-spike incoming
data such as harsh audio spikes.

20
00:02:30,467 –> 00:02:32,467
The filter CHOP is very
powerful, and almost always
requires fine tuning based on
the specific application.

Nov 13 2014

EXECUTE DATs tutorial.

The EXECUTE DATs. TouchDesigner 088. 2014.
The EXECUTE DATs are a family of Operators that can run scripts on TouchDesigner events. These are the most powerful group of DATs, and are used extensively in building interactive networks. This is a special tutorial covering 6 DATs.

1
00:00:00,333 –> 00:00:06,267
This tutorial will focus on the
family of execute DATs.

2
00:00:06,267 –> 00:00:13,267
6 DATs that run scripts when
specific events happen in Touch
Designer.

3
00:00:13,267 –> 00:00:20,300
I built 6 example networks,
let’s start with the execute
DAT.

4
00:00:20,300 –> 00:00:27,267
The execute DAT can respond to 6
possible events, or processes.

5
00:00:27,267 –> 00:00:42,900
In order to work, the execute
DAT must have a Python script,
or snippet, within the targeted
Python method, as well as its
corresponding toggle enabled in
the parameters panel.

6
00:00:42,900 –> 00:00:55,100
This example creates 3 actions,
1 on frame start, 1 on frame
end, and 1 when the play state
changes.

7
00:00:55,100 –> 00:00:59,300
I’ve inserted a line into the
“frameStart” method.

8
00:00:59,300 –> 00:01:06,400
It fills the cell in row index
1, and column index 1, with the
frame number.

9
00:01:06,400 –> 00:01:11,133
We fill the next cell with the
frame number on frame end.

10
00:01:11,133 –> 00:01:18,333
The “playState” method has some
simple logic that alerts us to
the play head state.

11
00:01:18,333 –> 00:01:34,833
The execute DAT is commonly used
to monitor Touch Designer
processes, or, by using the
“start” method, to create setup
routines that prepare a network
when the program is launched.

12
00:01:34,833 –> 00:01:42,867
I often use the “exit” method to
perform clean up when Touch
Designer exits.

13
00:01:42,867 –> 00:01:48,500
Next let’s look at the chop
execute DAT.

14
00:01:48,500 –> 00:01:53,133
This operator is extremely
powerful and useful.

15
00:01:53,133 –> 00:02:06,333
It provides a simple framework
for you to convert CHOP
processes, to analyze CHOP
behaviors, and to build logic
based on CHOP events.

16
00:02:06,333 –> 00:02:11,767
You must first provide the DAT
with a reference CHOP.

17
00:02:11,767 –> 00:02:14,567
This is the CHOP that will be
monitored.

18
00:02:14,567 –> 00:02:23,867
You can toggle the “Active”
parameter to start or stop the
DAT’s execution.

19
00:02:23,867 –> 00:02:29,500
There are 5 methods that
correspond to CHOP events.

20
00:02:29,500 –> 00:02:41,300
It’s very important to realize
that ON is defined as any value
greater than 0, and OFF is
defined as 0.

21
00:02:41,300 –> 00:03:01,000
I’ve built some Python snippets
to showcase some simple ON/OFF
state logic, and I’ve used the
“valueChange” method to fill a
table cell with the evaluation
of the beat CHOP’s first
channel.

22
00:03:01,000 –> 00:03:14,400
This setup can help you
visualize the nature of OFF/ON
state logic, and help you
understand the options you have
for designing CHOP execution
timing.

23
00:03:14,400 –> 00:03:18,033
Next we’ll look at the dat
execute DAT.

24
00:03:18,033 –> 00:03:24,967
This operator and workflow is
very similar to that of the CHOP
execute DAT.

25
00:03:24,967 –> 00:03:30,433
Here I’ve built a representation
of a common Touch Designer
network.

26
00:03:30,433 –> 00:03:37,167
The end result is a table that
changes dynamically based on
user input.

27
00:03:37,167 –> 00:03:46,200
The dat execute DAT monitors
this table, and outputs data
based on the table’s state.

28
00:03:46,200 –> 00:03:51,233
There are 5 possible methods, or
states, we can monitor.

29
00:03:51,233 –> 00:04:05,667
The size and shape of the table
will change based on user
activity, and we can use this
activity to trigger any other
sort of logic in Touch Designer.

30
00:04:05,667 –> 00:04:18,833
Touch Designer has several
powerful methods for each
operator, including the table
DAT, that can help you modify or
access information about that
DAT.

31
00:04:18,833 –> 00:04:30,667
Here, I’ve used the “numRows”
and “numCols” members of the
table DAT class, to report the
size and shape of the table.

32
00:04:30,667 –> 00:04:42,667
I designed this network as a way
to illustrate a technique for
changing a TOP into a CHOP, then
into a DAT.

33
00:04:42,667 –> 00:04:54,833
By using the button, we can add
a colored cell to the table, and
by using the sliders, we can
alter the shape of the table.

34
00:04:54,833 –> 00:05:03,433
Notice how the dat execute DAT
creates a response to the
table’s changing shape.

35
00:05:03,433 –> 00:05:19,967
Keep in mind, the logic I’ve
written for the changing cell
method does not report the cell
ID, but only keeps track of the
fact that an unknown cell has
changed.

36
00:05:19,967 –> 00:05:26,533
You can use this network as a
basis for creating more
sophisticated logic.

37
00:05:26,533 –> 00:05:41,233
For example, you could restrict
user input to certain
specifications, or create
triggers that execute other
behaviors based on certain
criteria.

38
00:05:41,233 –> 00:05:45,200
Let’s take a look at the op
execute DAT.

39
00:05:45,200 –> 00:05:51,833
This DAT is more generic than
the chop or dat execute DATs.

40
00:05:51,833 –> 00:05:56,467
It can monitor any operator,
including TOPs.

41
00:05:56,467 –> 00:06:02,667
It is a common practice to
change Touch Designer networks
dynamically.

42
00:06:02,667 –> 00:06:11,300
Using an op execute DAT is a
good way to keep track of
changes to Touch Designer
networks.

43
00:06:11,300 –> 00:06:19,067
I’m using an info CHOP to report
information about the blur TOP.

44
00:06:19,067 –> 00:06:23,633
The info CHOP is an extremely
important operator.

45
00:06:23,633 –> 00:06:33,000
It’s used very commonly in Touch
Designer, and it’s a great
companion to the op execute DAT.

46
00:06:33,000 –> 00:06:49,633
I’m using the info CHOP to
report the number of times the
blur TOP has cooked, and I’m
using the op execute DAT to
report when that state changes.

47
00:06:49,633 –> 00:06:53,867
The op execute DAT can monitor
flag states.

48
00:06:53,867 –> 00:06:58,733
Flags are the buttons running
down the left side of an
operator.

49
00:06:58,733 –> 00:07:06,233
Bypass is a commonly used flag;
it will stop an operator from
cooking.

50
00:07:06,233 –> 00:07:14,267
Remember, in order to work
properly, the op execute DAT
must have an operator to
monitor.

51
00:07:14,267 –> 00:07:26,133
In this case the blur TOP, and
the methods we wish to employ
must have their corresponding
toggle enabled in the parameters
panel.

52
00:07:26,133 –> 00:07:33,167
The “wireChange” method lets us
monitor the inputs and outputs
of any operator.

53
00:07:33,167 –> 00:07:42,333
When we change the blur TOP’s
input, we see the op execute DAT
can report this change.

54
00:07:42,333 –> 00:07:49,667
We see that still images don’t
cook unless forced to, and
movies cook every frame.

55
00:07:49,667 –> 00:07:55,067
We can also see the effect of
enabling the bypass flag.

56
00:07:55,067 –> 00:07:59,067
Now let’s look at the panel
execute DAT.

57
00:07:59,067 –> 00:08:06,433
The panel execute DAT is similar
to the chop execute DAT, but it
monitors panels.

58
00:08:06,433 –> 00:08:16,333
Panels are a special type of
component, they are used to
create customized interactive
controls.

59
00:08:16,333 –> 00:08:22,367
They are often used to create
user interface elements.

60
00:08:22,367 –> 00:08:31,867
Here, I’m monitoring a field
panel. A field panel allows
users to type text strings into
a field.

61
00:08:31,867 –> 00:08:37,267
The panel execute DAT has a
parameter named “Panel Value”.

62
00:08:37,267 –> 00:08:45,400
By clicking the arrow button to
the right, we can see a list of
all the available values the
panel offers.

63
00:08:45,400 –> 00:08:55,867
I’ve added a panel CHOP, which
also monitors the field panel,
to show you some of the values
that are interactively
monitored.

64
00:08:55,867 –> 00:09:02,800
Panels are accessed under the
components tab of the OP create
dialogue.

65
00:09:02,800 –> 00:09:16,500
Similar to the chop execute DAT,
the value of 0 or NULL equates
to OFF, and anything other than
0 equates to ON.

66
00:09:16,500 –> 00:09:23,533
I’m using using a special Python
snippet to reference the value
of the text string in the field.

67
00:09:23,533 –> 00:09:31,367
The operator it references is
the “out1” DAT, located inside
the field component.

68
00:09:31,367 –> 00:09:48,600
When I type new text into the
field, you’ll see the results
are monitored by the panel
execute DAT, and the changes are
processed by the various 5
methods employed by the DAT.

69
00:09:48,600 –> 00:09:58,200
If I change the value in text
field to 0, you’ll see that we
get a report that the field is
currently OFF.

70
00:09:58,200 –> 00:10:04,967
I change the value to 1, and the
field state is reported as ON.

71
00:10:04,967 –> 00:10:20,867
This technique is extremely
useful in building user
interfaces, where user actions
need to be closely monitored,
and can trigger resulting
animations or logic actions.

72
00:10:20,867 –> 00:10:27,400
The parameter execute DAT
monitors an operator’s
parameters.

73
00:10:27,400 –> 00:10:35,267
I’ve wired 2 constant CHOPs to a
switch CHOP, and we’ll monitor
the switch.

74
00:10:35,267 –> 00:10:46,400
The switch CHOP has 2 parameters
we are interested in monitoring:
the “index” parameter and the
“indexfirst” parameter.

75
00:10:46,400 –> 00:10:59,300
The parameters we wish to
monitor must be entered by name
in the parameter named
“Parameter” in the parameter
execute DAT.

76
00:10:59,300 –> 00:11:05,100
It’s a bit confusing, yes, but
very logical and powerful.

77
00:11:05,100 –> 00:11:16,633
You can always find the actual
name of the parameter by
hovering your mouse over the
entry in the parameter panel.

78
00:11:16,633 –> 00:11:30,633
The setup for this example is
similar to the previous
examples, but since we are
monitoring and accessing
parameters, pay attention to the
Python snippets I’ve used.

79
00:11:30,633 –> 00:11:40,533
The Python object named “par” is
used to access a parameter,
followed by the parameter’s
name.

80
00:11:40,533 –> 00:11:53,200
It’s important to understand the
underlying architecture and
difference between, a CHOP’s
parameters, and its channel
values.

81
00:11:53,200 –> 00:11:58,200
This example is designed to help
you see that difference.

82
00:11:58,200 –> 00:12:10,533
We can use Python expressions to
drive the “Index” parameter of
the switch CHOP, or we can use a
constant, which is an integer or
a float.

83
00:12:10,533 –> 00:12:21,200
The parameter execute DAT can
monitor the state of the “Index”
parameter, and tell us what
method we are currently using.

84
00:12:21,200 –> 00:12:34,900
If we are using expressions, we
can access the value of that
expression as an evaluation, or,
we can access the Python snippet
itself as a string.

85
00:12:34,900 –> 00:12:36,900
Since we are monitoring the
parameter named “inputfirst”, we
can also tell whether or not
that parameter is enabled.

Nov 12 2014

Cycle CHOP tutorial.

The Cycle CHOP. TouchDesigner 088. 2014.
The Cycle CHOP allows you to create customized behaviors for out-of-range Channel Operator values. It can help you design loop cycles from input sources with mismatched heads and tails.

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

2
00:00:03,333 –> 00:00:09,767
The cycle CHOP creates cycles,
or repetitions, of incoming CHOP
data.

3
00:00:09,767 –> 00:00:15,633
I’ve built 2 example networks,
let’s take a look at the first.

4
00:00:15,633 –> 00:00:23,333
If a CHOP channel contains many
samples, the first and last
sample value may not always
match.

5
00:00:23,333 –> 00:00:30,033
The cycle CHOP can create a
seamless blend, so the CHOP
loops smoothly.

6
00:00:30,033 –> 00:00:40,567
I’m animating a circle, using a
noise CHOP as a constraint, and
using feedback to visualize its
path over time.

7
00:00:40,567 –> 00:00:48,567
You can see the circle follows
the path defined by the sample
values of the noise CHOP.

8
00:00:48,567 –> 00:00:57,667
The start and end values are
very different, so we get a gap
in the in and out loop points.

9
00:00:57,667 –> 00:01:06,600
We can use a cycle CHOP to force
the start and end values to
match, creating a seamless loop.

10
00:01:06,600 –> 00:01:14,033
Notice I’m not creating any
extra cycles, we’ll examine that
feature next.

11
00:01:14,033 –> 00:01:27,800
I changed the blend region from
0 to 1 second, which pushes the
start value towards the end
value, and the end value towards
the start value.

12
00:01:27,800 –> 00:01:34,533
When I turn off the blend
region, you can see the loop
points are mismatched.

13
00:01:34,533 –> 00:01:45,833
You can use the cycle CHOP to
sculpt incoming channel data,
making it more or less suited
for smooth looping.

14
00:01:45,833 –> 00:01:52,433
Now let’s take a look at how we
can use the cycle CHOP to create
loops.

15
00:01:52,433 –> 00:02:01,533
We start with a wave CHOP and a
noise CHOP, and feed those two
into a cross CHOP.

16
00:02:01,533 –> 00:02:07,233
I set the cycle CHOP to loop the
incoming channel data twice.

17
00:02:07,233 –> 00:02:16,633
The cycle CHOP can create loops
both before and after the
initial range of incoming sample
data.

18
00:02:16,633 –> 00:02:28,400
When using the “Mirror”
parameter, remember that the
incoming samples are not
mirrored, only the new cycles
that are created by the cycle
CHOP.

19
00:02:28,400 –> 00:02:41,800
By combining CHOPs using
operators like the cross and
cycle CHOPs, you can create
waveforms that are very exotic
and original.

20
00:02:41,800 –> 00:02:48,733
You can use these waveforms to
drive animations of all types in
Touch Designer.

21
00:02:48,733 –> 00:02:53,833
Notice the incoming CHOP has
only 60 samples.

22
00:02:53,833 –> 00:02:59,800
When we create new cycles, we
extend the sample range of the
CHOP.

23
00:02:59,800 –> 00:03:01,800
As I add new cycles, the sample
range grows accordingly.

Posted In
Tagged
Nov 12 2014

Cross CHOP tutorial.

The Cross CHOP. TouchDesigner 088. 2014.
The Cross CHOP is a multi-input Channel Operator that allows you to interpolate between input values.

1
00:00:00,200 –> 00:00:03,067
Let’s examine the cross CHOP.

2
00:00:03,067 –> 00:00:12,900
The cross CHOP allows you to
switch between multiple inputs,
but interpolate between the
incoming values.

3
00:00:12,900 –> 00:00:20,167
You can use integers as cross
values to simply switch between
inputs.

4
00:00:20,167 –> 00:00:31,133
I’ve created a box SOP with its
“sizex” parameter referencing
the cross CHOP channel named
“chan1”.

5
00:00:31,133 –> 00:00:35,733
This will help you visualize the
cross CHOPs’ effect.

6
00:00:35,733 –> 00:00:49,367
The interpolation is straight,
or linear, so a cross value of
.5 will blend the first 2 inputs
at 50% each.

7
00:00:49,367 –> 00:00:51,367
The cross CHOP is a commonly
used operator that can
compliment or replace standard
switching.

Nov 12 2014

Sequencer CHOP tutorial.

The Sequencer CHOP. TouchDesigner 088. 2014.
The Sequencer CHOP allows you to create complex animation sequences. This is a specialized Channel Operator, and it can be difficult to master.

1
00:00:00,833 –> 00:00:05,133
Let’s examine the sequencer
CHOP.

2
00:00:05,133 –> 00:00:16,067
The sequencer CHOP is an
operator that allows you to
create and control complex
animation sequences.

3
00:00:16,067 –> 00:00:24,400
The sequences are held in CHOPs,
and referenced by a table DAT.

4
00:00:24,400 –> 00:00:33,633
Each CHOP can represent a simple
animation state, or a complex
animation.

5
00:00:33,633 –> 00:00:43,467
In this network I’ve built a
series of 5 animations that
control a character.

6
00:00:43,467 –> 00:00:51,433
The character is a simple face
with 5 possible animatable
features.

7
00:00:51,433 –> 00:01:02,733
We can animate the eyes and the
mouth, with simple values for
rotation, position, and scale.

8
00:01:02,733 –> 00:01:12,567
Each of the 5 constant CHOPs
holds 5 animation states for
each facial feature.

9
00:01:12,567 –> 00:01:24,333
The sequencer CHOP gives us the
ability to dynamically choose
any state we want, and blend
them together over time.

10
00:01:24,333 –> 00:01:31,367
We can combine static, or still
states, with complex animations.

11
00:01:31,367 –> 00:01:41,033
The face character is a network
of TOPs and SOPs that lives
inside a container component.

12
00:01:41,033 –> 00:01:45,400
I’ve built a mouth from a line
SOP.

13
00:01:45,400 –> 00:01:55,967
We can animate the 3 points on
the line: 2 for the left and
right side, and 1 for the
middle.

14
00:01:55,967 –> 00:02:01,000
The eyes are constructed from a
rectangle TOP.

15
00:02:01,000 –> 00:02:11,067
We vary the rotation and scale
of the rectangle to create
expressive animations.

16
00:02:11,067 –> 00:02:18,633
I won’t go into detailed
explanation of this network, you
can explore it on your own.

17
00:02:18,633 –> 00:02:33,200
The most important note is that
I use Python expressions to
reference the values stored in
the constant CHOPs above this
container.

18
00:02:33,200 –> 00:02:46,100
These values are the rotation,
position, and scale values that
drive the facial animation.

19
00:02:46,100 –> 00:02:56,000
Now that we’ve seen how the face
is constructed, let’s look again
at the complete network.

20
00:02:56,000 –> 00:03:03,967
The sequencer CHOP is now
referencing the constant CHOP
named “BASE”.

21
00:03:03,967 –> 00:03:14,000
I can adjust the values of the
base animation state, and see
the results applied to the face
character.

22
00:03:14,000 –> 00:03:22,500
By doing this, you will realize
that to create a new animation
state is a simple matter.

23
00:03:22,500 –> 00:03:35,167
You can copy the “BASE”
operator, add it to the
sequence, and adjust the
parameters to create a new
facial expression.

24
00:03:35,167 –> 00:03:42,100
This is the method I used to
create the following 4 animation
states.

25
00:03:42,100 –> 00:03:54,067
The last animation is here to
showcase the ability of the
sequencer CHOP to combine static
states with complex animations.

26
00:03:54,067 –> 00:03:58,933
I created this animation from 5
noise CHOPs.

27
00:03:58,933 –> 00:04:07,167
Each will generate random
states, over time, for each of
the 5 facial features.

28
00:04:07,167 –> 00:04:19,233
For this, or any animation, to
work properly with the sequencer
CHOP, you need to pay close
attention to how your channels
are named.

29
00:04:19,233 –> 00:04:26,367
I’m using 2 Python scripts to
control the sequencer CHOP.

30
00:04:26,367 –> 00:04:40,767
The logic is simple: 1st, copy
the contents of the table DAT
named “felipeSequence” to the
DAT named “sequencer1_sequence”.

31
00:04:40,767 –> 00:04:51,333
The reason we use a custom table
to create our sequence will
become apparent in a moment.

32
00:04:51,333 –> 00:04:54,800
Next, we reset the sequencer
CHOP.

33
00:04:54,800 –> 00:05:06,800
This forces the sequencer to
load the 1st entry in the table
DAT, which in turn, points to
the 1st animation CHOP.

34
00:05:06,800 –> 00:05:10,833
Now, our sequence is loaded and
ready.

35
00:05:10,833 –> 00:05:17,567
This script simply tells the
sequencer CHOP to step to the
next sequence.

36
00:05:17,567 –> 00:05:20,533
Now let’s step through some
animations.

37
00:05:20,533 –> 00:05:24,167
Pay attention to the sequencer’s
table DAT.

38
00:05:24,167 –> 00:05:32,200
You’ll see that at the end of
each sequence, the row
containing that sequence is
deleted.

39
00:05:32,200 –> 00:05:36,533
The second row of the table DAT
is never deleted.

40
00:05:36,533 –> 00:05:41,833
That’s why I use it to store a
base animation state.

41
00:05:41,833 –> 00:05:46,267
Let’s step through the entire
process again.

42
00:05:46,267 –> 00:05:50,000
I run the “LOAD_SEQUENCE”
script.

43
00:05:50,000 –> 00:05:59,833
This fills the sequence table
with our custom contents, and
resets the sequencer so it’s
ready to play the next
animation.

44
00:05:59,833 –> 00:06:07,800
I’ll make an adjustment here:
the “blendtime” parameter
between the first and second
animations.

45
00:06:07,800 –> 00:06:17,633
I must reset the sequencer, and
you’ll see the change in blend
time when I step to the next
animation.

46
00:06:17,633 –> 00:06:25,100
The sequencer CHOP can play
animations independently of
Touch Designer’s master
timeline.

47
00:06:25,100 –> 00:06:35,133
Therefore, you can use it to
create animations that react to
user input or any other realtime
events.

48
00:06:35,133 –> 00:06:45,400
The sequencer CHOP is a very
powerful tool that requires a
very specific network design to
work properly.

49
00:06:45,400 –> 00:06:47,400
When you master the process of
building these networks, you can
begin to create very amazing
animation effects.