Forums > Jitter

[ANN] updated gl Space Navigators

May 11, 2008 | 5:57 pm

Hi guys,

New versions of my Jitter GL space navigators are now available.

http://www.zacharyseldess.com/z.glNav.html

As before, there are three versions:

z.glNav1 – a walking simulator
z.glNav2 – a flight simulator
z.glNav_quad – a surround video flight simulator

And another new addition:

I’ve made versions of each abstraction for use with the Wii remote (you’ll need Masayuki Akamatsu’s aka.wiiremote object).

z.wii.glNav1 – walking simulator
z.wii.glNav2 – flight simulator
z.wii.glNav_quad – surround video flight simulator

There are some other improvements, such as changeable camera easing, etc.
Another improvement of the surround video version is in the works (many thanks to Pelado!)

All patches come with help files, and documentation.

Everything can be found here:
http://www.zacharyseldess.com/z.glNav.html
(user page is not updated with the newest versions yet)

As always, feedback is very appreciated. Thanks.

best,
Zachary


May 11, 2008 | 7:03 pm

great zach, make it a standalone to wiin instant internets fame and fortune

On Sun, May 11, 2008 at 8:57 PM, Zachary Seldess
wrote:

>
> Hi guys,
>
> New versions of my Jitter GL space navigators are now available.
>
> http://www.zacharyseldess.com/z.glNav.html
>
> As before, there are three versions:
>
> z.glNav1 – a walking simulator
> z.glNav2 – a flight simulator
> z.glNav_quad – a surround video flight simulator
>
> And another new addition:
>
> I’ve made versions of each abstraction for use with the Wii remote (you’ll
> need Masayuki Akamatsu’s aka.wiiremote object).
>
> z.wii.glNav1 – walking simulator
> z.wii.glNav2 – flight simulator
> z.wii.glNav_quad – surround video flight simulator
>
> There are some other improvements, such as changeable camera easing, etc.
> Another improvement of the surround video version is in the works (many
> thanks to Pelado!)
>
> All patches come with help files, and documentation.
>
> Everything can be found here:
> http://www.zacharyseldess.com/z.glNav.html
> (user page is not updated with the newest versions yet)
>
> As always, feedback is very appreciated. Thanks.
>
> best,
> Zachary
> –
> http://www.zacharyseldess.com
>
>


May 11, 2008 | 7:27 pm

Ha! Yes, we can all be wiinners!


May 13, 2008 | 5:07 pm

hi zach, i’m having a problem (with the camera in general) and using your
navigator i confront it again.

in this patch, i use the drawobject method to readback into texture,
but i dont real get how i control the rendering order using the layers
method.
is there any specific order in which i need to bang the texutres going into
the videoplanes?
i slayers all i need?

here is one example, dont know if its even connected. the standing layer
acts like its a peephole, also i dont know if its visible, the grabbed
texture (the floor is straight to context, no readback) has a small delay
when i move the camera. it seams to slide a frame behind.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 25 70 255 236;
#P window setfont "Sans Serif" 9.;
#P flonum 139 52 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 50 73 99 9109513 jit.op @op > @val 0.3;
#P newex 50 94 85 9109513 jit.pack;
#P newex 51 50 85 9109513 jit.unpack;
#P inlet 51 30 15 0;
#P outlet 50 118 15 0;
#P connect 2 1 4 0;
#P connect 4 0 3 0;
#P connect 3 0 0 0;
#P connect 1 0 2 0;
#P connect 2 1 3 1;
#P connect 2 2 3 2;
#P connect 2 3 3 3;
#P connect 5 0 4 1;
#P pop;
#P newobj 240 261 89 9109513 p extractFakeAlpha;
#P comment 283 48 87 9109513 0. initialize >>;
#P button 371 47 15 0;
#P newex 21 126 181 9109513 jit.window test @floating 1 @size 640 480;
#P newex 390 44 48 9109513 loadbang;
#P newex 68 78 72 9109513 z.glNav2 test 6;
#P message 441 46 29 9109513 reset;
#P message 421 151 115 9109513 reset , drawobject floory 0;
#P newex 421 171 116 9109513 jit.gl.sketch test @layer 3;
#P window setfont "Sans Serif" 10.;
#P window linecount 2;
#P message 239 169 115 9109514 importmovie chilis.jpg , bang;
#P window setfont "Sans Serif" 9.;
#P newex 400 281 250 9109513 jit.gl.videoplane test @automatic 0 @name
floory @blend_enable 1 @position 0. -0.5 0.5 @rotate 90 1 0 0 0;
#P window linecount 1;
#P message 428 78 310 9109513 reset , drawobject ol2_plane 0 , drawobject
ol_plane 0 , drawobject floory 0;
#P newex 240 349 390 9109513 jit.gl.videoplane test @automatic 0 @name
ol2_plane @blend_enable 1 @position 0.75 0.55;
#P comment 38 31 87 9109513 2. turn on qmetro;
#P flonum 130 31 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 53 128 196 272;
#P window setfont "Sans Serif" 9.;
#P newex 41 99 41 9109513 s draw;
#P newex 17 52 58 9109513 t b b erase;
#P inlet 17 32 15 0;
#P outlet 17 83 15 0;
#P connect 1 0 2 0;
#P fasten 2 2 0 0 70 75 22 75;
#P connect 2 0 0 0;
#P connect 2 1 3 0;
#P pop;
#P newobj 21 78 42 9109513 p Draw;
#P toggle 21 30 15 0;
#P newex 21 49 120 9109513 qmetro 33;
#P newex 21 103 165 9109513 jit.gl.render test @erase_color 0 0 0 1;
#P newex 27 309 141 9109513 jit.gl.texture test @name fb_tex;
#P comment 38 286 21 9109513 FB;
#P window linecount 2;
#P newex 27 331 167 9109513 jit.gl.videoplane test@automatic 0 @name
fb_plane @position 0 0 -1.5;
#P window linecount 1;
#P newex 239 209 44 9109513 jit.matrix;
#P newex 263 325 375 9109513 jit.gl.videoplane test @automatic 0 @name
ol_plane @blend_enable 1 @position 1 0 0.5;
#P comment 214 328 21 9109513 OL;
#P comment 567 201 100 9109513 3.draw to screen;
#P comment 606 124 127 9109513 1.draw FT and OL to capture;
#P message 390 199 126 9109513 reset , drawobject fb_plane 0;
#P newex 390 65 19 9109513 t b;
#P message 411 103 224 9109513 reset , drawobject ol_plane 0 , drawobject
ol2_plane 0;
#P newex 390 219 116 9109513 jit.gl.sketch test @layer 3;
#P newex 411 123 189 9109513 jit.gl.sketch test @layer 3 @capture fb_tex;
#P connect 15 0 14 0;
#P connect 14 0 16 0;
#P connect 16 0 13 0;
#P fasten 26 0 13 0 73 100 26 100;
#P connect 12 0 10 0;
#P connect 17 0 14 1;
#P connect 3 0 22 0;
#P connect 22 0 9 0;
#P connect 9 0 31 0;
#P connect 31 0 19 0;
#P connect 31 0 8 0;
#P connect 29 0 27 0;
#P connect 27 0 3 0;
#P fasten 25 0 3 0 446 64 395 64;
#P fasten 3 0 4 0 395 165 395 165;
#P connect 4 0 1 0;
#P fasten 9 0 21 0 244 254 405 254;
#P fasten 3 0 2 0 395 90 416 90;
#P connect 2 0 0 0;
#P connect 20 0 0 0;
#P fasten 3 0 24 0 395 147 426 147;
#P connect 24 0 23 0;
#P window clipboard copycount 32;

