Exporting Hi Res Images from Jit.world

A Gaffney's icon

Hello all!

I'm attempting to export single frames from a jit.world context as high resolution still images. I thought it would be a pretty simple task, but can't seem to figure out a simple method of accomplishing this.

I've been using jit.record as a method for capturing .mov output from the jit.world object, and I thought I might be able to sort it out by using the .jpeg output codec, but it hasn't been that easy.

I've also tried piping the jit.world matrix output to another matrix and using the "exportimage" command, however this leaves me with lower resolution images with differences from the original jit.world output.

As a stopgap, I've been using the Mac screenshot function in fullscreen mode to capture PNG images at 3360 x 2100 res, but it feels like cheating and gives me little control over output. There has to be a better way!

Any help would be appreciated! I'm fairly new to Max and Jitter; maybe I'm missing an obvious trick!

Rob Ramirez's icon

jit.world @output_matrix to jit.matrix and exportimage command should work fine. what's not working for you? you can decouple the output resolution from the render-window size using the @dim attribute. you may also want to disable matrix_mode_async, otherwise your matrix output will be one frame delayed from your window.

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

A Gaffney's icon

Hi Rob, thanks for the reply.

This is close to a solution; the issue is that the image yielded in export has some color/gradient/etc. differences from the image in the window or the one yielded by a screen capture. This holds true across different DPI resolutions in Max's prefs as well. I've tried to illustrate with the images below.

Here is an image file grabbed using the exportimage command to a jit.matrix receiving input from the jit.world:

Here is a screen cap of THAT .png in Preview outside of Max (notice the color difference plus some artifacts - points seem to have outlines/lighting enabled even when disabled in the patch). This is the main issue I am having - the exported image is quite different at full resolution. Preview settings aren't contributing to this.

Finally, here is a screen cap of the same frame directly from the fullscreen window in Max.

These are differences that I can easily remedy in image editing software, I'm just stuck as to why they occur and feel like there must be an explanation somewhere in my Max patch. Here is the full patch for reference plus a screenshot of current settings.

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

A Gaffney's icon

Hello all,

I've solved this issue by taking the Syphon route:
enabling the @output_texture attribute on my jit.world and sending the output to a jit.gl.syphonserver object allows me to take high res "snapshots" of the jit.world output any time I'm quick enough to freeze the render and duck over to Syphon.
This seems to generally sidestep the display-to-image discrepancies, with a couple exceptions (most notably when using jit.gl.text). Regardless, I think I can work out the rest from here. Thanks Rob!


Andrew Benson's icon

FWIW, I've had a lot of good results by putting all my geometry inside of a jit.gl.node context with @capture 1 and @adapt 0 (and setting the dim manually), and then running the output of that to a jit.matrix with settings that match the output of jit.gl.node. I generally prefer PNG export files for this. If there are discrepancies of the image coloring, this may be the result of unaddressed alpha/transparency data in your scene, or could just be different gamma settings or color management in different graphics applications.

alain's icon

Hi,
I just found this post as I am experiencing the same problem with exportimage. The exported image has different colours that the matrix (or jit.world) output. going the syphon way is not an option, as I send the output to jit.ndi (hence output matrix). My workaround is to use jit.record. I bang a matrix into jit.record each time I need a snapshot. The only problem is that I have a sequence instead of discrete snapshot, but it is a quick way to solve the problem as the output of jit.record looks the same as the world's output. Just in case someone has the same problem. (haven't tried the gl.node solution). Also, only tested at fullHD so no guarantee it will work at higher resolutions.

ranchy's icon

Hi,
I see that this issue is still current. I have struggled for a while to find a solution to the washed-out quality from export-image compared to the screen render. I am now trying Syphon but I am getting the same result. I realize it is the alpha channel that seems to be rendered differently when the image is saved to a file. In the Syphon server window it renders fine but the snapshot from Syphon renders in a way that A Gaffney illustrates in this thread above. The same result using export-image.

It seems the alpha channel is the culprit. The image renders differently to screen than to an exported file.

I am combining 3 images using alphablend in 3 jit.gl.videoplanes. I am then using jit.world to send to Syphon or to a jit.matrix. Jit.world, Syphon and jit.matrix correctly display the image in the screen window and I can also see that the alpha channel has a non-zero value. If I remove the alpha channel it will not render correctly on the screen or to the file. Is there a way I can flatten the image to lock in the render and remove the alpha channel ? Then I assume I can export the image using a matrix or Syphon.

Thanks

ranchy's icon

Hi,

Follow up on previous post of mine. Thanks to Rob Ramirez I found another post of his where I learned I could put a jit.gl.pass before export-image in jit.matrix and it seems to merge the effect of the alpha and export as expected.