openGL 3D Camera perspective problem

Apr 19, 2006 at 12:44pm

openGL 3D Camera perspective problem

#25505
Apr 19, 2006 at 1:46pm

Hi Falk,

your problem is not very clear to me from what you describe.
To me the yellow, blue and purple planes don’t move relative to each other.
If you move the camera, the point of view changes, and obviously, the
planes will move *on the jit.window screen*, but they don’t move
relatively to
the floor plane.
(Which seems rather normal with respect to real life conventions,
otherwise Matrix’s
directors would really have made that matrix revolution)
FWIW, your yellow, blue and purple planes are crossing the floor, which
is maybe
what you call scrubbing, but thats just a matter of positionning your
objects at
the right place.
Also note that if you move the camera along the x-axis, without movin
the LookAt
parameter at the same time, you will get a “turning around your scene”
effects,
rather than a travelling effect.
hope this helps
v.

#75161
Apr 19, 2006 at 3:58pm

Hi Vincent,

Thanks for your answer. I only mean relative to the red plane, not
yellow blue and purple to each other. But anyway I kept on trying and I
solved it the way I want it:

cheers

Falk
max v2;
#N vpatcher 536 118 843 631;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 74 43 48 196617 loadbang;
#P comment 119 232 100 196617 background;
#N vpatcher 563 309 1016 754;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 152 34 48 196617 loadbang;
#P message 120 287 288 196617 reset , glcolor 1. 1. 0. , poly_mode 1
1 , shapeslice 10 , plane 1;
#P window linecount 0;
#P newex 147 252 48 196617 loadbang;
#P flonum 151 70 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 174 116 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 168 96 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 132 115 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 105 136 87 196617 pak scale 1. 1. 1.;
#P flonum 302 113 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 282 93 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 246 112 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 219 133 109 196617 pak position -3. 0. -8.;
#P newex 34 342 103 196617 jit.gl.sketch showme;
#P connect 1 0 0 0;
#P connect 5 0 0 0;
#P connect 11 0 0 0;
#P connect 12 0 5 0;
#P connect 10 0 11 0;
#P connect 6 0 5 1;
#P connect 9 0 6 0;
#P connect 7 0 5 2;
#P connect 9 0 7 0;
#P connect 8 0 5 3;
#P connect 12 0 1 0;
#P connect 2 0 1 1;
#P connect 3 0 1 2;
#P connect 4 0 1 3;
#P pop;
#P newobj 41 276 64 196617 p plane_yell;
#N vpatcher 447 132 1259 615;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 225 69 48 196617 loadbang;
#P message 144 294 291 196617 reset , glcolor 1. 0.5 1 , poly_mode 1
1 , shapeslice 10 , plane 1;
#P window linecount 0;
#P newex 205 245 48 196617 loadbang;
#P flonum 60 73 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 83 119 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 77 99 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 41 118 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 14 139 87 196617 pak scale 1. 1. 1.;
#P flonum 339 112 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 333 92 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 297 111 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 270 132 104 196617 pak position 3. 0. -5.;
#P newex 85 341 103 196617 jit.gl.sketch showme;
#P connect 6 0 5 1;
#P connect 9 0 6 0;
#P connect 7 0 5 2;
#P connect 9 0 7 0;
#P connect 5 0 0 0;
#P connect 11 0 0 0;
#P connect 1 0 0 0;
#P connect 8 0 5 3;
#P connect 10 0 11 0;
#P connect 12 0 1 0;
#P connect 2 0 1 1;
#P connect 3 0 1 2;
#P connect 4 0 1 3;
#P pop;
#P newobj 41 319 67 196617 p plane_purp;
#N vpatcher 374 174 846 621;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 192 26 48 196617 loadbang;
#P window linecount 0;
#P message 190 61 14 196617 1;
#P message 164 306 285 196617 reset , glcolor 0. 1. 1 , poly_mode 1 1
, shapeslice 10 , plane 1;
#P newex 220 230 48 196617 loadbang;
#P flonum 165 82 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 188 128 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 182 108 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 146 127 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 119 148 87 196617 pak scale 1. 1. 1.;
#P flonum 334 126 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 296 105 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 260 124 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 233 145 104 196617 pak position 0. 0. -4.;
#P newex 48 354 103 196617 jit.gl.sketch showme;
#P connect 1 0 0 0;
#P connect 5 0 0 0;
#P connect 11 0 0 0;
#P connect 13 0 5 0;
#P connect 6 0 5 1;
#P connect 9 0 6 0;
#P connect 10 0 11 0;
#P connect 12 0 9 0;
#P connect 7 0 5 2;
#P connect 9 0 7 0;
#P connect 8 0 5 3;
#P connect 13 0 1 0;
#P connect 2 0 1 1;
#P connect 3 0 1 2;
#P connect 4 0 1 3;
#P pop;
#P newobj 41 362 65 196617 p plane_blue;
#N vpatcher 158 380 456 686;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#N vpatcher 10 59 610 459;
#P window setfont “Sans Serif” 9.;
#P newex 83 131 31 196617 t b 0;
#P newex 50 50 29 196617 t 1 l;
#P newex 50 79 46 196617 metro 1;
#P newex 50 108 43 196617 bline 0.;
#P inlet 50 30 15 0;
#P outlet 83 153 15 0;
#P outlet 50 130 15 0;
#P connect 2 0 5 0;
#P fasten 6 1 4 0 109 155 42 155 42 76 55 76;
#P connect 5 0 4 0;
#P connect 4 0 3 0;
#P fasten 5 1 3 0 99 103 55 103;
#P connect 3 0 0 0;
#P connect 3 1 6 0;
#P connect 6 0 1 0;
#P pop;
#P newobj 179 62 41 196617 p f.line;
#P message 190 113 84 196617 6 5000 -6 5000;
#N vpatcher 10 59 610 459;
#P window setfont “Sans Serif” 9.;
#P newex 83 131 31 196617 t b 0;
#P newex 50 50 29 196617 t 1 l;
#P newex 50 79 46 196617 metro 1;
#P newex 50 108 43 196617 bline 0.;
#P inlet 50 30 15 0;
#P outlet 83 153 15 0;
#P outlet 50 130 15 0;
#P connect 2 0 5 0;
#P connect 5 0 4 0;
#P fasten 6 1 4 0 109 155 42 155 42 76 55 76;
#P fasten 5 1 3 0 99 103 55 103;
#P connect 4 0 3 0;
#P connect 3 0 0 0;
#P connect 3 1 6 0;
#P connect 6 0 1 0;
#P pop;
#P newobj 202 136 41 196617 p f.line;
#P message 198 44 84 196617 2 1000 -2 1000;
#P newex 119 27 66 196617 loadmess 60;
#P flonum 184 88 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 84 26 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 86 49 72 196617 lens_angle $1;
#P flonum 188 181 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 153 181 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 117 181 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 90 212 93 196617 pak lookat 0. 3. -8;
#P newex 20 40 48 196617 loadbang;
#P flonum 94 80 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 132 91 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 69 119 97 196617 pak camera 0. 3. 2.;
#P outlet 69 154 15 0;
#P fasten 4 0 1 0 25 83 74 83;
#P fasten 9 0 0 0 91 135 74 135;
#P fasten 5 0 0 0 95 248 34 248 34 140 74 140;
#P connect 1 0 0 0;
#P connect 12 0 10 0;
#P connect 10 0 9 0;
#P fasten 4 0 5 0 25 190 95 190;
#P connect 16 0 3 0;
#P connect 3 0 1 1;
#P connect 6 0 5 1;
#P connect 2 0 1 2;
#P fasten 7 0 5 2 158 204 149 204;
#P connect 11 0 1 3;
#P fasten 8 0 5 3 193 204 176 204;
#P connect 13 0 16 0;
#P connect 14 0 11 0;
#P connect 4 0 15 0;
#P connect 14 1 15 0;
#P connect 4 0 13 0;
#P connect 16 1 13 0;
#P connect 15 0 14 0;
#P pop 1;
#P newobj 74 105 51 196617 p camera;
#N vpatcher 512 264 1324 747;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P message 411 115 25 196617 -14;
#P message 379 112 14 196617 4;
#P message 195 94 14 196617 5;
#P window linecount 1;
#P newex 295 55 48 196617 loadbang;
#P flonum 185 122 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 208 168 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 202 148 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 166 167 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 139 188 87 196617 pak scale 1. 1. 1.;
#P flonum 407 187 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 363 162 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 314 186 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 304 243 95 196617 pak position 0. 0. 0.;
#P message 259 298 292 196617 reset , color 0. 1. 0. 1. , poly_mode 1
1 , shapeslice 10 , plane 1;
#P newex 232 333 103 196617 jit.gl.sketch showme;
#P connect 7 0 6 1;
#P connect 10 0 7 0;
#P connect 12 0 10 0;
#P connect 8 0 6 2;
#P connect 11 0 12 0;
#P connect 10 0 8 0;
#P connect 9 0 6 3;
#P connect 1 0 0 0;
#P connect 2 0 0 0;
#P connect 6 0 0 0;
#P connect 11 0 1 0;
#P connect 3 0 2 1;
#P connect 4 0 2 2;
#P connect 13 0 4 0;
#P connect 11 0 13 0;
#P connect 5 0 2 3;
#P connect 14 0 5 0;
#P connect 11 0 14 0;
#P pop;
#P newobj 41 233 72 196617 p plane_green;
#N vpatcher 499 61 1311 544;
#P window setfont “Sans Serif” 9.;
#P window linecount 0;
#P message 240 228 20 196617 90;
#P number 141 222 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 141 261 92 196617 rotate $1 1. 0. 0.;
#P message 367 58 20 196617 10;
#P window linecount 1;
#P newex 424 251 48 196617 loadbang;
#P flonum 351 84 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 421 117 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 368 110 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 328 114 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 305 150 87 196617 pak scale 1. 1. 1.;
#P flonum 432 172 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 426 152 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 390 171 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 363 192 109 196617 pak position 0. -1. -8.;
#P message 279 322 292 196617 reset , color 1. 0. 0. 1. , poly_mode 1
1 , shapeslice 10 , plane 1;
#P newex 232 366 103 196617 jit.gl.sketch showme;
#P connect 15 0 14 0;
#P connect 14 0 13 0;
#P connect 13 0 0 0;
#P connect 1 0 0 0;
#P connect 6 0 0 0;
#P connect 2 0 0 0;
#P connect 11 0 15 0;
#P connect 11 0 1 0;
#P connect 10 0 7 0;
#P connect 7 0 6 1;
#P connect 12 0 10 0;
#P connect 8 0 6 2;
#P connect 11 0 2 0;
#P connect 11 0 12 0;
#P connect 10 0 8 0;
#P connect 9 0 6 3;
#P connect 3 0 2 1;
#P connect 4 0 2 2;
#P connect 5 0 2 3;
#P pop;
#P newobj 41 190 62 196617 p plane_red;
#P toggle 14 35 15 0;
#P newex 14 133 99 196617 jit.gl.render showme;
#N vpatcher 30 89 343 331;
#P window setfont “Sans Serif” 9.;
#P newex 130 33 48 196617 loadbang;
#P newex 131 53 80 196617 patcherargs ms;
#P outlet 80 172 15 0;
#P newex 112 126 167 196617 jit.window showme @fsmenubar 0;
#P toggle 196 83 15 0;
#P newex 157 82 35 196617 sel 27;
#P newex 112 82 40 196617 key;
#P newex 112 104 91 196617 prepend fullscreen;
#P newex 44 97 43 196617 jit.qball;
#P newex 44 74 52 196617 metro 40;
#P newex 44 128 66 196617 t b b b erase;
#P inlet 44 52 15 0;
#P inlet 89 53 15 0;
#P outlet 44 172 15 0;
#P outlet 62 172 15 0;
#P connect 3 0 5 0;
#P connect 5 0 6 0;
#P connect 6 0 4 0;
#P fasten 4 3 1 0 103 158 49 158;
#P connect 4 0 1 0;
#P connect 4 1 0 0;
#P connect 4 2 12 0;
#P connect 2 0 5 1;
#P fasten 13 1 5 1 206 71 91 71;
#P fasten 10 0 7 0 201 102 117 102;
#P connect 7 0 11 0;
#P connect 14 0 13 0;
#P fasten 8 0 9 0 117 101 154 101 154 80 162 80;
#P fasten 9 0 10 0 162 100 193 100 193 80 201 80;
#P pop;
#P newobj 14 73 54 196617 p @ms 40;
#P comment 116 192 100 196617 floor;
#P connect 11 0 3 0;
#P connect 3 0 1 0;
#P connect 1 0 2 0;
#P fasten 6 0 2 0 79 127 19 127;
#P pop;

#75162

You must be logged in to reply to this topic.