screentoworld: render lies?

Sep 17, 2008 at 2:00pm

screentoworld: render lies?

Hello,

I’m trying to manage values given by [jit.gl.render] when screentoworld message is sent it.

The jsui_screentoworld-example.pat explains that world values go from – aspect ratio To + aspect ratio.

Since a 300 by 200 [jit.pwindow] aspect ratio is 1.5 I thought to “navigate” between -1.5 and 1.5 (or at least 1.4?) but this is not the case.
Same logic for Y values. top is not 1. but 0.82…

Am I wrong?

max v2;
#N vpatcher 218 47 896 617;
#P origin 0 -27;
#P window setfont “Sans Serif” 14.;
#P message 167 490 154 196622 -1.217789 0.024853;
#P window setfont “Sans Serif” 9.;
#P newex 167 469 62 196617 prepend set;
#P message 295 59 127 196617 name WWW , size 300 200;
#P window setfont “Sans Serif” 12.;
#P window linecount 3;
#P user com 206 409 387 196620 94;
#K set 0 30575 29292 25632 25455 28530 25705 28257 29797 29472 25209 8292 25958 24949 27764 8289 29285 8302 28530 28001 27753 31333 25632 29807 8308 26725 8306 24942 26469 8237 12576 29807 8241 8232 25199 29812 28525 8308 28448 29807 28713 8294 28530 8313 8310 24940 30053 29484 8289 28260 8237 24947 28773 25460 8308 28448 24947 28773 25460 8232 27749 26228 8308 28448 29289 26472 29737 8294 28530 8312 8310 24940 30053 29472 30568 25970 25888 8801 29552 25955 29730 8297 29472 29800 25888 29281 29801 28448 30569 25716 26671 26725 26983 26740 11776;
#K end;
#P window linecount 7;
#P user com 206 294 344 196620 163;
#K set 0 29539 29285 25966 29807 30575 29292 25632 23416 8232 26220 28513 29737 23840 23417 8232 26220 28513 29737 23840 23418 8232 26220 28513 29737 23821 3395 28526 30309 29300 29472 29539 29285 25966 8291 28527 29284 26990 24948 25971 8308 28448 30575 29292 25632 25455 28530 25705 28257 29797 29484 8303 30068 28789 29728 28533 29728 29800 25888 25717 28016 8303 30068 27749 29742 8276 26725 8297 28272 30068 8312 8289 28260 8313 8297 28272 30068 8291 28527 29284 26990 24948 25971 8289 29285 8297 28192 28777 30821 27763 11296 24942 25632 29800 25888 26990 28789 29728 31264 25455 28530;
#K set 100 25705 28257 29797 8297 29472 26990 8302 28530 28001 27753 31333 25632 25705 29556 24942 25445 8294 29295 27936 25441 28005 29281 8232 12334 8237 8241 11817 11296 30568 25970 25888 12334 8297 29472 29800 25888 28261 24946 8291 27753 28784 26990 26400 28780 24942 25888 24942 25632 12590 8297 29472 29800 25888 26209 29216 25452 26992 28777 28263 8304 27745 28261 11776;
#K end;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 137 406 33 196617 x y z;
#P toggle 219 39 15 0;
#P message 219 59 69 196617 idlemouse $1;
#P newex 219 19 60 196617 loadmess 1;
#P user jit.pwindow 218 78 302 202 0 1 1 0 1 0;
#X name WWW;
#P newex 36 456 22 196617 b 1;
#P newex 36 483 104 196617 pack position 0. 0. 0.;
#P newex 36 428 51 196617 zl slice 2;
#P newex 36 525 368 196617 jit.gl.gridshape WWW @scale 0.1 0.1 0.1 @lighting_enable 1 @color 1. 0.5 0. 1.;
#P newex 78 308 112 196617 route mouse mouseidle;
#P newex 36 402 102 196617 route screentoworld;
#P message 78 333 105 196617 screentoworld $1 $2;
#P toggle 18 76 15 0;
#P newex 36 379 92 196617 jit.gl.render WWW;
#P newex 18 123 58 196617 t b b erase;
#P newex 18 98 57 196617 qmetro 20;
#P comment 95 430 32 196617 cut z;
#P connect 4 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 2 2 3 0;
#P fasten 5 0 3 0 83 364 41 364;
#P fasten 3 1 6 0 123 399 41 399;
#P connect 6 0 9 0;
#P connect 9 0 11 0;
#P connect 11 0 10 0;
#P connect 10 0 8 0;
#P connect 9 0 10 1;
#P fasten 12 1 7 0 514 283 83 283;
#P fasten 7 1 5 0 134 329 83 329;
#P fasten 9 0 20 0 41 450 172 450;
#P connect 20 0 21 0;
#P connect 13 0 15 0;
#P connect 15 0 14 0;
#P fasten 19 0 12 0 300 76 224 76;
#P connect 14 0 12 0;
#P pop;