On Sun, May 11, 2008 at 10:27 PM, Zachary Seldess
wrote:

>
> Ha! Yes, we can all be wiinners!
> –
> http://www.zacharyseldess.com
>
>


May 14, 2008 | 5:19 am

Hi guys,

Just uploaded another update.

Now the z.wii.glNav versions have two modes:
mode 1 = regular wii remote control
mode 2 = wii remote with the Wii Wheel. Fun!

best,
Zachary

Get it here:

http://www.zacharyseldess.com/z.glNav.html


May 14, 2008 | 8:56 pm

Thanks for sharing, Zach.

Kyred


May 14, 2008 | 10:12 pm

Hi Yair,

Nice patch. I looked at it a bit, but I just need a little more time to write a coherent response. I’m going to get back to you soon.

Zachary


May 15, 2008 | 4:15 am

Yair,

I’m not sure I’m helping, but here’s your patch with some changes and explanations about layers, and perceived "peephole" frame delay. Hope this helps.

Zachary

max v2;
#N vpatcher 434 126 1416 806;
#P origin -80 0;
#P window setfont "Sans Serif" 12.;
#P comment 38 357 16 196620 2;
#B color 12;
#P comment 38 324 16 196620 1;
#B color 12;
#P window setfont "Sans Serif" 9.;
#P window linecount 4;
#P comment 6 263 344 196617 In the second , we see an exact mirror of our window view (plus the invisible planes that only appear in the peephole) , and since the peephole essentially rotates with our camera (i.e. transform_reset 2) , it’s easy to see the correct representation.;
#P window linecount 3;
#P comment 6 219 344 196617 In the first , though , the reason it looks off is because the "peephole" is not rotating with us. So it is showing our current window view , but the plane on which it is displayed is not always perpendicular to our line of sight;
#P window linecount 2;
#P message 57 319 225 196617 reset , drawobject fb_plane 0 , transform_reset 0 , position 0. 0. 0. , scale 1 1 1 , layer 0;
#P message 57 352 238 196617 reset , drawobject fb_plane 0 , transform_reset 2 , position -0.65 0.55 0. , scale 0.3 0.4 0.3 , layer 1;
#P window setfont "Sans Serif" 12.;
#P comment 297 505 262 196620 THE OBJECT WITH THE HIGHER LAYER WILL RENDER IN FRONT OF THE OTHER ONE;
#B color 12;
#P comment 297 466 288 196620 CHANGE LAYER (TO RIGHT AND ABOVE) TO CHANGE VIDEOPLANE FRONT/BACK RENDERING;
#B color 12;
#P window linecount 1;
#P comment 482 220 372 196620 CHANGE DRAW ORDER TO CONTROL FRONT/BACK RENDERING;
#B color 12;
#P window setfont "Sans Serif" 9.;
#P message 489 240 352 196617 reset , drawobject floory 0 , drawobject ol_plane 0 , drawobject ol2_plane 0;
#P comment 718 352 208 196617 2c. add texture to videoplane name fb_plane;
#P comment 632 330 125 196617 2b. instantiate as texture;
#P comment 808 511 38 196617 floory;
#P newex 473 328 157 196617 jit.gl.texture test @name fb_tex;
#P comment 638 307 111 196617 2a. capture videoplanes;
#P comment 602 421 163 196617 1.populate videoplanes with image;
#P number 371 357 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 371 380 49 196617 layer $1;
#P number 722 479 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 722 502 49 196617 layer $1;
#N vpatcher 25 70 278 263;
#P window setfont "Sans Serif" 9.;
#P flonum 165 59 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 69 86 106 196617 jit.op @op > @val 0.3;
#P newex 69 115 85 196617 jit.pack;
#P newex 51 50 85 196617 jit.unpack;
#P inlet 51 30 15 0;
#P outlet 69 139 15 0;
#P connect 1 0 2 0;
#P connect 2 1 4 0;
#P connect 4 0 3 0;
#P connect 3 0 0 0;
#P connect 2 1 3 1;
#P connect 2 2 3 2;
#P connect 2 3 3 3;
#P connect 5 0 4 1;
#P pop;
#P newobj 591 506 103 196617 p extractFakeAlpha;
#P comment 372 153 74 196617 0. initialize;
#P button 355 152 15 0;
#P newex 355 125 206 196617 jit.window test @size 640 480 @pos 10 50;
#P newex 355 172 48 196617 loadbang;
#P newex 402 77 79 196617 z.glNav2 test 3;
#P message 406 174 29 196617 reset;
#P window setfont "Sans Serif" 10.;
#P window linecount 2;
#P message 591 437 115 196618 importmovie chilis.jpg , bang;
#P window setfont "Sans Serif" 9.;
#P window linecount 3;
#P newex 702 526 237 196617 jit.gl.videoplane test @automatic 1 @name floory @blend_enable 1 @position 0. -0.5 0.5 @rotate 90 1 0 0 0 @layer 1;
#P window linecount 1;
#P message 489 262 359 196617 reset , drawobject ol2_plane 0 , drawobject ol_plane 0 , drawobject floory 0;
#P window linecount 2;
#P newex 591 608 247 196617 jit.gl.videoplane test @automatic 0 @name ol2_plane @blend_enable 1 @position 0.75 0.55;
#P flonum 402 31 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#N vpatcher 53 128 196 272;
#P window setfont "Sans Serif" 9.;
#P newex 41 99 41 196617 s draw;
#P newex 17 52 58 196617 t b b erase;
#P inlet 17 32 15 0;
#P outlet 17 83 15 0;
#P connect 1 0 2 0;
#P fasten 2 2 0 0 70 75 22 75;
#P connect 2 0 0 0;
#P connect 2 1 3 0;
#P pop;
#P newobj 355 77 42 196617 p Draw;
#P toggle 355 29 15 0;
#P newex 355 52 57 196617 qmetro 33;
#P newex 355 102 194 196617 jit.gl.render test @erase_color 0 0 0 1;
#P comment 449 352 21 196617 FB;
#P window linecount 2;
#P newex 473 351 243 196617 jit.gl.videoplane test @texture fb_tex @automatic 0 @name fb_plane @position 0 0 -1.5;
#P window linecount 1;
#P newex 591 477 63 196617 jit.matrix;
#P window linecount 2;
#P newex 614 574 227 196617 jit.gl.videoplane test @automatic 0 @name ol_plane @blend_enable 1 @position 1 0 0.5;
#P window linecount 1;
#P comment 569 579 21 196617 OL;
#P comment 508 400 128 196617 3.draw fb_plane to screen;
#P message 355 399 150 196617 reset , drawobject fb_plane 0;
#P newex 355 193 246 196617 t b b b;
#P message 473 285 352 196617 reset , drawobject ol_plane 0 , drawobject ol2_plane 0 , drawobject floory 0;
#P newex 355 419 129 196617 jit.gl.sketch test @layer 0;
#P newex 473 305 163 196617 jit.gl.sketch test @capture fb_tex;
#P comment 6 200 336 196617 The grabbed texture is rendered correctly in both of these scenarios;
#P connect 14 0 13 0;
#P connect 13 0 15 0;
#P connect 15 0 12 0;
#P fasten 22 0 12 0 407 99 360 99;
#P connect 25 0 23 0;
#P connect 23 0 4 0;
#P fasten 21 0 4 0 411 192 360 192;
#P connect 4 0 5 0;
#P connect 5 0 2 0;
#P connect 30 0 2 0;
#P fasten 42 0 2 0 62 384 360 384;
#P fasten 43 0 2 0 62 384 360 384;
#P connect 31 0 30 0;
#P connect 16 0 13 1;
#P connect 4 1 3 0;
#P connect 3 0 1 0;
#P connect 18 0 1 0;
#P connect 38 0 1 0;
#P connect 4 2 20 0;
#P connect 20 0 9 0;
#P connect 9 0 27 0;
#P connect 27 0 17 0;
#P connect 27 0 8 0;
#P fasten 9 0 19 0 596 500 707 500;
#P connect 28 0 19 0;
#P connect 29 0 28 0;
#P pop;


