Position two jit.phys.worlds in one render context

antialias's icon

Is it possible to set up two independent jit.phys.worlds in a context to be split between two projectors (as in attached jpeg)? There doesn't seem to be a 'position' attribute for jit.phys.world. I guess a workaround would be to have two named jit.phys.worlds, capture each to a texture and display them on positioned videoplanes.

4798.worldboxes.jpg
jpg
Rob Ramirez's icon

this can be accomplished if you disable the worldbox attribute of the phys.world objects, and create your own boundaries using static (@mass 0) jit.phys.body @shape cube with one of the dimensions scaled close to 0.

otherwise, the default worldbox will always be centered on the world origin.

you could also possibly achieve your desired result simply by using a single physics context, scaling the worldbox up by two on the X dimension, and creating a "divider wall" static rigid body at the origin.

antialias's icon

thanks Robert--could you post a simple example of each of those techniques?

Rob Ramirez's icon
Max Patch
Copy patch and select New From Clipboard in Max.

something like this:

antialias's icon

thanks-this will be useful!