03a_ev_example_panoramic_360.pd 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. #N canvas 358 22 1185 756 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 466 248 cnv 15 400 350 empty empty OUTPUT_MODULES 20 12 0 14
  8. -204800 -66577 0;
  9. #X obj 10 40 cnv 15 500 180 empty empty FRAMEBUFFER 20 12 0 14 -262130
  10. -66577 0;
  11. #X obj 10 228 cnv 15 450 400 empty empty INPUT_MODULES 20 12 0 14 -204786
  12. -66577 0;
  13. #X obj 15 288 t a a;
  14. #X obj 10 10 cnv 15 870 16 empty empty example:_360_DEGREES_PANORAMIC_VIDEO_&_PROJECTION
  15. 20 8 0 14 -233017 -66577 0;
  16. #X obj 526 88 cnv 15 160 50 empty empty INITIALISATIONS 20 12 0 14
  17. -261234 -66577 0;
  18. #N canvas 407 107 485 422 init 0;
  19. #X obj 56 92 loadbang;
  20. #X obj 44 -23 cnv 15 400 100 empty empty IMPORTANT 20 12 0 14 -261234
  21. -66577 0;
  22. #X text 49 -3 Such a declare object should always be in the main patch
  23. of your project \, to set the pathes to the abstractions.;
  24. #X text 159 160 load the preset file on startup:;
  25. #X obj 56 134 t b b;
  26. #X obj 83 158 del 1000;
  27. #X obj 56 241 del 3000;
  28. #X text 127 93 The DATA STORAGE SYSTEM will be explained in a later
  29. example.;
  30. #X obj 158 43 ev-main/ev_declare;
  31. #X text 156 229 (pathes relative to "./libs/kollabs");
  32. #X text 66 282 Recall scene '0' from the loaded preset file;
  33. #X msg 83 180 \; /ds/0/loadfile ../../data/ev_example_panoramic_360_preset.txt
  34. ;
  35. #X msg 56 302 \; /ds/0/scene 0;
  36. #X connect 0 0 4 0;
  37. #X connect 4 0 6 0;
  38. #X connect 4 1 5 0;
  39. #X connect 5 0 11 0;
  40. #X connect 6 0 12 0;
  41. #X restore 620 117 pd init;
  42. #X text 541 115 look inside:;
  43. #X obj 490 275 gemhead 50;
  44. #X obj 490 298 t a a a;
  45. #X obj 15 71 gemhead 20;
  46. #X obj 477 613 ev_storage;
  47. #X obj 526 158 ev_gemwin;
  48. #X obj 15 96 ev_buf 0;
  49. #X obj 15 475 ev_grid 0;
  50. #X obj 42 317 ev_pic 0;
  51. #X obj 42 390 ev_360 0;
  52. #X obj 300 124 gemhead 100;
  53. #X obj 300 174 pix_texture;
  54. #X obj 300 104 tgl 15 0 empty empty show_framebuffer_contents 17 7
  55. 0 10 -260097 -1 -1 0 1;
  56. #X obj 300 56 loadbang;
  57. #X msg 300 78 0;
  58. #X text 59 254 This example uses a 360 degree photo. Click on "calib"
  59. in the [ev_360] module to deactivate the image unwrapping. You see
  60. \, that the image is taken with a cone-shaped mirror in front of the
  61. camera lens.;
  62. #X text 529 33 This example uses one panorama image \, made with one
  63. camera in front of a cone-shaped mirror \, and projects it on an immersive
  64. screen made of three planar elements.;
  65. #X obj 722 302 r /ev/buf/0/texture_id;
  66. #X obj 363 148 r /ev/buf/0/texture_id;
  67. #X obj 683 482 r /ev/buf/0/texture_id;
  68. #X obj 702 392 r /ev/buf/0/texture_id;
  69. #X text 717 134 click "create" to start;
  70. #X text 609 282 get framebuffer texture id of framebuffer;
  71. #X obj 529 330 ev_pro_22 r;
  72. #X obj 509 420 ev_pro_22 c;
  73. #X obj 490 510 ev_pro_22 l;
  74. #N canvas 0 22 214 204 rotation 0;
  75. #X obj 63 53 loadbang;
  76. #X obj 63 119 t f f;
  77. #X obj 131 104 sel 360;
  78. #X obj 63 141 s /ev/360/0/rot;
  79. #X obj 63 97 line 0 40;
  80. #X msg 63 75 0 \, 360 40000;
  81. #X obj 34 55 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
  82. -1;
  83. #X text 54 30 Rotation:;
  84. #X connect 0 0 5 0;
  85. #X connect 1 0 3 0;
  86. #X connect 1 1 2 0;
  87. #X connect 2 0 5 0;
  88. #X connect 4 0 1 0;
  89. #X connect 5 0 4 0;
  90. #X connect 6 0 5 0;
  91. #X restore 332 348 pd rotation;
  92. #X text 680 712 (c)2012 Peter Venus & Marian Weger \; /part of EXTENDED
  93. VIEW toolkit/ gpl v3;
  94. #X text 633 623 Presets are located in the "./data" folder \; This
  95. example uses scene "0" of "ev_example_panoramic_360_preset.txt";
  96. #X obj 300 196 rectangle 4 4;
  97. #X connect 3 0 14 0;
  98. #X connect 3 1 15 0;
  99. #X connect 8 0 9 0;
  100. #X connect 9 0 32 0;
  101. #X connect 9 1 31 0;
  102. #X connect 9 2 30 0;
  103. #X connect 10 0 13 0;
  104. #X connect 13 0 3 0;
  105. #X connect 15 0 16 0;
  106. #X connect 17 0 18 0;
  107. #X connect 18 0 36 0;
  108. #X connect 19 0 17 0;
  109. #X connect 20 0 21 0;
  110. #X connect 21 0 19 0;
  111. #X connect 24 0 30 1;
  112. #X connect 25 0 18 1;
  113. #X connect 26 0 32 1;
  114. #X connect 27 0 31 1;
  115. #X coords 0 756 1 755 85 60 0;