May 15, 2008 | 6:54 am

thx zach, masterfully explained.
i still don’t get a change of front/back rendering when i mess with the
layer order. changing the drawobject order does. maybe my configuration.

On Thu, May 15, 2008 at 7:15 AM, Zachary Seldess
wrote:

>
> Yair,
>
> I’m not sure I’m helping, but here’s your patch with some changes and
> explanations about layers, and perceived "peephole" frame delay. Hope this
> helps.
>
> Zachary
>
> max v2;
> #N vpatcher 434 126 1416 806;
> #P origin -80 0;
> #P window setfont "Sans Serif" 12.;
> #P comment 38 357 16 196620 2;
> #B color 12;
> #P comment 38 324 16 196620 1;
> #B color 12;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 4;
> #P comment 6 263 344 196617 In the second , we see an exact mirror of our
> window view (plus the invisible planes that only appear in the peephole) ,
> and since the peephole essentially rotates with our camera (i.e.
> transform_reset 2) , it’s easy to see the correct representation.;
> #P window linecount 3;
> #P comment 6 219 344 196617 In the first , though , the reason it looks
> off is because the "peephole" is not rotating with us. So it is showing our
> current window view , but the plane on which it is displayed is not always
> perpendicular to our line of sight;
> #P window linecount 2;
> #P message 57 319 225 196617 reset , drawobject fb_plane 0 ,
> transform_reset 0 , position 0. 0. 0. , scale 1 1 1 , layer 0;
> #P message 57 352 238 196617 reset , drawobject fb_plane 0 ,
> transform_reset 2 , position -0.65 0.55 0. , scale 0.3 0.4 0.3 , layer 1;
> #P window setfont "Sans Serif" 12.;
> #P comment 297 505 262 196620 THE OBJECT WITH THE HIGHER LAYER WILL RENDER
> IN FRONT OF THE OTHER ONE;
> #B color 12;
> #P comment 297 466 288 196620 CHANGE LAYER (TO RIGHT AND ABOVE) TO CHANGE
> VIDEOPLANE FRONT/BACK RENDERING;
> #B color 12;
> #P window linecount 1;
> #P comment 482 220 372 196620 CHANGE DRAW ORDER TO CONTROL FRONT/BACK
> RENDERING;
> #B color 12;
> #P window setfont "Sans Serif" 9.;
> #P message 489 240 352 196617 reset , drawobject floory 0 , drawobject
> ol_plane 0 , drawobject ol2_plane 0;
> #P comment 718 352 208 196617 2c. add texture to videoplane name fb_plane;
> #P comment 632 330 125 196617 2b. instantiate as texture;
> #P comment 808 511 38 196617 floory;
> #P newex 473 328 157 196617 jit.gl.texture test @name fb_tex;
> #P comment 638 307 111 196617 2a. capture videoplanes;
> #P comment 602 421 163 196617 1.populate videoplanes with image;
> #P number 371 357 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 371 380 49 196617 layer $1;
> #P number 722 479 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P message 722 502 49 196617 layer $1;
> #N vpatcher 25 70 278 263;
> #P window setfont "Sans Serif" 9.;
> #P flonum 165 59 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 69 86 106 196617 jit.op @op > @val 0.3;
> #P newex 69 115 85 196617 jit.pack;
> #P newex 51 50 85 196617 jit.unpack;
> #P inlet 51 30 15 0;
> #P outlet 69 139 15 0;
> #P connect 1 0 2 0;
> #P connect 2 1 4 0;
> #P connect 4 0 3 0;
> #P connect 3 0 0 0;
> #P connect 2 1 3 1;
> #P connect 2 2 3 2;
> #P connect 2 3 3 3;
> #P connect 5 0 4 1;
> #P pop;
> #P newobj 591 506 103 196617 p extractFakeAlpha;
> #P comment 372 153 74 196617 0. initialize;
> #P button 355 152 15 0;
> #P newex 355 125 206 196617 jit.window test @size 640 480 @pos 10 50;
> #P newex 355 172 48 196617 loadbang;
> #P newex 402 77 79 196617 z.glNav2 test 3;
> #P message 406 174 29 196617 reset;
> #P window setfont "Sans Serif" 10.;
> #P window linecount 2;
> #P message 591 437 115 196618 importmovie chilis.jpg , bang;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 3;
> #P newex 702 526 237 196617 jit.gl.videoplane test @automatic 1 @name
> floory @blend_enable 1 @position 0. -0.5 0.5 @rotate 90 1 0 0 0 @layer 1;
> #P window linecount 1;
> #P message 489 262 359 196617 reset , drawobject ol2_plane 0 , drawobject
> ol_plane 0 , drawobject floory 0;
> #P window linecount 2;
> #P newex 591 608 247 196617 jit.gl.videoplane test @automatic 0 @name
> ol2_plane @blend_enable 1 @position 0.75 0.55;
> #P flonum 402 31 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P window linecount 1;
> #N vpatcher 53 128 196 272;
> #P window setfont "Sans Serif" 9.;
> #P newex 41 99 41 196617 s draw;
> #P newex 17 52 58 196617 t b b erase;
> #P inlet 17 32 15 0;
> #P outlet 17 83 15 0;
> #P connect 1 0 2 0;
> #P fasten 2 2 0 0 70 75 22 75;
> #P connect 2 0 0 0;
> #P connect 2 1 3 0;
> #P pop;
> #P newobj 355 77 42 196617 p Draw;
> #P toggle 355 29 15 0;
> #P newex 355 52 57 196617 qmetro 33;
> #P newex 355 102 194 196617 jit.gl.render test @erase_color 0 0 0 1;
> #P comment 449 352 21 196617 FB;
> #P window linecount 2;
> #P newex 473 351 243 196617 jit.gl.videoplane test @texture fb_tex
> @automatic 0 @name fb_plane @position 0 0 -1.5;
> #P window linecount 1;
> #P newex 591 477 63 196617 jit.matrix;
> #P window linecount 2;
> #P newex 614 574 227 196617 jit.gl.videoplane test @automatic 0 @name
> ol_plane @blend_enable 1 @position 1 0 0.5;
> #P window linecount 1;
> #P comment 569 579 21 196617 OL;
> #P comment 508 400 128 196617 3.draw fb_plane to screen;
> #P message 355 399 150 196617 reset , drawobject fb_plane 0;
> #P newex 355 193 246 196617 t b b b;
> #P message 473 285 352 196617 reset , drawobject ol_plane 0 , drawobject
> ol2_plane 0 , drawobject floory 0;
> #P newex 355 419 129 196617 jit.gl.sketch test @layer 0;
> #P newex 473 305 163 196617 jit.gl.sketch test @capture fb_tex;
> #P comment 6 200 336 196617 The grabbed texture is rendered correctly in
> both of these scenarios;
> #P connect 14 0 13 0;
> #P connect 13 0 15 0;
> #P connect 15 0 12 0;
> #P fasten 22 0 12 0 407 99 360 99;
> #P connect 25 0 23 0;
> #P connect 23 0 4 0;
> #P fasten 21 0 4 0 411 192 360 192;
> #P connect 4 0 5 0;
> #P connect 5 0 2 0;
> #P connect 30 0 2 0;
> #P fasten 42 0 2 0 62 384 360 384;
> #P fasten 43 0 2 0 62 384 360 384;
> #P connect 31 0 30 0;
> #P connect 16 0 13 1;
> #P connect 4 1 3 0;
> #P connect 3 0 1 0;
> #P connect 18 0 1 0;
> #P connect 38 0 1 0;
> #P connect 4 2 20 0;
> #P connect 20 0 9 0;
> #P connect 9 0 27 0;
> #P connect 27 0 17 0;
> #P connect 27 0 8 0;
> #P fasten 9 0 19 0 596 500 707 500;
> #P connect 28 0 19 0;
> #P connect 29 0 28 0;
> #P pop;
>
> –
> http://www.zacharyseldess.com
>
>


