Hi, im using a quad with a texture as my background in Gem. im using gemhead -1 because i need it to be rendered in the same place. I also need to have lighting on, my question is : Is there any a way to make that the lighting doesnt affect a specific gemchain? i would like that my gemhead -1 would not be affected by ligthing, how can i do this?
thanks
Seb.
Sebastian Saa wrote:
Hi, im using a quad with a texture as my background in Gem. im using gemhead -1 because i need it to be rendered in the same place. I also need to have lighting on, my question is : Is there any a way to make that the lighting doesnt affect a specific gemchain? i would like that my gemhead -1 would not be affected by ligthing, how can i do this?
use the openGL-wrappers to turn on/off lighting selectively.
mfgasdr IOhannes
#N canvas 30 138 946 464 10; #X obj 58 260 gemwin; #X msg 120 159 destroy; #N canvas 46 140 290 229 Gem.init 0; #X obj 71 191 outlet; #X obj 71 81 loadbang; #X msg 101 134 reset; #X obj 71 109 t b b; #X msg 71 164 lighting 1; #X msg 155 164 lighting 0; #X connect 1 0 3 0; #X connect 2 0 0 0; #X connect 3 0 4 0; #X connect 3 1 2 0; #X connect 4 0 0 0; #X connect 5 0 0 0; #X restore 120 196 pd Gem.init; #X obj 119 230 r view_mess; #X obj 218 245 gemhead -50; #X text 125 6 change the view-point , but keep some objects at a fixed position; #X text 431 188 a priority<0 will be rendered AFTER all other things , and with viewpoint set to the origin! (objects will not be affected by a change of view); #X text 431 240 this is good for displaying logos , help messages and cetera...; #N canvas 20 100 362 426 mousemove 0; #X obj 129 8 gemmouse; #X obj 136 88 pack; #X obj 136 110 spigot; #X obj 136 131 unpack; #X obj 136 196 t f f; #X obj 36 16 gemkeyname; #X obj 36 39 pack 0 s; #X obj 36 62 route 1; #X obj 36 84 route space; #X msg 36 107 0; #X msg 136 365 view $2 $3 $1 0 0 0 0 1 0; #X obj 136 173 +; #X obj 136 221 * -1; #X obj 201 237 t f f; #X obj 201 174 +; #X obj 201 262 * -1; #X obj 36 129 t f f f; #X obj 136 388 s view_mess; #X text 61 106 reset; #N canvas 292 198 304 356 coordinates 0; #X obj 89 52 inlet; #X obj 94 331 outlet; #X obj 193 62 atan; #X msg 193 41 1; #X obj 193 84 / 45; #X obj 193 20 loadbang; #X text 94 29 r phi theta; #X obj 89 78 unpack 0 0 0; #X obj 128 123 *; #X obj 168 123 *; #X obj 120 197 cos; #X obj 150 198 sin; #X obj 120 166 t f f; #X obj 183 198 cos; #X obj 213 199 sin; #X obj 183 167 t f f; #X obj 120 230 *; #X obj 150 231 *; #X obj 85 275 *; #X obj 125 275 *; #X obj 174 277 *; #X obj 66 242 t f f f; #X obj 91 308 pack 0 0 0; #X connect 0 0 7 0; #X connect 2 0 4 0; #X connect 3 0 2 0; #X connect 4 0 9 1; #X connect 4 0 8 1; #X connect 5 0 3 0; #X connect 7 0 21 0; #X connect 7 1 8 0; #X connect 7 2 9 0; #X connect 8 0 12 0; #X connect 9 0 15 0; #X connect 10 0 16 0; #X connect 11 0 17 0; #X connect 12 0 10 0; #X connect 12 1 11 0; #X connect 13 0 16 1; #X connect 13 0 17 1; #X connect 14 0 20 1; #X connect 15 0 13 0; #X connect 15 1 14 0; #X connect 16 0 18 1; #X connect 17 0 19 1; #X connect 18 0 22 0; #X connect 19 0 22 1; #X connect 20 0 22 2; #X connect 21 0 18 0; #X connect 21 1 19 0; #X connect 21 2 20 0; #X connect 22 0 1 0; #X restore 136 310 pd coordinates; #X obj 136 249 t b f; #X obj 136 289 pack 4 0 0; #X obj 177 46 t f f; #X obj 177 67 -; #X obj 136 45 t f f; #X obj 136 66 -; #X obj 278 57 s stay_cube; #X obj 278 35 select 1; #X obj 201 151 * 0.5; #X obj 136 153 * 0.5; #X obj 201 209 clip -90 90; #X connect 0 0 24 0; #X connect 0 1 22 0; #X connect 0 2 2 1; #X connect 0 4 27 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 0 29 0; #X connect 3 1 28 0; #X connect 4 0 12 0; #X connect 4 1 11 1; #X connect 5 0 6 0; #X connect 5 1 6 1; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 8 0 9 0; #X connect 9 0 16 0; #X connect 10 0 17 0; #X connect 11 0 4 0; #X connect 12 0 20 0; #X connect 13 0 15 0; #X connect 13 1 14 1; #X connect 14 0 30 0; #X connect 15 0 21 2; #X connect 16 0 11 0; #X connect 16 1 11 1; #X connect 16 1 14 0; #X connect 16 2 14 1; #X connect 19 0 10 0; #X connect 20 0 21 0; #X connect 20 1 21 1; #X connect 21 0 19 0; #X connect 22 0 23 1; #X connect 22 1 23 0; #X connect 23 0 1 1; #X connect 24 0 25 1; #X connect 24 1 25 0; #X connect 25 0 1 0; #X connect 27 0 26 0; #X connect 28 0 14 0; #X connect 29 0 11 0; #X connect 30 0 13 0; #X restore 731 34 pd mousemove; #X msg 119 130 create , 1; #X obj 235 405 square 4; #X obj 235 376 color 0 0 1; #X obj 250 115 gemhead 50; #X obj 250 195 cube; #X obj 538 111 gemhead; #X obj 538 146 world_light; #N canvas 0 0 450 300 light 0; #X obj 184 167 GEMglDisable GL_LIGHTING; #X obj 138 114 t a a a; #X obj 115 192 GEMglEnable GL_LIGHTING; #X obj 138 78 inlet; #X obj 161 234 outlet; #X obj 184 144 spigot; #X obj 115 155 spigot; #X obj 298 69 inlet; #X obj 206 110 t f f; #X connect 1 0 6 0; #X connect 1 1 4 0; #X connect 1 2 5 0; #X connect 3 0 1 0; #X connect 5 0 0 0; #X connect 6 0 2 0; #X connect 7 0 8 0; #X connect 8 0 6 1; #X connect 8 1 5 1; #X restore 235 319 pd light on/off; #X obj 340 294 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X connect 1 0 0 0; #X connect 2 0 0 0; #X connect 3 0 0 0; #X connect 4 0 16 0; #X connect 9 0 0 0; #X connect 11 0 10 0; #X connect 12 0 13 0; #X connect 14 0 15 0; #X connect 16 0 11 0; #X connect 17 0 16 1;
worked perfect with with the objectGEMglDisable and Gl_define Gl_lighting , thanks
De: IOhannes m zmoelnig zmoelnig@iem.at Para: Sebastian Saa sebastian_nicolau@yahoo.es CC: pd-list@iem.at Enviado: miércoles, 6 de mayo, 2009 7:10:24 Asunto: Re: [PD] no lighting for gemhead -1
Sebastian Saa wrote:
Hi, im using a quad with a texture as my background in Gem. im using gemhead -1 because i need it to be rendered in the same place. I also need to have lighting on, my question is : Is there any a way to make that the lighting doesnt affect a specific gemchain? i would like that my gemhead -1 would not be affected by ligthing, how can i do this?
use the openGL-wrappers to turn on/off lighting selectively.
mfgasdr IOhannes