Nov 12 2014

Evaluate DAT tutorial.

The Evaluate DAT. TouchDesigner 088. 2014.
The Evaluate DAT is an extremely powerful Operator. You can use it to selectively change, replace, or tweak DAT networks. If you have a solid understanding of the Evaluate DAT, you will find more and more uses for it.

1
00:00:00,267 –> 00:00:05,200
Let’s take a look at the
evaluate DAT.

2
00:00:05,200 –> 00:00:12,600
The evaluate DAT can alter the
content of a source table by
using expressions.

3
00:00:12,600 –> 00:00:22,000
The Python expression
“me.inputCell.val” is a
reference to each incoming cell.

4
00:00:22,000 –> 00:00:31,867
The evaluate DAT will examine
the content of every incoming
cell, and assign it to that
variable.

5
00:00:31,867 –> 00:00:40,100
I set the evaluate DAT to output
the result of the expression
evaluation.

6
00:00:40,100 –> 00:00:50,600
The Python expression will
create a string that appends
“hello”, to the input value, to
an exclamation point.

7
00:00:50,600 –> 00:00:59,300
The second example shows how we
can use the evaluate DAT to
perform math functions on the
input values.

8
00:00:59,300 –> 00:01:10,467
We start with a noise CHOP that
creates 60 samples, then use a
chop to DAT to create a table
with 60 rows.

9
00:01:10,467 –> 00:01:20,567
The Python snippet will convert
the input cell value to a
floating point number, then
multiply that by PI.

10
00:01:20,567 –> 00:01:29,833
The next example shows the
ability of the evaluate DAT to
process multiple rows and
columns simultaneously.

11
00:01:29,833 –> 00:01:35,300
The second input is now a table
with 2 columns, not 1.

12
00:01:35,300 –> 00:01:46,333
The first cell uses the Python
expression “me.inputCell.row”,
to extract the index of the row
being processed.

13
00:01:46,333 –> 00:01:58,933
In this example, we start with a
table that has entries that need
to maintain their order, but
they need to be assigned new
identification indices in proper
sequence.

14
00:01:58,933 –> 00:02:03,933
We use the row index to create
that new sequence.

15
00:02:03,933 –> 00:02:11,633
The last example shows how the
evaluate DAT can create new
entries in a table.

16
00:02:11,633 –> 00:02:17,833
Here, the second input is a
table of 2 rows and 4 columns.

17
00:02:17,833 –> 00:02:25,600
We want to re-sequence the ID
indices, keep the NAME column,
keep the AGE column,

18
00:02:25,600 –> 00:02:34,533
and then finally, use the AGE
column to calculate new values
for the AGE_in_days column.

19
00:02:34,533 –> 00:02:35,933

20
00:02:35,933 –> 00:02:47,100
When we simply use the
“me.inputCell.val” expression,
the evaluate DAT will leave the
input values unchanged.

21
00:02:47,100 –> 00:02:57,867
For the IDs, since we start
evaluating on row 1, we need to
subtract 1, so that we start
with index 0.

22
00:02:57,867 –> 00:03:02,000
The next 2 columns remain
unchanged.

23
00:03:02,000 –> 00:03:14,800
For the last column, we use the
expression “me.inputCell.offset”
to evaluate a specific offset
from the current cell.

24
00:03:14,800 –> 00:03:27,200
In this case, we want to look at
the column to the left, or
behind the current cell, and use
that value as the basis for the
rest of the math function.

25
00:03:27,200 –> 00:03:29,200

Posted In
Tagged