May 15, 2008 | 12:49 pm

Really? The layer number in that patch is only meant to change the drawing order of the actual videoplanes in the main window (not the order in the "peephole" window). If you reverse the numbers of the layer attributes, as I mention in the patch, the two main videoplanes in the window don’t reverse their render order? They do for me. It’s subtle.

For the order INSIDE the "peephole" window, changing the drawobject order is the simplest way – no layers necessary. I’m not even sure layers would work when your using the drawobject method in sketch (didn’t play around with it).


May 15, 2008 | 1:52 pm

thnx zach, i think i’ll let it go for now. i’m tryng to play with manual
depth sorting for layers. its going nicely, apart from some alpha anomalies
nobody care about but me…. ill post when i have something

btw. when turning navigate on for the first time the easing function starts
from zero, i passed a setmouse to it.

replace with [p mousestate]

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 1125 281 1780 664;
#P window setfont "Sans Serif" 9.;
#P message 402 244 61 9109513 setMouse $1;
#P newex 402 201 42 9109513 t 0 i;
#P newex 402 223 42 9109513 gate 1 1;
#P message 195 249 61 9109513 setMouse $1;
#P newex 195 206 42 9109513 t 0 i;
#P newex 195 228 42 9109513 gate 1 1;
#P newex 264 90 40 9109513 t i i i;
#P newex 223 331 81 9109513 s $2_mouseState;
#P inlet 191 176 15 0;
#N vpatcher 421 82 651 378;
#P toggle 17 69 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 17 24 56 9109513 r newData;
#P newex 36 67 32 9109513 sel 1;
#P newex 110 185 40 9109513 change;
#P newex 17 185 40 9109513 change;
#P outlet 110 244 15 0;
#P outlet 39 244 15 0;
#P outlet 17 244 15 0;
#P newex 110 213 90 9109513 prepend setMouse;
#P newex 17 213 90 9109513 prepend setMouse;
#P inlet 36 44 15 0;
#P newex 17 93 29 9109513 gate;
#P window linecount 1;
#P newex 110 160 27 9109513 i 0;
#P window linecount 0;
#P newex 17 160 27 9109513 i 0;
#P window linecount 1;
#P newex 127 126 59 9109513 r pUpdateY;
#P newex 34 126 59 9109513 r pUpdateX;
#P connect 14 0 15 0;
#P connect 15 0 4 0;
#P connect 4 0 2 0;
#P connect 2 0 11 0;
#P connect 11 0 6 0;
#P connect 6 0 8 0;
#P connect 0 0 2 1;
#P connect 5 0 13 0;
#P connect 13 0 4 1;
#P connect 11 0 9 0;
#P fasten 4 0 3 0 22 115 115 115;
#P connect 3 0 12 0;
#P connect 12 0 7 0;
#P connect 7 0 10 0;
#P connect 1 0 3 1;
#P pop;
#P newobj 42 75 70 9109513 p resetEasing;
#B color 12;
#P newex 64 304 38 9109513 pack i i;
#P newex 92 280 36 9109513 bucket;
#P comment 372 351 13 9109513 y;
#N vpatcher 487 232 790 584;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 76 43 59 9109513 r pUpdateY;
#P newex 38 22 59 9109513 r pUpdateX;
#P newex 14 154 48 9109513 pack 0 0;
#P newex 52 131 34 9109513 i 300;
#P newex 14 131 34 9109513 i 200;
#P newex 14 101 32 9109513 sel 1;
#P inlet 14 76 15 0;
#P newex 111 227 60 9109513 pack 1 300;
#P newex 89 259 72 9109513 pack 798 300;
#P newex 111 198 32 9109513 sel 1;
#P inlet 89 76 15 0;
#P window linecount 2;
#P message 89 299 96 9109513 ; max pupdate $1 $2;
#P window linecount 1;
#P newex 111 175 42 9109513 >= 799;
#P newex 89 153 32 9109513 sel 0;
#P newex 89 131 158 9109513 if $i1 < = 0 || $i1 >= 799 then $i1;
#P inlet 251 76 15 0;
#P window linecount 2;
#P comment 109 72 122 9109513 pointer loops between 0 and 800 horizontal
pixels;
#P connect 10 0 11 0;
#P connect 11 0 12 0;
#P connect 12 0 14 0;
#P connect 6 0 12 1;
#P connect 15 0 12 1;
#P fasten 11 0 13 0 19 124 57 124;
#P connect 13 0 14 1;
#P connect 1 0 13 1;
#P connect 16 0 13 1;
#P connect 6 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 8 0;
#P fasten 14 0 5 0 19 292 94 292;
#P fasten 9 0 5 0 116 286 94 286;
#P connect 8 0 5 0;
#P connect 3 1 4 0;
#P connect 4 0 7 0;
#P connect 7 0 9 0;
#P fasten 1 0 8 1 256 251 156 251;
#P fasten 1 0 9 1 256 216 166 216;
#P pop;
#P newobj 27 226 80 9109513 p pupdate;
#B color 12;
#P user panel 22 222 90 26;
#X brgb 255 255 255;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P newex 355 176 30 9109513 t i i;
#P newex 35 174 73 9109513 t i i i;
#P outlet 355 351 15 0;
#P outlet 64 351 15 0;
#P newex 355 330 85 9109513 js easing.js 0.1;
#B color 14;
#P newex 64 330 85 9109513 js easing.js 0.1;
#B color 14;
#P newex 355 147 146 9109513 if $i1 > 600 then 600 else $i1;
#P newex 12 50 40 9109513 t i i i;
#P toggle 12 75 15 0;
#P newex 12 99 64 9109513 qmetro 10;
#P newex 12 28 56 9109513 r navigate;
#P newex 12 121 504 9109513 mousestate;
#P window linecount 4;
#P comment 189 33 149 9109513 js easing smooths mouse movement. argument
determines amount of easing (0.1 will ease more than 0.5);
#P window linecount 1;
#P comment 82 351 13 9109513 x;
#P user panel 38 71 78 25;
#X brgb 255 255 255;
#X frgb 0 0 0;
#X border 1;
#X rounded 0;
#X shadow 0;
#X done;
#P connect 4 0 7 0;
#P connect 7 0 6 0;
#P connect 6 0 5 0;
#P connect 5 0 3 0;
#P connect 7 1 16 0;
#P fasten 3 1 13 0 140 157 40 157;
#P connect 7 2 20 0;
#P connect 13 2 16 1;
#P connect 13 0 19 0;
#P connect 21 0 9 0;
#P connect 19 0 9 0;
#P connect 20 0 9 0;
#P lcolor 4;
#P connect 26 0 9 0;
#P connect 9 0 11 0;
#P connect 13 1 18 0;
#P connect 20 1 18 0;
#P lcolor 4;
#P connect 18 0 19 1;
#P connect 14 1 16 2;
#P fasten 13 2 25 0 102 199 200 199;
#P connect 25 0 24 0;
#P connect 24 0 26 0;
#P connect 25 1 24 1;
#P fasten 3 2 8 0 263 143 360 143;
#P connect 8 0 14 0;
#P connect 29 0 10 0;
#P connect 21 0 10 0;
#P connect 20 2 10 0;
#P lcolor 4;
#P connect 14 0 10 0;
#P connect 10 0 12 0;
#P connect 14 1 28 0;
#P connect 28 0 27 0;
#P connect 27 0 29 0;
#P connect 28 1 27 1;
#P pop 1;
#P newobj 282 97 65 9109513 p mousestate;
#B color 12;
#P window clipboard copytext "p mousestate" #E;
#P window clipboard copycount 1;

