Tag Archives: SOP

Nov 12 2014

Primitive SOP tutorial.

The Primitive SOP. TouchDesigner 088. 2014.
Understanding the basic functions of the Primitive SOP is a crucial part of understanding Surface Operators in TouchDesigner.

1
00:00:00,367 –> 00:00:03,000
Let’s examine the primitive SOP.

2
00:00:03,000 –> 00:00:10,500
In Touch Designer, primitives
are a part of the complex
landscape of geometry types.

3
00:00:10,500 –> 00:00:16,800
In this tutorial, I’ll
concentrate on one familiar
aspect of primitives.

4
00:00:16,800 –> 00:00:22,733
They can be analogous to faces
in other 3D modeling software.

5
00:00:22,733 –> 00:00:31,100
Here we start with a box SOP. We
use an info CHOP to examine some
details.

6
00:00:31,100 –> 00:00:40,300
With these parameter settings,
the box SOP has 6 primitives-
one for each distinct side.

7
00:00:40,300 –> 00:00:46,767
We can access and manipulate
each of these primitives by
using the primitive SOP.

8
00:00:46,767 –> 00:00:54,767
I’ve applied a scale factor of
75% to each of the 6 incoming
primitives.

9
00:00:54,767 –> 00:01:02,767
As I adjust the scale values in
X, Y, and Z, you can see the
effect of the primitive SOP.

10
00:01:02,767 –> 00:01:04,000

11
00:01:04,000 –> 00:01:11,200
In the second example, I use a
geometry component as a “Look
At” target for each primitive.

12
00:01:11,200 –> 00:01:12,867

13
00:01:12,867 –> 00:01:29,600
Each primitive can be
manipulated independently, and
as I move the target geometry in
3D space, you’ll see the
primitives adjust their rotation
to maintain a line of sight to
the target.

14
00:01:29,600 –> 00:01:31,833

15
00:01:31,833 –> 00:01:35,267
Primitives contain points and
vertices.

16
00:01:35,267 –> 00:01:38,667
We can access vertices and
reorder them.

17
00:01:38,667 –> 00:01:44,500
In this example we flip the
vertex normals of each
primitive.

18
00:01:44,500 –> 00:01:46,367

19
00:01:46,367 –> 00:01:52,667
We start by enabling the display
of vertices and normals in the
SOP viewport.

20
00:01:52,667 –> 00:01:54,100

21
00:01:54,100 –> 00:02:01,767
The direction of the pink line
shows the normal, and the
vertices are numbered in order.

22
00:02:01,767 –> 00:02:09,667
In the “Face/ Hull” parameters
tab, we can change the vertex
parameter to “Reverse”.

23
00:02:09,667 –> 00:02:11,000

24
00:02:11,000 –> 00:02:19,667
Now the winding of the vertex
order is reversed, and our
normals point inward instead of
outward.

25
00:02:19,667 –> 00:02:22,433

26
00:02:22,433 –> 00:02:28,933
We can use the primitive SOP to
create amazing geometric
structures.

27
00:02:28,933 –> 00:02:37,967
We can use one object with many
parameterized primitives to
guide the placement of other
objects.

28
00:02:37,967 –> 00:02:48,100
In this example, we place a
conical tube along the normal
every primitive in a sphere SOP.

29
00:02:48,100 –> 00:03:00,500
We start with a sphere, and I’ve
wired info CHOPs to these SOPs
to help us track the progressive
effects of this network.

30
00:03:00,500 –> 00:03:08,700
When we create the initial
sphere, it’s points are welded
together, giving us a grand
total of 92.

31
00:03:08,700 –> 00:03:16,000
The facet SOP will make these
points independent, but maintain
the shape of the primitives.

32
00:03:16,000 –> 00:03:17,267

33
00:03:17,267 –> 00:03:25,833
When we scale each primitive
using this primitive SOP, we see
that each primitive is a
triangle.

34
00:03:25,833 –> 00:03:33,300
Each triangle primitive is
comprised of three points, each
with their own point normal.

35
00:03:33,300 –> 00:03:34,900

36
00:03:34,900 –> 00:03:44,967
What we want to do, is to place
1 normal at the center of each
triangle, averaging the 3 points
down to 1.

37
00:03:44,967 –> 00:03:47,800

38
00:03:47,800 –> 00:03:53,267
The next primitive SOP finishes
what we started with the first
primitive SOP.

39
00:03:53,267 –> 00:03:58,533
We scale the primitives down to
0% their original size.

