shadows jit.gl.multiple
Hello folks,
I have objects moving in a sphere and I want shadows projected onto the inner walls of the sphere @cull_face 2, I achieved most of what I want (see patch) with one object in the sphere. Now I would like to have a jit.gl.multiple instead of a single object. If I do that sadly only one shadow shows up
. I know I could use a camera @capture 1 to create reflections but I was trying to avoid that (too expensive). Any ideas?
Hi, Michelez. Missing patcher, try copy/paste again.
Anyway, giving the nature of jit.gl.multiple, which is essentially drawing an object multiple times, it's probably doesn't support shadows...
here it is
I think you are right, so I am stuck with camera capture?
jit.gl.multiple supports shadows. it's demonstrated in the lights.shadows.maxpat example
I stand corrected, I just noticed it... great!
The trick is to connect jit.gl.material to jit.gl.multiple, not the actual object.
ah yes good point. there's always a trick!
Thanks for this!
Hi there. Resurrecting this old thread. Struggling to deconstruct the lights.shadows.maxpat example patch — trying to retain colour and shadows from jit.gl.material when using jit.gl.multiple. Connecting jit.gl.material directly to jit.gl.multiple giving no results. No doubt I'm missing somethig glaringling obvious - apols in advance.
Aha. The jit.gl.material must be connected directly to the jit.gl.multiple object without the use of a jit.gl.node.
Which begs the question: In there a way to connect jit.gl.material to a node that is connected to jit.gl.multiple and retain shadows etc.?
The patch in your previous post doesn't open/isn't valid.
Seems like your issue came from forcing @automatic to be enabled for the gridshape attached to [jit.gl.multiple]. And not sure why you need [jit.gl.node] at all in your case:
But nothing prevents you from having your gridshape + multiple as part of a node if you want (the only thing I did here was to add the [jit.gl.node] and attach it to [jit.gl.multiple]):
EDIT: to add up to this, as far as I know it doesn't make sense to apply a material to a node. [jit.gl.material] and [jit.gl.pbr] are basically shaders that can only be attached to geometry ([jit.gl.mesh], [jit.gl.gridshape], [jit.gl.model], [jit.gl.plato], etc.) , or a [jit.gl.multiple] duplicating geometry. But a node is more like a sub-rendering context.