On Thu, May 15, 2008 at 3:49 PM, Zachary Seldess
wrote:

>
> Really? The layer number in that patch is only meant to change the drawing
> order of the actual videoplanes in the main window (not the order in the
> "peephole" window). If you reverse the numbers of the layer attributes, as I
> mention in the patch, the two main videoplanes in the window don’t reverse
> their render order? They do for me. It’s subtle.
>
> For the order INSIDE the "peephole" window, changing the drawobject order
> is the simplest way – no layers necessary. I’m not even sure layers would
> work when your using the drawobject method in sketch (didn’t play around
> with it).
>
> –
> http://www.zacharyseldess.com
>
>


May 15, 2008 | 2:23 pm

Thanks yair! I made the changes and they’re now uploaded.

Zachary


May 25, 2008 | 2:40 am

Hi everyone,

I’ve made another update and few minute improvements to the glNavs. Now all but the quad versions have roll! (it’s off by default though)

Hope it doesn’t make you too nauseous… ;)

Interested to know if anyone has suggestions regarding this last feature. It’s not that useful for the keyboard/mouse versions, but for the wii versions it’s nice.

Also, now with the wii glNavs, I’ve put the aka.wiiremote object in a separate patch from the glNavigators. This way, you can sync the wii, and just leave that patch open. Now closing/changing/reinstantiating a glNav abstraction won’t cause the wii to lose contact.