40
00:03:58,533 –> 00:04:05,767
But, we still have 3 points and
3 normals for each primitive.

41
00:04:05,767 –> 00:04:07,667

42
00:04:07,667 –> 00:04:15,367
We use a facet SOP to weld the 3
points of each primitive back
down to 1.

43
00:04:15,367 –> 00:04:24,500
This is achieved with a
proximity threshold- any points
that are within the range of
closeness will be welded
together.

44
00:04:24,500 –> 00:04:25,767

45
00:04:25,767 –> 00:04:35,800
Finally, we use a copy SOP to
place a copy of the tube SOP at
each of the incoming points.

46
00:04:35,800 –> 00:04:37,433

47
00:04:37,433 –> 00:04:44,967
Now we have created a geometric
structure that would be
difficult to produce using other
methods.

48
00:04:44,967 –> 00:04:50,367
We can of course, alter this
structure anyway we need to.

49
00:04:50,367 –> 00:04:51,667

50
00:04:51,667 –> 00:05:01,667
For example, I’ll bypass the
last facet SOP, and now we have
3 tubes for each incoming
primitive.

51
00:05:01,667 –> 00:05:03,667

Nov 12 2014

Joint SOP tutorial.

The Joint SOP. TouchDesigner 088. 2014.
The Joint SOP is a very specialized Operator, it creates a controllable series of shapes between two Circle SOPs.

1
00:00:00,333 –> 00:00:03,567
Let’s examine the joint SOP.

2
00:00:03,567 –> 00:00:10,067
Before we begin, I’ve included
an important note in this
example network.

3
00:00:10,067 –> 00:00:23,033
By pressing the “viewer active”
button, and hovering over the
SOP window, then pressing the
“H” key, you can center the view
of your geometry.

4
00:00:23,033 –> 00:00:29,533
This is a very important
technique in the Touch Designer
SOP workflow.

5
00:00:29,533 –> 00:00:38,800
We start with a circle SOP and
set its orientation to the ZX
plane.

6
00:00:38,800 –> 00:00:42,400
We then wire the circle to a
transform SOP.

7
00:00:42,400 –> 00:00:48,133
We use the transfrom SOP to
create a positional offset.

8
00:00:48,133 –> 00:00:49,900

9
00:00:49,900 –> 00:00:57,133
I’m animating some parameters
here, so to begin with I’ll turn
those off.

10
00:00:57,133 –> 00:00:58,367

11
00:00:58,367 –> 00:01:05,933
Let’s move the SOP 2 units in
the Y up direction.

12
00:01:05,933 –> 00:01:06,800

13
00:01:06,800 –> 00:01:16,033
I’ll reset the rotation
animation of the SOP, and set
its rotation to 0.

14
00:01:16,033 –> 00:01:17,700

15
00:01:17,700 –> 00:01:31,233
Next, we’ll use a merge SOP to
combine the original circle and
the offset circle into a single
piece of geometry.

16
00:01:31,233 –> 00:01:33,033

17
00:01:33,033 –> 00:01:40,800
This is the basic type of SOP
setup the joint SOP requires to
operate correctly.

18
00:01:40,800 –> 00:01:41,900

19
00:01:41,900 –> 00:01:50,133
The joint SOP will create a
series of circles between the
pair of input circles.

20
00:01:50,133 –> 00:01:55,333
The parameters of the joint SOP
are fairly straightforward.

21
00:01:55,333 –> 00:02:00,133
We can increase or decrease the
number of divisions.

22
00:02:00,133 –> 00:02:01,767

23
00:02:01,767 –> 00:02:09,033
We can also offset the
relationship between the newly
formed circles and the
originals.

24
00:02:09,033 –> 00:02:14,667

25
00:02:14,667 –> 00:02:20,533
I’ve used two noise CHOPs to
animate the offset circle.

26
00:02:20,533 –> 00:02:26,000
One to adjust the position, and
one to adjust the rotation.

27
00:02:26,000 –> 00:02:27,067

28
00:02:27,067 –> 00:02:31,767
I’ve used simple Python
expressions to animate the
noise.

29
00:02:31,767 –> 00:02:41,667
As Touch Designer advances frame
by frame, the channels generated
by the noise CHOP will move
forward in time as well.

30
00:02:41,667 –> 00:02:50,267
By moving the X transform
forward, we sample a constantly
updated range of the noise.

31
00:02:50,267 –> 00:02:53,700
A good analogy is this:

32
00:02:53,700 –> 00:03:00,467
Imagine that you are looking at
a mountain range from the side
window of your car as you drive
forward.

