-
Notifications
You must be signed in to change notification settings - Fork 3
/
4. DirectX.v4p
313 lines (313 loc) · 17.5 KB
/
4. DirectX.v4p
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
<!DOCTYPE PATCH SYSTEM "http://vvvv.org/versions/vvvv45beta26.dtd" >
<PATCH nodename="C:\kimchiandchips\Workshops\VVVV-basics,mapping\4. DirectX.v4p" filename="C:\kimchiandchips\Workshops\VVVV-basics,mapping\4. DirectX.v4p" locked="0" systemname="4. DirectX">
<BOUNDS height="13740" left="15120" top="630" type="Window" width="8370">
</BOUNDS>
<NODE componentmode="InABox" id="0" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="225" top="150" type="Node" width="1380">
</BOUNDS>
<BOUNDS height="1095" left="225" top="150" type="Box" width="7665">
</BOUNDS>
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|4. DirectX|">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="1">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Size" slicecount="1" values="42">
</PIN>
</NODE>
<NODE componentmode="InABox" id="2" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="105" top="12405" type="Node" width="2070">
</BOUNDS>
<BOUNDS height="750" left="105" top="12405" type="Box" width="5325">
</BOUNDS>
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|Created by Elliot Woods.&cr;&lf;Distributed under the MIT license (check file LICENSE) for details.&cr;&lf;Generally you can do whatever you want with these files. have fun!|">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="1">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
</NODE>
<NODE componentmode="InABox" id="5" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="5805" top="2640" type="Node" width="1380">
</BOUNDS>
<BOUNDS height="540" left="5805" top="2640" type="Box" width="2085">
</BOUNDS>
<PIN encoded="0" pinname="Input String" visible="1">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Size" slicecount="1" values="12">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="Author">
</PIN>
</NODE>
<NODE componentmode="InABox" id="6" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="225" top="1260" type="Node" width="1380">
</BOUNDS>
<BOUNDS height="1155" left="225" top="1260" type="Box" width="7665">
</BOUNDS>
<PIN encoded="0" pinname="Input String" visible="1">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Size" slicecount="1" values="12">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="Description">
</PIN>
</NODE>
<INFO author="Elliot Woods" description="Spreaded IOBoxes, the Inspektor" tags="IOBox, Slider, Inspektor, Help patch">
</INFO>
<NODE componentmode="Hidden" filename="Subpatches\GetMetadata (VVVV).v4p" hiddenwhenlocked="1" id="10" nodename="GetMetadata (VVVV)" systemname="GetMetadata (VVVV)">
<BOUNDS height="100" left="5820" top="1800" type="Node" width="100">
</BOUNDS>
<PIN pinname="Patch" visible="1">
</PIN>
<BOUNDS height="3465" left="14520" top="5520" type="Window" width="4680">
</BOUNDS>
<PIN pinname="Author" visible="1">
</PIN>
<PIN pinname="Description" visible="1">
</PIN>
<PIN pinname="Tags" visible="1">
</PIN>
</NODE>
<NODE componentmode="Hidden" hiddenwhenlocked="1" id="8" nodename="PatchAlias (VVVV)" systemname="PatchAlias (VVVV)">
<BOUNDS height="100" left="5820" top="1350" type="Node" width="100">
</BOUNDS>
<PIN pinname="Patch" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="10" dstpinname="Patch" hiddenwhenlocked="1" srcnodeid="8" srcpinname="Patch">
</LINK>
<LINK dstnodeid="6" dstpinname="Input String" hiddenwhenlocked="1" linkstyle="VHV" srcnodeid="10" srcpinname="Description">
<LINKPOINT x="6445" y="2205">
</LINKPOINT>
<LINKPOINT x="245" y="2355">
</LINKPOINT>
</LINK>
<NODE componentmode="InABox" id="11" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="225" top="2640" type="Node" width="1380">
</BOUNDS>
<BOUNDS height="540" left="225" top="2640" type="Box" width="5520">
</BOUNDS>
<PIN encoded="0" pinname="Input String" visible="1">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Size" slicecount="1" values="12">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="Tags">
</PIN>
</NODE>
<LINK dstnodeid="11" dstpinname="Input String" hiddenwhenlocked="1" linkstyle="VHV" srcnodeid="10" srcpinname="Tags">
<LINKPOINT x="7015" y="2293">
</LINKPOINT>
<LINKPOINT x="275" y="2448">
</LINKPOINT>
</LINK>
<LINK dstnodeid="5" dstpinname="Input String" hiddenwhenlocked="1" srcnodeid="10" srcpinname="Author">
</LINK>
<NODE componentmode="InABox" id="12" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="2790" top="3660" type="Node" width="2070">
</BOUNDS>
<BOUNDS height="360" left="2790" top="3660" type="Box" width="2025">
</BOUNDS>
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|[0 - DirectX]&cr;&lf;Now that we have a basic understanding of the VVVV interface, we can start to understand how to generate graphics.&cr;&lf;<br />&cr;&lf;&cr;&lf;First lets try the most simple type of drawing. Let's create a <node>Quad</node> and a <node>Renderer (EX9)</node>. Connect them together from <node>Quad</node>'s <pin>Layer</pin> output to <node>Renderer</node>'s <pin>Layers</pin> input.|">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Font" slicecount="1" values="|Arial Black|">
</PIN>
<PIN pinname="Size" slicecount="1" values="10">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="||">
</PIN>
</NODE>
<NODE componentmode="InABox" id="63" nodename="Renderer (EX9)" systemname="Renderer (EX9)">
<BOUNDS height="100" left="2775" top="5865" type="Node" width="100">
</BOUNDS>
<BOUNDS height="1800" left="2775" top="5865" type="Box" width="2400">
</BOUNDS>
<BOUNDS height="5010" left="15675" top="6570" type="Window" width="6240">
</BOUNDS>
<PIN pinname="Layers" visible="1">
</PIN>
</NODE>
<NODE componentmode="Hidden" id="64" nodename="Quad (DX9)" systemname="Quad (DX9)">
<BOUNDS height="100" left="2775" top="5280" type="Node" width="100">
</BOUNDS>
<PIN pinname="Layer" visible="1">
</PIN>
<PIN pinname="Render State" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="63" dstpinname="Layers" srcnodeid="64" srcpinname="Layer">
</LINK>
<NODE componentmode="InABox" id="65" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="5295" top="5955" type="Node" width="2070">
</BOUNDS>
<BOUNDS height="345" left="5295" top="5955" type="Box" width="2370">
</BOUNDS>
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|[1 - Window modes]&cr;&lf;With the <node>Renderer</node> selected. Try the following key combinations:&cr;&lf;&cr;&lf;<ul>&cr;&lf;<li><b><key>Alt</key>+<key>3</key></b> - Hidden</li>&cr;&lf;<li><b><key>Alt</key>+<key>2</key></b> - Inside the patch</li>&cr;&lf;<li><b><key>Alt</key>+<key>1</key></b> - In a seperate window</li>&cr;&lf;<li><b><key>Alt</key>+<key>Enter</key></b> - Fullscreen</li>&cr;&lf;</ul>&cr;&lf;<br />&cr;&lf;You can now press <key>Alt</key>+<key>Enter</key> again to exit fullscreen.|">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Font" slicecount="1" values="|Arial Black|">
</PIN>
<PIN pinname="Size" slicecount="1" values="10">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="||">
</PIN>
</NODE>
<NODE componentmode="InABox" id="67" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="315" top="4440" type="Node" width="2070">
</BOUNDS>
<BOUNDS height="345" left="315" top="4440" type="Box" width="2370">
</BOUNDS>
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|[2 - Blend mode]&cr;&lf;Let's create a new node above <node>Quad</node> called <node>Fill (EX9.RenderState)</node>&cr;&lf;<br />&cr;&lf;&cr;&lf;Connect it's output to <node>Quad</node>'s <pin>Render State</pin> input.<br />&cr;&lf;&cr;&lf;Now create an enum IOBox above Fill. This time we'll use another shortcut. First <click/><lmb/> on the top right pin <pin>Fill Mode</pin> to start creating a link. Then move your mouse away and do a <click/><mmb/> to create a new matching IOBox.&cr;&lf;<br />&cr;&lf;&cr;&lf;Try selecting different fill modes in the IOBox (remember to use <click/><rmb/>).|">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Font" slicecount="1" values="|Arial Black|">
</PIN>
<PIN pinname="Size" slicecount="1" values="10">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="||">
</PIN>
</NODE>
<NODE componentmode="Hidden" id="68" nodename="Fill (EX9.RenderState)" systemname="Fill (EX9.RenderState)">
<BOUNDS height="270" left="2790" top="4860" type="Node" width="1590">
</BOUNDS>
<PIN pinname="Render State Out" visible="1">
</PIN>
<PIN pinname="Fill Mode">
</PIN>
</NODE>
<LINK dstnodeid="64" dstpinname="Render State" srcnodeid="68" srcpinname="Render State Out">
</LINK>
<NODE componentmode="InABox" id="71" nodename="IOBox (Enumerations)" systemname="IOBox (Enumerations)">
<BOUNDS height="0" left="4335" top="4275" type="Node" width="0">
</BOUNDS>
<BOUNDS height="240" left="4335" top="4275" type="Box" width="1590">
</BOUNDS>
<PIN pinname="Input Enum" slicecount="1" values="Solid">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="|Fill Mode|">
</PIN>
</NODE>
<LINK dstnodeid="68" dstpinname="Fill Mode" srcnodeid="71" srcpinname="Output Enum">
</LINK>
<NODE componentmode="InABox" id="72" nodename="Renderer (EX9)" systemname="Renderer (EX9)">
<BOUNDS height="100" left="2850" top="10260" type="Node" width="100">
</BOUNDS>
<BOUNDS height="1800" left="2850" top="10260" type="Box" width="2400">
</BOUNDS>
<BOUNDS height="5010" left="18510" top="10425" type="Window" width="6240">
</BOUNDS>
<PIN pinname="Layers" visible="1">
</PIN>
</NODE>
<NODE componentmode="Hidden" id="73" nodename="Group (EX9)" systemname="Group (EX9)">
<BOUNDS height="270" left="2850" top="9795" type="Node" width="2835">
</BOUNDS>
<PIN pinname="Layer" visible="1">
</PIN>
<PIN pinname="Layer 2" visible="1">
</PIN>
<PIN pinname="Layer 1" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="72" dstpinname="Layers" srcnodeid="73" srcpinname="Layer">
</LINK>
<NODE componentmode="Hidden" filename="%VVVV%\plugins\DrawText.dll" id="75" nodename="Text (EX9)" systemname="Text (EX9)">
<BOUNDS height="100" left="4245" top="9345" type="Node" width="100">
</BOUNDS>
<PIN pinname="Layer" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="73" dstpinname="Layer 2" srcnodeid="75" srcpinname="Layer">
</LINK>
<NODE componentmode="Hidden" id="76" nodename="Quad (DX9)" systemname="Quad (DX9)">
<BOUNDS height="100" left="2850" top="9345" type="Node" width="100">
</BOUNDS>
<PIN pinname="Layer" visible="1">
</PIN>
<PIN pinname="Color" visible="1">
</PIN>
<PIN pinname="Transform" visible="1">
</PIN>
</NODE>
<LINK dstnodeid="73" dstpinname="Layer 1" srcnodeid="76" srcpinname="Layer">
</LINK>
<NODE componentmode="Hidden" id="77" nodename="HSL (Color Join)" systemname="HSL (Color Join)">
<BOUNDS height="100" left="3810" top="8880" type="Node" width="100">
</BOUNDS>
<PIN pinname="Output" visible="1">
</PIN>
<PIN pinname="Lightness" slicecount="1" values="0.2">
</PIN>
<PIN pinname="Hue" slicecount="1" values="0">
</PIN>
</NODE>
<LINK dstnodeid="76" dstpinname="Color" srcnodeid="77" srcpinname="Output">
</LINK>
<NODE componentmode="Hidden" id="78" nodename="Scale (Transform)" systemname="Scale (Transform)">
<BOUNDS height="100" left="3015" top="8625" type="Node" width="100">
</BOUNDS>
<PIN pinname="Transform Out" visible="1">
</PIN>
<PIN pinname="X" slicecount="1" values="1.83">
</PIN>
</NODE>
<LINK dstnodeid="76" dstpinname="Transform" srcnodeid="78" srcpinname="Transform Out">
</LINK>
<NODE componentmode="InABox" id="79" nodename="IOBox (String)" systemname="IOBox (String)">
<BOUNDS height="270" left="3120" top="8175" type="Node" width="2070">
</BOUNDS>
<BOUNDS height="330" left="3120" top="8175" type="Box" width="1260">
</BOUNDS>
<PIN encoded="0" pinname="Input String" slicecount="1" visible="0" values="|[3 - Group]&cr;&lf;The <node>Renderer</node> node has only 1 <pin>Layers</pin> input, and in VVVV, each <pin>input</pin> can only only accept 1 Link. So how do we connect multiple objects to 1 Renderer?&cr;&lf;<br />&cr;&lf;&cr;&lf;For this, we use the <node>Group (EX9)</node>. Let's create some nodes, from the top let's create:&cr;&lf;<ul>&cr;&lf;<li>A <node>Quad</node> and a <node>Text (EX9)</node></li>&cr;&lf;<li>A <node>Group (EX9)</node> node</li>&cr;&lf;<li>A <node>Renderer (EX9)</node></li>&cr;&lf;</ul>&cr;&lf;&cr;&lf;<br />&cr;&lf;&cr;&lf;First connect the <node>Group</node> to the <node>Renderer</node>, then connect the <node>Text</node> to the <node>Group</node>'s <pin>Layer 2</pin> input pin. Now you should be rendering the text "vvvv". You can change this text using the 3rd input pin <pin>Text</pin> on the <node>Text</node> node.&cr;&lf;<br />&cr;&lf;&cr;&lf;Now connect the <node>Quad</node> to the <pin>Layer 1</pin> input of <node>Group</node>. Both objects should now be drawing.&cr;&lf;<br />&cr;&lf;&cr;&lf;Since they are both the same colour, it is a little confusing to see. So let's change the colour of the Quad:&cr;&lf;&cr;&lf;<ol>&cr;&lf;<li>Create a new node at the top called <node>HSL (Color Join)</node>. </li>&cr;&lf;<li>Attach the <pin>Output</pin> of <node>HSL</node> to the <pin>Color</pin> input of <node>Quad</node></li>&cr;&lf;<li>Change the <pin>Lightness</pin> pin of <node>HSL</node> to around <b>0.2</b></li>&cr;&lf;<li>Change the <pin>Hue</pin> to <b>0</b></li>&cr;&lf;</ol>&cr;&lf;<br />&cr;&lf;&cr;&lf;You should now have some white text drawn on top of a red quad.&cr;&lf;<br />&cr;&lf;&cr;&lf;The order in which inputs are made to the <node>Group</node> node depicts what order the objects are drawn to the screen, i.e. since the <node>Quad</node> is connected to <pin>Layer 1</pin>, we draw this object first, and then the <node>Text</node> which is connected to <pin>Layer 2</pin>. This means that the Text is drawn on top of the Quad, since it is drawn second, and because there is no other depth queues in the scene.&cr;&lf;<br />&cr;&lf;&cr;&lf;To change the size of the quad to fit the text, let's make a new node above <node>Quad</node> called <node>Scale (Transform)</node>. Connect the <pin>Transform Out</pin> of <node>Scale</node> to the <pin>Transform</pin> input of <node>Quad</node>. Now try editing the <pin>x</pin>, <pin>y</pin> and <pin>z</pin> inputs of <node>Scale</node>|">
</PIN>
<PIN pinname="Output String" visible="0">
</PIN>
<PIN pinname="Show Grid" slicecount="1" values="0">
</PIN>
<PIN pinname="String Type" slicecount="1" values="MultiLine">
</PIN>
<PIN pinname="Font" slicecount="1" values="|Arial Black|">
</PIN>
<PIN pinname="Size" slicecount="1" values="10">
</PIN>
<PIN encoded="0" pinname="Descriptive Name" slicecount="1" values="||">
</PIN>
</NODE>
</PATCH>