As before, you can find the new versions here:

http://www.zacharyseldess.com/z.glNav.html

best,
Zachary


May 25, 2008 | 4:33 pm

hi zach, thanks for the update,
can you help me limit the lookat to a narrower angle?

On Sun, May 25, 2008 at 5:40 AM, Zachary Seldess
wrote:

>
> Hi everyone,
>
> I’ve made another update and few minute improvements to the glNavs. Now all
> but the quad versions have roll! (it’s off by default though)
>
> Hope it doesn’t make you too nauseous… ;)
>
> Interested to know if anyone has suggestions regarding this last feature.
> It’s not that useful for the keyboard/mouse versions, but for the wii
> versions it’s nice.
>
> Also, now with the wii glNavs, I’ve put the aka.wiiremote object in a
> separate patch from the glNavigators. This way, you can sync the wii, and
> just leave that patch open. Now closing/changing/reinstantiating a glNav
> abstraction won’t cause the wii to lose contact.
>
> As before, you can find the new versions here:
>
> http://www.zacharyseldess.com/z.glNav.html
>
> best,
> Zachary
> –
> http://www.zacharyseldess.com
>
>


May 25, 2008 | 4:45 pm

Hi Yair,

Do you mean adjust the lens_angle?
For the non-zoomed lens_angle send the message lens_angle1 $1. Right now the normal lens_angle is set to 45 – increase it to see less.

