jit.world respect ratio in full screen

tristan F's icon

Hello, I'm working / having fun with this program. And there is a thing I don't understand. I can add dimensions at my jit.world. And I can see it in Full Screen. It works !

But, I'd like to adapt the size of the visual, while it's in full screen. For exemple, I want it in 4:3. My screen is in 16:9. And even when I add "dim" and "repect_ratio"to my jit.world, the full screen is stil in 16:9.

I'd prefer to have it 4:3 with black borders. I dont't understand how to obtain it.

Thanks,

T

here is the patch

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

Robert Ramirez's icon

It's tricky with the way you have your feedback system setup, with everything tied to the output of the jit.world, and therefore linked to the world's window size.

I believe the solution is to draw everything to a jit.gl.node with @capture 1 @adapt 0 and dims set to whatever your final output dims should be. You then send this texture to jit.world and, by default it will add "letterbox" bars based on the aspect ratio of the output.

You will need to add a jit.gl.layer to draw the feedback, and a jit.gl.asyncread to convert to matrix for recording.

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

tristan F's icon

It works for the size ! But here is the problem : I erase all my patch. I copy past your code. And everything works just fine :)

I Save it. Close it, open it again, and it doesn't work anymore... The size of the window is correct, but all visual aspect doesn't work anymore...

(I've deleted all my previous comments to keep only the summary here.)

Rob Ramirez's icon

sorry, I should've added @layer -1 to the jit.gl.layer object. This ensures the layer draws underneath the mesh. see if adding that fixes things up.

tristan F's icon

Thanks a lot, it works ! I didn't know the jit.gl.layer object, really nice , I'm gonna take a closer look :-)