Forums > Jitter

jit.gl.sketch taking over light0

May 11, 2006 | 11:09 am

Hi, I’m using sketch to control multiple lights in a scene with regular
jit.gl.- objects. I have the drawing order controlled by @automatic 0.

My problem is, if I use light0 in sketch, no matter what I try, its settings
always get overruled by jit.gl.render and its lighting settings. Light0 is
enabled by any jit.gl object that has @lighting_enable 1, and setting it to
0 is no option because then the object won’t be influenced by the sketch
lights.
The only solution I can think of is to send the relevant sketch attributes
to the jit.gl.render lighting settings, but than I have to find a way to
translate the sketch light position (which is calculated by manipulating the
matrixstack), to jit.gl.render @light_position. Is that possible? Maybe
there’s a better solution to this?

I could just discard light0 (setting it to black or something) and use only
the other lights, but then there’s only 7 of em left.

-thijs


May 11, 2006 | 5:42 pm

Should be possible if you set the objects you wish to control with
@inherit_material 1. Send us an example if this doesn’t work for you…

-Joshua


May 13, 2006 | 11:25 am

Thanks Joshua. It’s working now.

Best, Thijs


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