File: 14_ev_example_virtual_panoramic_3d.pd

package info (click to toggle)
pd-extendedview 0.5~repack-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 10,728 kB
  • sloc: makefile: 20; sh: 1
file content (390 lines) | stat: -rw-r--r-- 12,369 bytes parent folder | download | duplicates (2)
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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
#N canvas 512 58 723 480 10;
#X declare -path . -path .. -path data -path ../data -path ev-in -path
../ev-in -path ev-main -path ../ev-main -path ev-pano -path ../ev-pano
-path ev-pro -path ../ev-pro -path libs/gil -path ../libs/gil -path
libs/kollabs -path ../libs/kollabs -path media -path ../media -path
ev-glsl -path ../ev-glsl -lib Gem;
#X obj 14 14 cnv 15 700 30 empty empty EXAMPLE:_Virtual_Panoramic_Camera_Inside_3D_Scenery
20 12 0 14 -1 -262144 0;
#N canvas 33 262 548 468 init 0;
#X obj 56 92 loadbang;
#X obj 83 138 del 1000;
#X obj 56 114 t b b;
#X obj 56 231 del 3000;
#X text 159 140 load the preset file on startup:;
#X obj 158 43 ev-main/ev_declare;
#X text 173 232 (pathes relative to libs/kollabs);
#X text 66 272 Recall scene '0' from the loaded preset file:;
#X msg 56 298 \; /ds/vpano/scene 0 \; rendering 1 \; projection 1 \;
rotation 1 \;;
#X msg 83 169 \; /ds/vpano/loadfile ../../data/ev_example_virtual_panoramic_3d.txt
;
#X connect 0 0 2 0;
#X connect 1 0 9 0;
#X connect 2 0 3 0;
#X connect 2 1 1 0;
#X connect 3 0 8 0;
#X restore 15 52 pd init;
#X obj 182 104 loadbang;
#N canvas 483 206 687 395 projection 0;
#X obj 42 56 inlet gemlist;
#X obj 235 56 inlet texture_id;
#N canvas 56 138 1012 479 texcoords 0;
#X obj -5 50 r /ev/buf/vpanocam/dimen/x;
#X msg 687 200 \; /ev/pro/c/texture/top/right/x \$1 \; /ev/pro/c/texture/bottom/right/x
\$1 \;;
#X obj 452 174 * 2;
#X obj 217 112 / 4;
#X obj 687 172 * 3;
#X obj -5 169 b;
#X obj -5 284 r /ev/buf/vpanocam/dimen/y;
#X msg 241 350 \; /ev/pro/a/texture/top/left/y \$1 \; /ev/pro/a/texture/top/right/y
\$1 \; /ev/pro/b/texture/top/left/y \$1 \; /ev/pro/b/texture/top/right/y
\$1 \; /ev/pro/c/texture/top/left/y \$1 \; /ev/pro/c/texture/top/right/y
\$1 \;;
#X obj -5 317 b;
#X msg -5 350 \; /ev/pro/a/texture/bottom/left/y 0 \; /ev/pro/a/texture/bottom/right/y
0 \; /ev/pro/b/texture/bottom/left/y 0 \; /ev/pro/b/texture/bottom/right/y
0 \; /ev/pro/c/texture/bottom/left/y 0 \; /ev/pro/c/texture/bottom/right/y
0 \;;
#X msg 217 200 \; /ev/pro/a/texture/top/right/x \$1 \; /ev/pro/a/texture/bottom/right/x
\$1 \; /ev/pro/b/texture/top/left/x \$1 \; /ev/pro/b/texture/bottom/left/x
\$1 \;;
#X msg 452 200 \; /ev/pro/b/texture/top/right/x \$1 \; /ev/pro/b/texture/bottom/right/x
\$1 \; /ev/pro/c/texture/top/left/x \$1 \; /ev/pro/c/texture/bottom/left/x
\$1 \;;
#X msg -5 200 \; /ev/pro/a/texture/top/left/x 0 \; /ev/pro/a/texture/bottom/left/x
0 \;;
#X connect 0 0 3 0;
#X connect 0 0 5 0;
#X connect 2 0 11 0;
#X connect 3 0 2 0;
#X connect 3 0 4 0;
#X connect 3 0 10 0;
#X connect 4 0 1 0;
#X connect 5 0 12 0;
#X connect 6 0 7 0;
#X connect 6 0 8 0;
#X connect 8 0 9 0;
#X restore 42 349 pd texcoords;
#X obj 42 260 ev_pro_22 a vpano;
#X obj 252 260 ev_pro_22 b vpano;
#X obj 462 260 ev_pro_22 c vpano;
#X obj 42 88 t a a a;
#X connect 0 0 6 0;
#X connect 1 0 3 1;
#X connect 1 0 4 1;
#X connect 1 0 5 1;
#X connect 6 0 3 0;
#X connect 6 1 4 0;
#X connect 6 2 5 0;
#X restore 29 414 pd projection;
#N canvas 112 22 1208 756 vpanocam 0;
#X obj 29 115 ev_pano_group vpanocam vpano;
#X obj 118 334 ev_pano_stitch vcam_a vpano;
#X obj 1147 -217 loadbang;
#X obj 44 -111 ev_buf vcam_a vpano;
#X obj 324 -111 ev_buf vcam_b vpano;
#X obj 604 -111 ev_buf vcam_c vpano;
#X obj 884 -111 ev_buf vcam_d vpano;
#X obj 324 -32 rotateXYZ 0 90 0;
#X obj 604 -30 rotateXYZ 0 180 0;
#X obj 884 -29 rotateXYZ 0 270 0;
#X msg 1147 -195 perspec -1 1 -1 1 1 1000;
#X obj 1197 93 translateXYZ 0 -1 0;
#X obj 1197 214 rotateXYZ 0 0 0;
#X obj 29 28 ev_buf vpanocam vpano;
#X obj 1226 150 r /ev/vpanocam/rot/x;
#X obj 1255 170 r /ev/vpanocam/rot/y;
#X obj 1284 190 r /ev/vpanocam/rot/z;
#X obj 29 -236 inlet gemlist;
#X obj 1234 3 r /ev/vpanocam/pos/x;
#X obj 1271 25 r /ev/vpanocam/pos/y;
#X obj 1308 47 r /ev/vpanocam/pos/z;
#X obj 1315 360 outlet texture_id;
#X obj 1234 25 * -1;
#X obj 1271 47 * -1;
#X obj 1308 69 * -1;
#X obj 1197 116 rotateXYZ 90 0 0;
#X obj 678 334 ev_pano_stitch vcam_c vpano;
#X obj 398 334 ev_pano_stitch vcam_b vpano;
#X obj 958 334 ev_pano_stitch vcam_d vpano;
#N canvas 0 22 450 300 calib 0;
#X obj 114 109 gemhead 100;
#X obj 114 171 pix_texture;
#X obj 114 193 square 4;
#X obj 114 30 loadbang;
#X msg 114 52 0;
#X obj 130 77 r /ev/vpanocam/calib;
#X obj 278 76 inlet texture_id;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 3 0 4 0;
#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 1 1;
#X restore 243 115 pd calib;
#X obj 1197 360 outlet gemlist;
#X obj 29 -204 t a a a a a;
#N canvas 0 22 618 385 parameters 0;
#X obj 42 57 r /ev/buf/vpanocam/dimen/x;
#X obj 42 79 / 4;
#X obj 42 101 int;
#X msg 42 126 \; /ev/buf/vcam_a/dimen/x \$1 \; /ev/buf/vcam_a/dimen/y
\$1 \; /ev/buf/vcam_b/dimen/x \$1 \; /ev/buf/vcam_b/dimen/y \$1 \;
/ev/buf/vcam_c/dimen/x \$1 \; /ev/buf/vcam_c/dimen/y \$1 \; /ev/buf/vcam_d/dimen/x
\$1 \; /ev/buf/vcam_d/dimen/y \$1 \; /ev/pano/stitch/vcam_a/dimen/x
\$1 \; /ev/pano/stitch/vcam_a/dimen/y \$1 \; /ev/pano/stitch/vcam_b/dimen/x
\$1 \; /ev/pano/stitch/vcam_b/dimen/y \$1 \; /ev/pano/stitch/vcam_c/dimen/x
\$1 \; /ev/pano/stitch/vcam_c/dimen/y \$1 \; /ev/pano/stitch/vcam_d/dimen/x
\$1 \; /ev/pano/stitch/vcam_d/dimen/y \$1 \;;
#X obj 294 73 loadbang;
#X msg 294 95 \; /ev/buf/vcam_a/shift/z 4 \; /ev/buf/vcam_b/shift/z
4 \; /ev/buf/vcam_c/shift/z 4 \; /ev/buf/vcam_d/shift/z 4 \;;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 4 0 5 0;
#X restore 1240 -84 pd parameters;
#N canvas 0 22 450 300 storage 0;
#X obj 92 62 ds_reg vpano /ev/vpanocam/pos/x;
#X obj 92 82 ds_reg vpano /ev/vpanocam/pos/y;
#X obj 92 102 ds_reg vpano /ev/vpanocam/pos/z;
#X restore 1240 -104 pd storage;
#X obj 1197 312 scaleXYZ 27 27 1;
#X connect 0 1 1 0;
#X connect 0 2 27 0;
#X connect 0 3 26 0;
#X connect 0 4 28 0;
#X connect 2 0 10 0;
#X connect 3 0 11 0;
#X connect 3 1 1 1;
#X connect 4 0 7 0;
#X connect 4 1 27 1;
#X connect 5 0 8 0;
#X connect 5 1 26 1;
#X connect 6 0 9 0;
#X connect 6 1 28 1;
#X connect 7 0 11 0;
#X connect 8 0 11 0;
#X connect 9 0 11 0;
#X connect 10 0 3 1;
#X connect 10 0 4 1;
#X connect 10 0 5 1;
#X connect 10 0 6 1;
#X connect 11 0 25 0;
#X connect 12 0 34 0;
#X connect 13 0 0 0;
#X connect 13 1 21 0;
#X connect 13 1 29 0;
#X connect 14 0 12 1;
#X connect 15 0 12 2;
#X connect 16 0 12 3;
#X connect 17 0 31 0;
#X connect 18 0 22 0;
#X connect 19 0 23 0;
#X connect 20 0 24 0;
#X connect 22 0 11 1;
#X connect 23 0 11 2;
#X connect 24 0 11 3;
#X connect 25 0 12 0;
#X connect 31 0 13 0;
#X connect 31 1 3 0;
#X connect 31 2 4 0;
#X connect 31 3 5 0;
#X connect 31 4 6 0;
#X connect 34 0 30 0;
#X restore 133 361 pd vpanocam;
#N canvas 1508 284 662 502 rendering 1;
#X obj 35 -158 inlet gemlist;
#X obj 203 -31 loadbang;
#X msg 111 14 1;
#X obj 111 -31 r /wave/reset;
#X obj 111 -9 b;
#X obj 304 63 * 50;
#X obj 384 63 * 50;
#X obj 304 105 pack 0 0 0;
#X obj 304 127 list prepend force;
#X obj 304 149 list trim;
#N canvas 0 22 443 489 damping 0;
#X obj 116 67 / 100;
#X msg 116 86 K1 \$1;
#X obj 147 217 / 100;
#X obj 147 377 / 100;
#X obj 197 117 / 100;
#X obj 197 247 / 100;
#X obj 197 377 / 100;
#X msg 197 136 D1 \$1;
#X msg 197 266 D2 \$1;
#X msg 197 396 D3 \$1;
#X msg 147 396 K3 \$1;
#X msg 147 236 K2 \$1;
#X obj 116 293 t a;
#X obj 116 193 t a;
#X obj 116 423 t a;
#X obj 116 38 r /wave/k1;
#X obj 196 91 r /wave/d1;
#X obj 147 191 r /wave/k2;
#X obj 197 223 r /wave/d2;
#X obj 147 325 r /wave/k3;
#X obj 197 354 r /wave/d3;
#X obj 116 445 outlet;
#X connect 0 0 1 0;
#X connect 1 0 13 0;
#X connect 2 0 11 0;
#X connect 3 0 10 0;
#X connect 4 0 7 0;
#X connect 5 0 8 0;
#X connect 6 0 9 0;
#X connect 7 0 13 0;
#X connect 8 0 12 0;
#X connect 9 0 14 0;
#X connect 10 0 14 0;
#X connect 11 0 12 0;
#X connect 12 0 14 0;
#X connect 13 0 12 0;
#X connect 14 0 21 0;
#X connect 15 0 0 0;
#X connect 16 0 4 0;
#X connect 17 0 2 0;
#X connect 18 0 5 0;
#X connect 19 0 3 0;
#X connect 20 0 6 0;
#X restore 203 149 pd damping;
#X obj 304 -84 t b b b;
#X obj 304 -32 random 1000;
#X obj 304 -10 / 999;
#X obj 462 -32 random 1000;
#X obj 462 -10 / 999;
#X obj 304 -131 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1
1 1;
#X obj 462 63 * -100;
#X obj 304 -157 loadbang;
#X obj 125 -158 inlet bang;
#N canvas 3 58 450 300 storage 0;
#X obj 128 112 ds_reg vpano /wave/k1;
#X obj 128 132 ds_reg vpano /wave/k2;
#X obj 128 152 ds_reg vpano /wave/k3;
#X obj 128 172 ds_reg vpano /wave/d1;
#X obj 128 192 ds_reg vpano /wave/d2;
#X obj 128 212 ds_reg vpano /wave/d3;
#X restore 516 132 pd storage;
#X obj 35 -114 pix_texture;
#X msg 203 -7 draw fill;
#X obj 304 -106 metro 3000;
#X obj 384 -32 random 1000;
#X obj 384 -10 / 999;
#X obj 36 237 newWave 50 50;
#X obj 87 -64 loadbang;
#X obj 35 -136 pix_image media/grid.jpg;
#X connect 0 0 28 0;
#X connect 1 0 22 0;
#X connect 2 0 26 3;
#X connect 3 0 4 0;
#X connect 4 0 2 0;
#X connect 5 0 7 0;
#X connect 6 0 7 1;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 26 0;
#X connect 10 0 26 0;
#X connect 11 0 12 0;
#X connect 11 1 24 0;
#X connect 11 2 14 0;
#X connect 12 0 13 0;
#X connect 13 0 5 0;
#X connect 14 0 15 0;
#X connect 15 0 17 0;
#X connect 16 0 23 0;
#X connect 17 0 7 2;
#X connect 18 0 16 0;
#X connect 19 0 26 0;
#X connect 21 0 26 0;
#X connect 22 0 26 0;
#X connect 23 0 11 0;
#X connect 24 0 25 0;
#X connect 25 0 6 0;
#X connect 27 0 4 0;
#X connect 28 0 21 0;
#X coords 0 502 1 501 85 60 0;
#X restore 133 414 pd rendering;
#X obj 29 335 gemhead 51;
#X obj 133 295 gemhead 50;
#X obj 273 269 cnv 15 250 150 empty empty Virtual_Panoramic_Camera
20 12 0 14 -228856 -66577 0;
#X obj 289 309 tgl 15 0 /ev/vpanocam/calib /ev/vpanocam/calib calib
17 7 0 10 -262144 -1 -1 0 1;
#X obj 288 350 nbx 5 14 -1e+37 1e+37 0 0 /ev/buf/vpanocam/dimen/x /ev/buf/vpanocam/dimen/x
dimen/x 0 -8 0 10 -262144 -1 -1 1024 256;
#X obj 288 380 nbx 5 14 -1e+37 1e+37 0 0 /ev/buf/vpanocam/dimen/y /ev/buf/vpanocam/dimen/y
dimen/y 0 -8 0 10 -262144 -1 -1 512 256;
#X obj 354 320 nbx 5 14 -1e+37 1e+37 0 0 /ev/vpanocam/pos/x /ev/vpanocam/pos/x
pos/x 0 -8 0 10 -262144 -1 -1 0 256;
#X obj 354 350 nbx 5 14 -1e+37 1e+37 0 0 /ev/vpanocam/pos/y /ev/vpanocam/pos/y
pos/y 0 -8 0 10 -262144 -1 -1 3 256;
#X obj 354 380 nbx 5 14 -1e+37 1e+37 0 0 /ev/vpanocam/pos/z /ev/vpanocam/pos/z
pos/z 0 -8 0 10 -262144 -1 -1 0 256;
#X obj 424 380 nbx 5 14 -1e+37 1e+37 0 0 /ev/vpanocam/rot/z /ev/vpanocam/rot/z
rot/z 0 -8 0 10 -262144 -1 -1 177.84 256;
#X obj 29 312 tgl 15 0 empty projection projection 17 7 0 10 -262144
-1 -1 1 1;
#X obj 133 272 tgl 15 0 empty rendering rendering 17 7 0 10 -262144
-1 -1 1 1;
#X obj 537 269 cnv 15 150 150 empty empty Wave 20 12 0 14 -228856 -66577
0;
#X obj 556 332 nbx 5 14 -1e+37 1e+37 0 0 /wave/k1 /wave/k1 K1 0 -8
0 10 -262144 -1 -1 5 256;
#X obj 556 362 nbx 5 14 -1e+37 1e+37 0 0 /wave/k2 /wave/k2 K2 0 -8
0 10 -262144 -1 -1 3 256;
#X obj 556 392 nbx 5 14 -1e+37 1e+37 0 0 /wave/k3 /wave/k3 K3 0 -8
0 10 -262144 -1 -1 0 256;
#X obj 616 332 nbx 5 14 -1e+37 1e+37 0 0 /wave/d1 /wave/d1 D1 0 -8
0 10 -262144 -1 -1 2 256;
#X obj 616 362 nbx 5 14 -1e+37 1e+37 0 0 /wave/d2 /wave/d2 D2 0 -8
0 10 -262144 -1 -1 1 256;
#X obj 616 392 nbx 5 14 -1e+37 1e+37 0 0 /wave/d3 /wave/d3 D3 0 -8
0 10 -262144 -1 -1 1 256;
#X obj 624 282 bng 15 250 50 0 /wave/reset /wave/reset reset 17 7 0
10 -262144 -1 -1;
#X obj 182 155 ev_gemwin vpano;
#X msg 182 128 perspec -1 1 -1 1 1 1000 \, color 0.5 0.5 0.5;
#X obj 133 317 t a b;
#X text 554 60 (c)2013 Marian Weger;
#N canvas 0 22 450 300 rotation 0;
#X obj 138 58 inlet;
#X obj 197 133 loadbang;
#X obj 197 177 line 0 40;
#X obj 197 223 s /ev/vpanocam/rot/z;
#X obj 158 202 sel 360;
#X obj 138 80 sel 0 1;
#X msg 138 102 stop;
#X msg 197 155 0 \, 360 20000;
#X connect 0 0 5 0;
#X connect 1 0 7 0;
#X connect 2 0 4 0;
#X connect 4 0 7 0;
#X connect 4 1 3 0;
#X connect 5 0 6 0;
#X connect 5 1 7 0;
#X connect 6 0 2 0;
#X connect 7 0 2 0;
#X restore 424 341 pd rotation;
#X obj 424 318 tgl 15 0 empty rotation rotation 17 7 0 10 -262144 -1
-1 1 1;
#X text 546 177 <-- click here to start!;
#X text 97 52 OpenGL does not allow a 360 degrees camera. So you need
to build a virtual camera array...;
#X obj 14 101 ds_logic vpano;
#X obj 14 124 ds_gui vpano;
#X connect 2 0 27 0;
#X connect 4 0 5 0;
#X connect 4 1 3 1;
#X connect 6 0 3 0;
#X connect 7 0 28 0;
#X connect 16 0 6 0;
#X connect 17 0 7 0;
#X connect 27 0 26 0;
#X connect 28 0 4 0;
#X connect 28 1 5 1;
#X connect 31 0 30 0;
#X coords 0 0 1 1 85 60 0;