#39803
Sep 17, 2008 at 11:55pm

Kyred,

@transform_reset 1 is what you want, I think.

best,
Zachary

max v2;
#N vpatcher 104 44 697 630;
#P origin 0 -27;
#P window setfont “Sans Serif” 14.;
#P window linecount 1;
#P message 167 500 154 196622 -1.49 0.47;
#P window setfont “Sans Serif” 9.;
#P newex 167 479 62 196617 prepend set;
#P message 295 69 127 196617 name WWW , size 300 200;
#P window setfont “Sans Serif” 12.;
#P user com 228 389 335 196620 28;
#K set 0 29810 24942 29542 28530 27999 29285 29541 29728 12576 11565 11582 8313 8297 29472 12576 29807 8237 12588 8312 8297 29472 11560 30767 31017 8308 28448 30767 30976;
#K end;
#P window setfont “Sans Serif” 9.;
#P comment 168 435 33 196617 x y z;
#P toggle 219 49 15 0;
#P message 219 69 69 196617 idlemouse $1;
#P newex 219 29 60 196617 loadmess 1;
#P user jit.pwindow 218 88 302 202 0 1 1 0 1 0;
#X name WWW;
#P newex 36 466 22 196617 b 1;
#P newex 36 493 104 196617 pack position 0. 0. 0.;
#P newex 36 438 51 196617 zl slice 2;
#P newex 36 535 368 196617 jit.gl.gridshape WWW @scale 0.1 0.1 0.1 @lighting_enable 1 @color 1. 0.5 0. 1.;
#P newex 78 318 112 196617 route mouse mouseidle;
#P newex 36 412 102 196617 route screentoworld;
#P message 78 343 105 196617 screentoworld $1 $2;
#P toggle 18 86 15 0;
#P newex 36 389 188 196617 jit.gl.render WWW @transform_reset 1;
#P newex 18 133 58 196617 t b b erase;
#P newex 18 108 57 196617 qmetro 20;
#P comment 95 440 32 196617 cut z;
#P connect 4 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 2 2 3 0;
#P fasten 5 0 3 0 83 374 41 374;
#P fasten 3 1 6 0 219 409 41 409;
#P connect 6 0 9 0;
#P connect 9 0 11 0;
#P connect 11 0 10 0;
#P connect 10 0 8 0;
#P connect 9 0 10 1;
#P fasten 12 1 7 0 514 293 83 293;
#P fasten 7 1 5 0 134 339 83 339;
#P fasten 9 0 19 0 41 460 172 460;
#P connect 19 0 20 0;
#P connect 13 0 15 0;
#P connect 15 0 14 0;
#P connect 14 0 12 0;
#P fasten 18 0 12 0 300 86 224 86;
#P pop;

#140382
Sep 18, 2008 at 5:56pm

Thank you.

#140383
Sep 23, 2008 at 10:51am

You might try this:

#X instantiate toggleframe
#R parse values: 308357t 3q875 430 3434
#R re-parse: 3409845n 43085 03945 4
#E yes, one more time: 4084039843[43 //well parsed
#R mov ax,bx+cx; //< -DONT forget this
#T goto 10; //wrapped up.

if it DOESNT work, just let me know and I’ll try to find out why. if it DOES, then, well, I don’t know. whatever.
Cheers, G.

#140384
Sep 23, 2008 at 5:46pm

I have a bunch of errors in Max win … (?)

#140385
Sep 23, 2008 at 9:37pm

the error issues in maxwin may be “cloaked” or at least disguised from your level of functionality on a 32K Virtual memory paging file. you can do this through your virtual memory settings. i’m not saying this will solve all your problems, but at least you won’t be constantly dealing with the error notifications. i mean, if it’s happening anyway why do we have to be constantly reminded of it, you know?

-g

#140386
Sep 24, 2008 at 8:06am

???
C’est vraiment n’importe quoi!
Moderator please!

#140387
Sep 26, 2008 at 7:54am

a tout le monde.

<><><><>IcE<><><><>

#140388

You must be logged in to reply to this topic.