After you send the message, you’ll need to press and release ‘z’ to zoom in and out – then the new lens_angle1 will be established.

I’ll fix it so that sending the message in does this automatically for the next update. But maybe this isn’t what you’re asking?

Zachary


May 25, 2008 | 4:56 pm

i mean the possibility to change the way look_at works, to have limits.
currently it rotates 360deg. my 3d room doesn’t have a back wall…

On Sun, May 25, 2008 at 7:45 PM, Zachary Seldess
wrote:

>
> Hi Yair,
>
> Do you mean adjust the lens_angle?
> For the non-zoomed lens_angle send the message lens_angle1 $1. Right now
> the normal lens_angle is set to 45 – increase it to see less.
>
> After you send the message, you’ll need to press and release ‘z’ to zoom in
> and out – then the new lens_angle1 will be established.
>
> I’ll fix it so that sending the message in does this automatically for the
> next update. But maybe this isn’t what you’re asking?
>
> Zachary
> –
> http://www.zacharyseldess.com
>
>


May 25, 2008 | 5:46 pm

Here’s a quick mod which only has 180deg lookat rotation. First, I disconnected the pupdate subpatch, then I scaled the x rotation data by half on the top level (see the note written in the patch).

Do you think this should be a built-in feature? I hadn’t really thought about it. Of course, for your scenario, you might also need to disconnect the backwards movement. Let me know if you need me to do that for you.


May 25, 2008 | 6:15 pm

thnaks zac, it works great, only problem now the lookat jumps to the limit
when navigation is on… im being spoiled. i’ll look into it.

i dont know if it would be of use for anyone else, but it sure is helpful to
me.

On Sun, May 25, 2008 at 8:46 PM, Zachary Seldess
wrote:

> Here’s a quick mod which only has 180deg lookat rotation. First, I
> disconnected the pupdate subpatch, then I scaled the x rotation data by half
> on the top level (see the note written in the patch).
>
> Do you think this should be a built-in feature? I hadn’t really thought
> about it. Of course, for your scenario, you might also need to disconnect
> the backwards movement. Let me know if you need me to do that for you.
> –
> http://www.zacharyseldess.com
>
>
>
>


May 25, 2008 | 11:42 pm

Yair,

