13_ev_example_mapping_on_shipping_containers.pd 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. #N canvas 292 28 892 631 10;
  2. #X declare -path . -path .. -path data -path ../data -path ev-in -path
  3. ../ev-in -path ev-main -path ../ev-main -path ev-pano -path ../ev-pano
  4. -path ev-pro -path ../ev-pro -path libs/gil -path ../libs/gil -path
  5. libs/kollabs -path ../libs/kollabs -path media -path ../media -path
  6. ev-glsl -path ../ev-glsl -lib Gem;
  7. #X obj 14 14 cnv 15 860 30 empty empty Example:_Mapping_on_shipping_containers
  8. 20 12 0 14 -191407 -1 0;
  9. #X obj 14 47 cnv 15 80 40 empty empty empty 2 8 0 10 -261234 -262144
  10. 0;
  11. #N canvas 217 231 548 468 init 0;
  12. #X obj 56 92 loadbang;
  13. #X obj 83 138 del 1000;
  14. #X obj 56 114 t b b;
  15. #X obj 56 281 del 3000;
  16. #X obj 44 -23 cnv 15 400 100 empty empty IMPORTANT 20 12 0 14 -261234
  17. -66577 0;
  18. #X text 49 -3 Such a declare object should always be in the main patch
  19. of your project \, to set the pathes to the abstractions.;
  20. #X obj 158 43 ev-main/ev_declare;
  21. #X text 165 266 (pathes relative to libs/kollabs);
  22. #X msg 83 170 \; /ds/one/loadfile ../../data/ev_example_shipping_containers_one.txt
  23. \; /ds/two/loadfile ../../data/ev_example_shipping_containers_two.txt
  24. ;
  25. #X msg 56 345 \; /ds/one/scene 0 \; /ds/two/scene 0;
  26. #X text 159 140 load the preset files on startup:;
  27. #X text 66 322 Recall scene '0' from the loaded preset files:;
  28. #X connect 0 0 2 0;
  29. #X connect 1 0 8 0;
  30. #X connect 2 0 3 0;
  31. #X connect 2 1 1 0;
  32. #X connect 3 0 9 0;
  33. #X restore 30 59 pd init;
  34. #X obj 101 49 ev_gemwin one;
  35. #X obj 484 426 cnv 15 390 300 empty empty Backround_Image 20 12 0 14
  36. -262130 -66577 0;
  37. #X obj 579 581 gemhead 50;
  38. #X obj 579 603 ev_pic background one;
  39. #X obj 579 675 pix_texture;
  40. #X obj 579 697 rectangle 5.3333 4;
  41. #X text 496 452 As we can not assume that you have access to real shhipping
  42. containers and projectors right now \, we will just map onto a picture
  43. from Rotterdam.;
  44. #X text 496 492 As we can not assume that you have access to real shhipping
  45. containers and projectors right now \, we will just map onto a picture
  46. from Rotterdam container port.;
  47. #X text 496 532 Imagine \, the camera is looking from the same angle
  48. as the projector.;
  49. #X obj 14 428 cnv 15 460 300 empty empty Projection_Modules 20 12 0
  50. 14 -261682 -66577 0;
  51. #X obj 29 463 gemhead 51;
  52. #X obj 49 499 ev_pro_22 container1 one;
  53. #X obj 39 559 ev_pro_22 container2 one;
  54. #X obj 29 619 ev_pro_22 container3 one;
  55. #X obj 222 450 r /ev/buf/teapot-buffer/texture_id;
  56. #X obj 484 737 cnv 15 390 650 empty empty Framebuffer_Contents 20 12
  57. 0 14 -204800 -66577 0;
  58. #X obj 494 811 tgl 15 0 empty empty show_framebuffer_contents 17 7
  59. 0 10 -258113 -1 -1 0 1;
  60. #X obj 545 1132 pix_texture;
  61. #X obj 494 764 loadbang;
  62. #X msg 494 786 0;
  63. #X obj 494 1041 gemhead 100;
  64. #X obj 608 1109 r /ev/buf/teapot-buffer/texture_id;
  65. #X msg 534 889 \; /ev/pro/container1/state \$1 \; /ev/pro/container2/state
  66. \$1 \; /ev/pro/container3/state \$1 \;;
  67. #X obj 534 845 == 0;
  68. #X msg 514 977 \; /ev/texhelper/container1/state \$1 \; /ev/texhelper/container2/state
  69. \$1 \; /ev/texhelper/container3/state \$1 \;;
  70. #X obj 545 1109 separator;
  71. #X obj 494 1068 t a a a a;
  72. #X text 569 1087 texture framebuffer contents onto rectangle;
  73. #X text 538 1196 show texture positions of the projection modules \;
  74. and enable mouse cursor interaction.;
  75. #X text 531 959 1: turn on texhelper modules;
  76. #X text 543 869 0: turn off cursor interaction for projection modules
  77. ;
  78. #X text 567 845 invert value;
  79. #X obj 14 737 cnv 15 460 155 empty empty Framebuffer_for_projection
  80. 20 12 0 14 -203904 -66577 0;
  81. #X obj 14 896 cnv 15 460 450 empty empty 3d-scene:_the_rotating_teapot_again
  82. 20 12 0 14 -204786 -66577 0;
  83. #X obj 20 763 gemhead;
  84. #X obj 39 1081 rotateXYZ 0 0 0;
  85. #X obj 126 1006 loadbang;
  86. #X msg 126 1028 0 \, 360 10000;
  87. #X obj 126 1050 line;
  88. #X obj 67 1028 sel 360;
  89. #X obj 20 809 ev_buf teapot-buffer one;
  90. #X obj 20 1291 world_light;
  91. #X obj 39 956 separator;
  92. #X text 100 1294 light source;
  93. #X obj 20 785 alpha;
  94. #X obj 39 978 translateXYZ 0 0 0;
  95. #X obj 39 1264 teapot 2.5;
  96. #X obj 39 1240 color 1 1 1 1;
  97. #X text 46 677 The three projection modules all get the same texture.
  98. ;
  99. #X text 46 695 In the settings dialog \, "set_alpha_to_'1'" is turned
  100. off \, to allow a transparent background.;
  101. #X obj 114 1214 pack 0 0 0 1;
  102. #X obj 114 1116 r /teapot/color/r;
  103. #X obj 124 1136 r /teapot/color/g;
  104. #X obj 124 1158 t b f;
  105. #X obj 164 1180 t b f;
  106. #X obj 164 1158 r /teapot/color/b;
  107. #X obj 263 1247 ds_reg two /teapot/color/r;
  108. #X obj 263 1267 ds_reg two /teapot/color/g;
  109. #X obj 263 1287 ds_reg two /teapot/color/b;
  110. #X text 232 1225 register color to storage domain "two";
  111. #X obj 20 929 t a a a;
  112. #X obj 262 984 ev_pic grid one;
  113. #X obj 262 1056 pix_texture;
  114. #X obj 545 1156 square 4;
  115. #X obj 262 1078 translateXYZ 0 0 -4;
  116. #X obj 262 1102 square 8;
  117. #X text 240 941 For adjustment of texture coordinates \; show grid
  118. behind teapot:;
  119. #X obj 755 119 vsl 15 128 0 1 0 0 /teapot/color/r /teapot/color/r R
  120. 0 -9 0 10 -258113 -1 -1 12700 1;
  121. #X obj 775 119 vsl 15 128 0 1 0 0 /teapot/color/g /teapot/color/g G
  122. 0 -9 0 10 -4034 -1 -1 8509 1;
  123. #X obj 795 119 vsl 15 128 0 1 0 0 /teapot/color/b /teapot/color/b B
  124. 0 -9 0 10 -4160 -1 -1 0 1;
  125. #X text 724 15 (C)2012 Narian Weger;
  126. #X obj 489 57 loadbang;
  127. #X obj 489 127 tgl 15 0 empty empty change_scenes_automatically 17
  128. 7 0 10 -260097 -1 -1 1 1;
  129. #X obj 489 149 metro 4000;
  130. #X obj 489 252 s /ds/one/scene;
  131. #X obj 489 211 random 7;
  132. #X floatatom 489 233 5 0 0 0 - - -;
  133. #X obj 592 189 del 2000;
  134. #X obj 592 211 random 4;
  135. #X floatatom 592 233 5 0 0 0 - - -;
  136. #X obj 592 252 s /ds/two/scene;
  137. #X obj 489 79 del 8000;
  138. #X msg 489 101 1;
  139. #X text 743 80 Teapot Color;
  140. #X obj 528 1240 ev_texhelper container1 one;
  141. #X obj 511 1290 ev_texhelper container2 one;
  142. #X obj 494 1340 ev_texhelper container3 one;
  143. #N canvas 198 60 450 300 storage 0;
  144. #X obj 125 38 ds_logic one;
  145. #X obj 125 58 ds_logic two;
  146. #X obj 131 107 ds_transition one;
  147. #X obj 135 142 ds_transition two;
  148. #X restore 24 101 pd storage;
  149. #X obj 15 167 cnv 15 460 250 empty empty Storage 20 12 0 14 -204800
  150. -66577 0;
  151. #X obj 36 196 ds_gui one;
  152. #X obj 270 191 ds_gui two;
  153. #X obj 24 324 ds_transition_gui one;
  154. #X obj 247 326 ds_transition_gui two;
  155. #X connect 5 0 6 0;
  156. #X connect 6 0 7 0;
  157. #X connect 7 0 8 0;
  158. #X connect 13 0 14 0;
  159. #X connect 13 0 15 0;
  160. #X connect 13 0 16 0;
  161. #X connect 17 0 14 1;
  162. #X connect 17 0 15 1;
  163. #X connect 17 0 16 1;
  164. #X connect 19 0 23 0;
  165. #X connect 19 0 27 0;
  166. #X connect 19 0 26 0;
  167. #X connect 20 0 66 0;
  168. #X connect 21 0 22 0;
  169. #X connect 22 0 19 0;
  170. #X connect 23 0 29 0;
  171. #X connect 24 0 20 1;
  172. #X connect 26 0 25 0;
  173. #X connect 28 0 20 0;
  174. #X connect 29 0 89 0;
  175. #X connect 29 1 88 0;
  176. #X connect 29 2 87 0;
  177. #X connect 29 3 28 0;
  178. #X connect 37 0 47 0;
  179. #X connect 38 0 50 0;
  180. #X connect 39 0 40 0;
  181. #X connect 40 0 41 0;
  182. #X connect 41 0 42 0;
  183. #X connect 41 0 38 1;
  184. #X connect 41 0 38 2;
  185. #X connect 41 0 38 3;
  186. #X connect 42 0 40 0;
  187. #X connect 43 0 63 0;
  188. #X connect 45 0 48 0;
  189. #X connect 47 0 43 0;
  190. #X connect 48 0 38 0;
  191. #X connect 50 0 49 0;
  192. #X connect 53 0 50 1;
  193. #X connect 54 0 53 0;
  194. #X connect 55 0 56 0;
  195. #X connect 56 0 53 0;
  196. #X connect 56 1 53 1;
  197. #X connect 57 0 53 0;
  198. #X connect 57 1 53 2;
  199. #X connect 58 0 57 0;
  200. #X connect 63 0 44 0;
  201. #X connect 63 1 45 0;
  202. #X connect 63 2 64 0;
  203. #X connect 64 0 65 0;
  204. #X connect 65 0 67 0;
  205. #X connect 67 0 68 0;
  206. #X connect 74 0 84 0;
  207. #X connect 75 0 76 0;
  208. #X connect 76 0 78 0;
  209. #X connect 76 0 80 0;
  210. #X connect 78 0 79 0;
  211. #X connect 79 0 77 0;
  212. #X connect 80 0 81 0;
  213. #X connect 81 0 82 0;
  214. #X connect 82 0 83 0;
  215. #X connect 84 0 85 0;
  216. #X connect 85 0 75 0;
  217. #X coords 0 0 1 1 85 60 0;