shadows jit.gl.multiple

michelez's icon

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?

Max Patch
Copy patch and select New From Clipboard in Max.

Pedro Santos's icon

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...

michelez's icon

here it is

Max Patch
Copy patch and select New From Clipboard in Max.

I think you are right, so I am stuck with camera capture?

Rob Ramirez's icon

jit.gl.multiple supports shadows. it's demonstrated in the lights.shadows.maxpat example

Pedro Santos's icon

I stand corrected, I just noticed it... great!
The trick is to connect jit.gl.material to jit.gl.multiple, not the actual object.

Max Patch
Copy patch and select New From Clipboard in Max.

Rob Ramirez's icon

ah yes good point. there's always a trick!

michelez's icon

Thanks for this!

dunk's icon

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.

Max Patch
Copy patch and select New From Clipboard in Max.

dunk's icon

Aha. The jit.gl.material must be connected directly to the jit.gl.multiple object without the use of a jit.gl.node.

Max Patch
Copy patch and select New From Clipboard in Max.