Here’s what you’re looking for. Now, the first time you activate it, it snaps the cursor to 400x 300y (center of the constrained mouse-cursor area). This will keep the camera looking straight down the z axis in the negative direction (which is how the patch starts out in the help file).

If you want it to instead look straight down the x axis in the negative direction for the center of your lookat rotation, change the 3rd and/or 4th arguments in the scale object on the top level (right above the multiply object I added). There’s a subpatch named "p < --info"included next to the scale object that explains everything.

Zachary


May 26, 2008 | 2:11 pm

thank yo again, i see you added a note about manually changing the
camera/lookat, do you have any recommendations on this. when i change it
withwithout turning nav off i get the jump.

On Mon, May 26, 2008 at 2:42 AM, Zachary Seldess
wrote:

> Yair,
>
> Here’s what you’re looking for. Now, the first time you activate it, it
> snaps the cursor to 400x 300y (center of the constrained mouse-cursor area).
> This will keep the camera looking straight down the z axis in the negative
> direction (which is how the patch starts out in the help file).
>
> If you want it to instead look straight down the x axis in the negative
> direction for the center of your lookat rotation, change the 3rd and/or 4th
> arguments in the scale object on the top level (right above the multiply
> object I added). There’s a subpatch named "p < --info"included next to the
> scale object that explains everything.
>
> Zachary
> –
> http://www.zacharyseldess.com
>
>
>
>


May 26, 2008 | 4:54 pm

Ok, I updated the glNav package one more time. This will be it for a while. Sorry for all the noise.

Now, for z.glNav1 and z.glNav2 you have built-in lookat constraining functionality. The more I thought about it, the more it seemed useful to have. Help files are updated accordingly – and now a bit easier to cut and paste into your patch.

Some other minor fixes as well.

http://www.zacharyseldess.com/z.glNav.html

——————

Yair, as for the snapping when you change the lookat_constraints – if you place your current lookat at the center of the current lookat_angle, when you change the lookat_angle it will remain there. But if your current lookat point is 100% to the right of the current lookat_angle, when you change the lookat_angle it will snap it to the new place that is 100% to right. Does that make sense? It’s actually doing what it should do.

Try turning on lookat constraining and setting new lookat_angles before you activate the navigator for the first time. You’ll see that it doesn’t snap.

Ok, must….grade….papers….no….more…procrastinating…

best,
Zachary


June 2, 2008 | 1:23 pm

Another update:

now z.glNav1 and z.glNav2 have the ability to toggle movement on/off for each direction independently.

When combined with the lookat_constraining feature, this allows you to place the camera in a fixed location and control which area of the 3D space is viewable. Everthing can be downloaded at the same url as given earlier.

I’ll eventually get these new features built into the Wii versions…

Zachary


June 13, 2008 | 1:08 pm

Hello Zachary

great patch thank you for sharing.

i have been trying to modify the z.glnav_quad it but have become stuck,
what i would like to do is have 4 jit.windows of the context window instead of the one window.
i dont known how to make my context 1 window display on the full window, and when i full screen it it stays the same size. i dont even known if i going about it the right way
this is my humble efforts so far,
any help would be most appreciated

My plan is to eventually have 4 computer and projectors for a full 360 view of a gl patch.

thank you Ben


September 2, 2008 | 5:56 pm

Hi all,

Just in case some of you use Processing – I’ve ported my glNavigators (minus the quad version and plus a version that just rotates the camera – no translation).

The translation process from graphic to script helped me clean up some of the ideas – it was interesting.

You can get them here: http://www.zacharyseldess.com/software.html

best,
Zachary


March 9, 2009 | 2:26 pm

Hi everyone,

I’ve added two more versions – z.glNav1b and z.glNav2b.

In these versions, camera translation is still the same (WASD, etc), but now camera rotation is achieved by clicking and dragging in the Jitter window. Some might find this useful as the cursor remains visible and usable while in navigation mode.

http://www.zacharyseldess.com/z.glNav.html

Also, a few other cool abstractions in my abstractions package, which includes the z.glNav group (the following are Max5 only):

z.cameraRot – rotates lookat coordinates in OpenGL 3D space by clicking and dragging in Jitter window
z.glPath & z.glPathRotate – draw and animate camera path in OpenGL 3D space (uses jasch’s bspline object)
z.glRotate – use mouse to dynamically rotate around a coordinate in OpenGL 3D space – with variable amplitude

http://www.zacharyseldess.com/z.abstractions.html

best,
Zachary


March 17, 2009 | 9:18 pm

Hi Zachary,
I finally got around to checking out this package of OpenGL navigation abstractions, and I have to say this is really nice. Thanks for sharing these patches!

Andrew B.


March 17, 2009 | 11:06 pm

Honored and glad you like them Andrew!

Just a heads up that the most recent versions (z.glNav1b and z.glNav2b) behave a little strangely in Max5, due to a known bug with the simultaneous use of key presses and mouse clicking and dragging. See this thread:

http://www.cycling74.com/forums/index.php?t=msg&th=38485&start=0&rid=3109&S=ba0be9d2f716adaa595b01d40682e898

It sounds like this may not get resolved for a while, so if anyone has any suggested workarounds (I don’t want to use [hi] really), I’d love to hear them!

best,
Zachary


Viewing 27 posts - 1 through 27 (of 27 total)