spotlight settings
I'm trying to make a "realistic" spotlight (whatever that means) - really just a nice big round circle with a slightly fuzzy edge. The two relevant attributes for jit.gl.spotlight are spot_angle and spot_falloff, which would seem to be the right tools for the task, and while I can get some nice effects, I can't get what I want. The problem seems to be that spot_falloff is too gradual, so that to avoid a sharp edge, you have to use it to shrink the circle way down, resulting in a small fairly sharp spotlight surrounded by a wide penumbra.
Maybe there's some (hidden) attribute that I'm missing?
While we're on the subject of spotlights: wouldn't it be nice to have a @gobo attribute that facilitated arbitrarily shaped spotlights?
Example attached.
Just exploring a bit I got something like your example with spot_angle 60. spot_falloff and atten_const 0.05
I had the notion that the light was too hot, but darker colours didn't work.
That's much closer, thanks! Didn't occur to me that attenuation was the trick.
Spoke too soon. You're right - looks fine on a white surface, but on anything else (like a textured surface), it blows out massively. Oh well. Still looking for a solution.
in addition to the atten parameters, you may also want to bring specular down, diffuse down, and ambient up. finally you can throw in a jit.gl.pass tonemap effect and play with those parameters. here's something to get you started:
Thanks Rob, that's much closer. I'm a bit confused about exactly what's going on (since the jit.gl.pass isn't attached to anything & no context is specified). In any case, it works.
it's implicitly binding to the jit.world context, and do to some behind the scenes features of jit.world and jit.gl.pass, drawing back to that jit.world context window.