33
00:03:00,467 –> 00:03:10,933
The height of a single point
along the profile of the peaks
and valleys of the range is the
value we apply to the offset
circle.

34
00:03:10,933 –> 00:03:12,600

35
00:03:12,600 –> 00:03:20,100
This animation is reflected in
the generation of the geometry
created by the joint SOP.

36
00:03:20,100 –> 00:03:21,800

37
00:03:21,800 –> 00:03:24,067
Here’s an important note.

38
00:03:24,067 –> 00:03:34,767
The dynamic creation of geometry
can be computationally heavy,
and it can and affect the
performance of Touch Designer.

39
00:03:34,767 –> 00:03:43,633
The more circle divisions I
create with the joint SOP, the
more Touch Designer with slow
down.

40
00:03:43,633 –> 00:03:45,633

Nov 12 2014

Magnet SOP tutorial.

The Magnet SOP. TouchDesigner 088. 2014.
The Magnet SOP can be used to deform Surface Operators. It can be hard to understand and master, but it can help you produce some difficult to achieve effects.

1
00:00:00,400 –> 00:00:03,567
Let’s examine the magnet SOP.

2
00:00:03,567 –> 00:00:15,667
The magnet SOP is an extremely
powerful operator in Touch
Designer, but it can also be
difficult to understand and
implement properly.

3
00:00:15,667 –> 00:00:19,967
A magnet SOP must work in
conjunction a metaball,

4
00:00:19,967 –> 00:00:31,233
and the relationship between the
metaball and the magnet will
determine the nature of the
effect generated by the magnet
SOP.

5
00:00:31,233 –> 00:00:38,100
In this example we will deform a
sphere SOP with a magnet SOP.

6
00:00:38,100 –> 00:00:50,100
The transform parameters of the
metaball SOP are the primary
influences used to drive the
effectiveness of the magnet SOP.

7
00:00:50,100 –> 00:00:57,767
The core operators in this
tutorial network are the sphere,
metaball, and magnet.

8
00:00:57,767 –> 00:01:03,800
The additional operators are
simply for visualization
purposes.

9
00:01:03,800 –> 00:01:16,367
We want to see the effect the
magnet has on the input sphere,
and at the same time, see the
metalball which is driving the
effect.

10
00:01:16,367 –> 00:01:26,567
I’ve wired the outputs of the
magnet and the metaball to point
SOPs, and changed their display
parameters.

11
00:01:26,567 –> 00:01:37,500
I’ve changed their colors, and
reduced their alphas, so that
when we render the SOPs we can
see them as they overlap.

12
00:01:37,500 –> 00:01:43,533
I’ve created a TOP network
starting with a render TOP.

13
00:01:43,533 –> 00:01:53,333
I’ve added a camera and a light,
as well as an over TOP, so we
can place the render on a white
background.

14
00:01:53,333 –> 00:01:59,467
It can be challenging to locate
and visualize objects in 3d
space.

15
00:01:59,467 –> 00:02:06,233
By adjusting the parameters of
this network, we can keep track
of the effects of the magnet
SOP.

16
00:02:06,233 –> 00:02:15,633
I use a slider component to
uniformly adjust the scale of
the metaball in 3 dimensions.

17
00:02:15,633 –> 00:02:21,633
As I boost the scale, we can
immediately see the effect of
the magnet.

18
00:02:21,633 –> 00:02:30,333
The magnet, which is effectively
the input sphere, is green. The
metaball is purple.

19
00:02:30,333 –> 00:02:40,367
The relationship between the
transforms of the magnet and
metaball create the deformations
of the input sphere.

20
00:02:40,367 –> 00:02:49,567
As with a physical magnet, the
input geometry can be partially
or completely transformed.

21
00:02:49,567 –> 00:03:00,500
For the magnet SOP to work, the
relationship between the magnet
and metaball must be at least
slightly offset.

22
00:03:00,500 –> 00:03:13,967
As you can see, adjusting this
offset in either the metaball or
the magnet, will create
variations of the magnet’s
deformation of the input sphere.

23
00:03:13,967 –> 00:03:26,900
As I adjust the offset of the
magnet, the metaball scale will
cause the input sphere to be
deformed in the direction of the
magnet.

24
00:03:26,900 –> 00:03:36,633
A transform X offset of positive
.1 will cause the sphere to move
or deform to the right.

25
00:03:36,633 –> 00:03:46,967
An offset of 0 will have no
effect, as there is no
relational offset between the
magnet and metaball.

