Tag Archives: switch

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

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

Switch TOP tutorial.

The Switch TOP. TouchDesigner 088. 2014.
The Switch TOP allows you to control image flow in TOP networks.

1
00:00:00,467 –> 00:00:02,733
Let’s examine the switch TOP.

2
00:00:02,733 –> 00:00:13,667
The switch TOP is a simple
operator, but it can help you
understand concepts that are
essential to the Touch Designer
2D workflow.

3
00:00:13,667 –> 00:00:24,200
In this network, the swith TOP
has 3 inputs, and I’m using a
slider to change the index
parameter of the switch TOP.

4
00:00:24,200 –> 00:00:30,100
By default the slider outputs of
floating point range of 0 to 1.

5
00:00:30,100 –> 00:00:35,567
We use a math CHOP to re-range
the values from 0 to 2.

6
00:00:35,567 –> 00:00:46,967
The TOP named “moviein1” is
index 0, “moviein2” is index 1,
“moviein3” is index 2.

7
00:00:46,967 –> 00:00:48,667

8
00:00:48,667 –> 00:00:54,467
We’ll use a Python expression to
reference the re-ranged slider
values.

9
00:00:54,467 –> 00:00:55,800

10
00:00:55,800 –> 00:01:06,800
We click the “viewer active”
button on the null CHOP, then
drag the channel name to the
index parameter of the switch
TOP.

11
00:01:06,800 –> 00:01:10,833
We could also type the Python
expression by hand.

12
00:01:10,833 –> 00:01:14,967
Lets look at the “Blend between
inputs” parameter.

13
00:01:14,967 –> 00:01:21,633
Without blending, the switch TOP
changes between inputs in
discreet steps.

14
00:01:21,633 –> 00:01:31,400
Its important to realize that in
some situations, blending can
increase operational overhead,
and slow down Touch Designer.

15
00:01:31,400 –> 00:01:42,667
I’ll turn blending back on, and
we’ll examine how the switch TOP
deals with discrepancies in
image sizes.

16
00:01:42,667 –> 00:01:49,733
We can middle mouse click on any
operator in Touch Designer to
display an information popup.

17
00:01:49,733 –> 00:02:04,033
The image size of “moviein1” is
800 by 450, “moviein2” is 512 by
512, and “moviein3” is 1600 by
900.

18
00:02:04,033 –> 00:02:08,767
I’ll change to switch TOP back
to its default settings.

19
00:02:08,767 –> 00:02:18,167
Under the common tab, we have
two important parameters, the
output resolution and the output
aspect.

20
00:02:18,167 –> 00:02:19,500

21
00:02:19,500 –> 00:02:31,200
As I switch between inputs, we
see the switch TOP changes its
resolution and aspect to match
the incoming operator.

22
00:02:31,200 –> 00:02:46,867
If I enable blending, we see
that even though there is a
smooth transition between the
input images, the resolution and
aspect of the switch TOP still
jumps in discrete steps.

23
00:02:46,867 –> 00:02:55,167
In cases where all the input
images are the same size, this
is obviously not a problem.

24
00:02:55,167 –> 00:02:56,967

25
00:02:56,967 –> 00:03:04,633
We can override this behavior by
adjusting the output resolution
and aspect parameters.

26
00:03:04,633 –> 00:03:08,333
I’ll change the resolution to a
custom size.

27
00:03:08,333 –> 00:03:14,800
We can choose between some
standard options, or create any
resolution we like.

28
00:03:14,800 –> 00:03:16,033

29
00:03:16,033 –> 00:03:22,100
Now, I change the “Output
Aspect” parameter to
“Resolution”.

30
00:03:22,100 –> 00:03:26,867
This matches the aspect to our
new custom resolution

31
00:03:26,867 –> 00:03:28,700

32
00:03:28,700 –> 00:03:36,067
Now we can switch between inputs
of varying sizes without jumps
in resolution.

33
00:03:36,067 –> 00:03:38,067