jit.gl.gridshape

Mar 3, 2008 at 7:19pm

jit.gl.gridshape

Hi,
In the Patch below I have Installed a gridshape cube and i tried to put on the cube two little bowles. However if I put the position of the camera left of the cube, the bowles suddenly appear left of the cube, if I go with the camera position to the right, the spheres are right of the cube, although the spheres have the same x position (0) as the cube. Shouldn’t the spheres stay on that cube?
Or if not, how would I be able to accomplish this. From any view the spheres should stay on the cube.

Kind regards and thanx for help

sta

#36163
Mar 4, 2008 at 4:18pm

Can’t figure out how to open your patch. It’s not that big, can you copy/paste it into the thread maybe?

#123898
Mar 4, 2008 at 7:39pm

#123899
Mar 5, 2008 at 10:14am

Okay, looked at your patch. Next time, try leaving out all unnecessary attributes. Not only will it make it easier for others to look at your patch, a lot of the times it will make you solve stuff on your own since you’re isolating the problem.

In this case, your balls are behind your cube but you’re drawing them in front. Either use depthbuffering on the window or use the layer attribute for the drawing order. Other than that, your patch seemed to be working fine:

#P window setfont “Sans Serif” 9.;
#P window linecount 3;
#P user com 243 438 241 196617 52;
#K set 0 13614 8205 16672 26721 28260 27749 8289 27756 28535 29472 31087 29984 29807 8308 25971 29728 29800 26995 8299 26990 25632 28518 8307 29813 26214 8294 24947 29797 29230 8260 28517 29472 29556 24931 27424 30569 29800 8291 24941 25970 24864 24942 25632 27759 28523 24948 8289 29812 29289 25205 29797 29486;
#K end;
#P window linecount 1;
#P newex 47 102 60 196617 loadmess 1;
#P window linecount 3;
#P user com 243 397 241 196617 52;
#K set 0 13358 8205 17509 28788 26722 30054 26213 29216 12576 28526 8313 28533 29216 30569 28260 28535 8297 29472 25971 29541 28276 26977 27680 26982 8313 28533 10098 25888 28271 29728 30067 26990 26400 29800 25888 27745 31077 29299 8308 28448 28001 28277 24940 27769 8307 28530 29728 29800 25888 27745 31077 29299;
#K end;
#P user com 600 245 333 196617 71;
#K set 0 12590 3412 26725 8302 25959 24948 26998 25888 31277 25455 28530 25632 28518 8313 28533 29216 25185 27756 29472 28005 24942 29472 29800 25977 10098 25888 25189 26729 28260 8308 26725 8291 30050 25902 8265 26144 31087 29984 30561 28276 8308 26725 27936 26990 8294 29295 28276 11296 28001 27493 8308 26721 29728 25455 28530 25632 28783 29545 29801 30309 8303 29216 28015 30309 8308 26725 8291 30050 25888 25185 25451;
#K end;
#P user com 600 325 293 196617 63;
#K set 0 13102 8205 16748 29797 29294 24948 26998 25964 31020 8308 30066 28192 28526 8292 25968 29800 25205 29812 25970 8289 28260 8300 25972 8301 24952 8307 28530 29728 29800 25888 28514 27237 25460 29472 28533 29742 8270 28448 26479 28516 8297 26144 31087 29984 30561 28276 8308 28448 30067 25888 29810 24942 29552 24946 25966 29728 28514 27237 25460 29472 29800 28533 26472;
#K end;
#P window linecount 1;
#P newex 492 342 78 196617 prepend layer;
#P number 493 320 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 493 259 78 196617 prepend layer;
#P number 494 237 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 456 320 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 420 320 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 384 320 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 351 342 111 196617 pak position 0. 0. 0.;
#P flonum 456 237 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 420 237 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 384 237 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 351 259 111 196617 pak position 0. 0. 0.;
#P newex 493 176 78 196617 prepend layer;
#P number 494 147 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 37 207 34 196617 reset;
#P window setfont Tahoma 9.;
#P window linecount 2;
#P newex 351 366 224 431423497 jit.gl.gridshape fenster @color 1. 1. 0. 1. @position 0 0. -4. @scale 0.5 0.5 0.5 @shape sphere @layer 2;
#P newex 351 286 227 431423497 jit.gl.gridshape fenster @color 1. 0. 1. 1. @position 0. 0. -6. @scale 0.5 0.5 0.5 @shape sphere @layer 1;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 37 227 201 196617 jit.gl.handle fenster @inherit_transform 1;
#P message 35 348 77 196617 fullscreen $1;
#P toggle 35 330 15 0;
#P newex 35 308 55 196617 select 27;
#P newex 35 285 40 196617 key;
#P newex 35 370 296 196617 jit.window fenster @floating 0 @doublebuffer 1 @depthbuffer 1;
#P flonum 314 147 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 276 147 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 240 176 107 196617 pak lookat 0. 0. 0.;
#P flonum 240 147 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 198 147 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 161 147 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 124 176 97 196617 pak camera 0. 3. 5.;
#P flonum 123 147 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 456 147 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 420 147 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 384 147 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 351 176 111 196617 pak position 0. 0. 0.;
#P newex 351 211 381 196617 jit.gl.gridshape fenster @layer 3 @shape cube @color 0. 1. 1. 1. @position 0. 0. 0.;
#P newex 47 176 61 196617 t b b erase;
#P toggle 47 127 15 0;
#P newex 47 147 54 196617 qmetro 1;
#P newex 72 259 195 196617 jit.gl.render fenster @camera 0. 3. 5.;
#P window linecount 3;
#P user com 600 285 264 196617 57;
#K set 0 12846 3412 29305 8293 30832 25970 26989 25966 29801 28263 8311 26996 26656 29800 25888 27745 31077 29299 8308 28448 29541 25888 30568 24948 8308 26725 31008 25711 11808 21608 26995 8289 29812 29289 25205 29797 8292 25972 25970 28009 28261 29472 30568 26979 26656 28514 27237 25460 29472 24946 25888 25714 24951 28192 26217 29299 29742;
#K end;
#P connect 19 0 20 0;
#P connect 20 0 21 0;
#P connect 21 0 22 0;
#P connect 22 0 18 0;
#P connect 26 0 23 0;
#P connect 44 0 3 0;
#P connect 3 0 2 0;
#P connect 2 0 4 0;
#P fasten 11 0 1 0 129 215 77 215;
#P fasten 15 0 1 0 245 215 77 215;
#P connect 4 1 1 0;
#P connect 4 2 1 0;
#P connect 23 0 1 0;
#P fasten 10 0 11 1 128 174 158 174;
#P fasten 12 0 11 2 166 174 187 174;
#P fasten 13 0 11 3 203 174 216 174;
#P fasten 14 0 15 1 245 173 277 173;
#P fasten 16 0 15 2 281 173 309 173;
#P fasten 17 0 15 3 319 173 341 173;
#P connect 6 0 5 0;
#P connect 28 0 5 0;
#P connect 38 0 24 0;
#P connect 29 0 24 0;
#P connect 40 0 25 0;
#P connect 33 0 25 0;
#P connect 7 0 6 1;
#P connect 30 0 29 1;
#P connect 34 0 33 1;
#P connect 8 0 6 2;
#P connect 31 0 29 2;
#P connect 35 0 33 2;
#P connect 9 0 6 3;
#P connect 32 0 29 3;
#P connect 36 0 33 3;
#P connect 39 0 40 0;
#P connect 27 0 28 0;
#P connect 37 0 38 0;
#P window clipboard copycount 46;

#123900

You must be logged in to reply to this topic.