26
00:03:46,967 –> 00:03:52,000
The smaller the offset, the
smaller the effect.

27
00:03:52,000 –> 00:03:54,000

Nov 12 2014

Line SOP tutorial.

The Line SOP. TouchDesigner 088. 2014.
The Line SOP is a simple and very powerful Surface Operator. It can help you visualize vectors and angles, it can be the foundation for spline geometries, and it is very commonly used.

1
00:00:00,167 –> 00:00:02,667
Lets examine the line SOP.

2
00:00:02,667 –> 00:00:06,533
I have an example here with two
networks.

3
00:00:06,533 –> 00:00:13,200
Before we start, let’s look at
the default line SOP operator
settings.

4
00:00:13,200 –> 00:00:22,433
A line SOP of consists of a
start and end, with an arbitrary
number of points in between.

5
00:00:22,433 –> 00:00:23,500

6
00:00:23,500 –> 00:00:27,033
I can change the point B “x”
parameter.

7
00:00:27,033 –> 00:00:30,433
Here I’ve doubled the length of
the line.

8
00:00:30,433 –> 00:00:34,700
Now, I’ll move the end point up
1 unit.

9
00:00:34,700 –> 00:00:35,367

10
00:00:35,367 –> 00:00:46,333
In the first example, I use the
values generated by two sliders
to adjust the start and end
points of a line SOP.

11
00:00:46,333 –> 00:00:56,433
The slider generates a value
range of 0 to 1, and I apply
this to the Y position parameter
of the line SOP.

12
00:00:56,433 –> 00:01:09,567
The Python expression used in
the start Y parameter references
the value of the channel named
“v1” from the operator named
“null1”.

13
00:01:09,567 –> 00:01:17,767
The expression used in the end Y
parameter grabs the value from
the operator “null2”.

14
00:01:17,767 –> 00:01:25,833
When inspecting objects in the
SOP viewer, it is sometimes easy
to lose track of your objects.

15
00:01:25,833 –> 00:01:33,533
I’ve included a note in this
sample file to help you remember
how to find objects in the SOP
viewer.

16
00:01:33,533 –> 00:01:34,167

17
00:01:34,167 –> 00:01:41,567
In the second example, we deform
a line SOP to the shape of a
noise function.

18
00:01:41,567 –> 00:01:42,900

19
00:01:42,900 –> 00:01:48,300
We start by creating a line SOP
that is 3 units long.

20
00:01:48,300 –> 00:01:57,967
We use the number of samples
created by a noise CHOP as a
reference for the number of
points in the line SOP.

21
00:01:57,967 –> 00:02:03,233
The noise CHOP creates 600
samples.

22
00:02:03,233 –> 00:02:08,200
The line SOP will consist of 600
points.

23
00:02:08,200 –> 00:02:19,467
We can use the “display point
number” option in the viewer
window to keep track of each
point in our line SOP.

24
00:02:19,467 –> 00:02:24,167
Now we feed the line SOP into a
point SOP.

25
00:02:24,167 –> 00:02:25,967

26
00:02:25,967 –> 00:02:33,433
The point SOP allows us to
access the location of each
point in the line SOP.

27
00:02:33,433 –> 00:02:40,500
We use a Python expression to
alter the Y position of each
incoming point.

28
00:02:40,500 –> 00:02:48,567
Each point uses its
corresponding sample value to
create a positional offset.

29
00:02:48,567 –> 00:02:56,300
We evaluate the noise CHOP at
each of its 600 discrete sample
values.

30
00:02:56,300 –> 00:02:57,567

31
00:02:57,567 –> 00:03:02,800
In pseudocode, the Python
expression reads like this:

32
00:03:02,800 –> 00:03:15,300
For each point, use its
identification number, or index,
to find the corresponding sample
value in the noise CHOP.

33
00:03:15,300 –> 00:03:20,933
Then add it to the original
value of the incoming point.

34
00:03:20,933 –> 00:03:22,933

Nov 12 2014

Carve SOP tutorial.

The Carve SOP. TouchDesigner 088. 2014.
The Carve SOP can parametrically slice Surface Operators, and allows you to visualize complex surfaces.

1
00:00:00,833 –> 00:00:03,667
Let’s examine the carve SOP.

2
00:00:03,667 –> 00:00:05,100

3
00:00:05,100 –> 00:00:11,267
The carve SOP can be used to
slice or extract features from
an incoming SOP.

4
00:00:11,267 –> 00:00:16,200
Here we have a sphere SOP wired
to a carve SOP.

5
00:00:16,200 –> 00:00:17,033

6
00:00:17,033 –> 00:00:20,700
Our sphere SOP is set to the
default settings.

7
00:00:20,700 –> 00:00:33,633
The carve SOP works by
normalizing the 3 dimensional
volume of the incoming SOP to a
0 to 1 UV space.

8
00:00:33,633 –> 00:00:44,500
I’ve set the carve SOP
parameters to cut part of the
volume based on the U and V
range parameters.

9
00:00:44,500 –> 00:00:51,267
I’ll press the “viewer active”
button and rotate the SOP for a
better view.

10
00:00:51,267 –> 00:00:52,533

11
00:00:52,533 –> 00:01:10,267
By adjusting the start, or first
UV parameter, we can expand or
contract the beginning of the
horizontal slice- and by
adjusting the second U value, we
can adjust the end of the
horizontal slice.

12
00:01:10,267 –> 00:01:18,533
We can adjust the first and
second V values to adjust the
range of the vertical slice.

13
00:01:18,533 –> 00:01:19,767

14
00:01:19,767 –> 00:01:26,033
We can choose to keep the inside
or the outside of our sliced
area.

15
00:01:26,033 –> 00:01:29,433

16
00:01:29,433 –> 00:01:35,100
The second example network
begins with a select SOP.

17
00:01:35,100 –> 00:01:42,167
We can drag the operator to the
SOP parameter to create a linked
reference.

18
00:01:42,167 –> 00:01:46,233

19
00:01:46,233 –> 00:01:51,133
We feed the sphere into a noise
SOP.

20
00:01:51,133 –> 00:01:56,233
The noise SOP will displace the
incoming geometry.

21
00:01:56,233 –> 00:02:00,767
We then wire the noise SOP to
the carve SOP.

22
00:02:00,767 –> 00:02:05,033
In this example we’ll use the
extract method.

23
00:02:05,033 –> 00:02:12,167
This method generates a single
point on the surface of the
incoming 3d object.

24
00:02:12,167 –> 00:02:23,933
The point is located at the
intersection of the first U and
first V values set in the carve
SOP parameters.

25
00:02:23,933 –> 00:02:35,000
Remember, you can press the “h”
key while in viewer active mode
to recenter the view of your
geometry.

26
00:02:35,000 –> 00:02:36,233

27
00:02:36,233 –> 00:02:43,933
Let’s take a closer look at the
extraction point the carve SOP
has generated.

28
00:02:43,933 –> 00:02:53,667
By adjusting the U value, we
move our horizontal extraction
point value from left to right.

29
00:02:53,667 –> 00:03:00,600
By adjusting the V value, we
move our vertical extraction
point up and down.

30
00:03:00,600 –> 00:03:02,933

31
00:03:02,933 –> 00:03:10,400
The remainder of this network is
designed to help us visualize
the effect of the carve SOP.

32
00:03:10,400 –> 00:03:25,467
Starting with our initial
sphere, which has a size of 2 by
2 by 2, we scale it using a
transform SOP to 1/8th its
original size.

33
00:03:25,467 –> 00:03:27,533

34
00:03:27,533 –> 00:03:36,867
Then we wire our rescaled sphere
to the output of the carve SOP.

35
00:03:36,867 –> 00:03:38,833

36
00:03:38,833 –> 00:03:49,833
Remember, the effect of the
carve SOP is to extract a single
point on the incoming geometry’s
surface.

37
00:03:49,833 –> 00:03:50,933

38
00:03:50,933 –> 00:04:00,267
The copy SOP allows us to place
the transformed sphere exactly
on the point created by the
carve SOP.

39
00:04:00,267 –> 00:04:11,400
As we change the carve SOP U and
V extraction parameters, the
location of the transformed
sphere will update
automatically.

40
00:04:11,400 –> 00:04:16,367
This is an extremely powerful
and useful technique.

41
00:04:16,367 –> 00:04:24,100
It allows is to pinpoint and
visualize locations on the
surface of complex geometries.

42
00:04:24,100 –> 00:04:26,367

43
00:04:26,367 –> 00:04:31,767
We use a merge SOP to combine
two sources geometries.

44
00:04:31,767 –> 00:04:41,100
The noise SOP we used to extract
the surface point from, and the
output of the copy SOP.

45
00:04:41,100 –> 00:04:49,600
As we adjust the carve SOP, we
can now fully visualize its
effect on the incoming surface.

46
00:04:49,600 –> 00:04:51,600