Todd Hoff
Todd Hoff

Reputation: 762

Best way for Processing to display graphics on a custom built remote display?

The goal is to use Processing as a scripting environment for creating graphics and to have the output display on a custom display device that is something like an LED light panel. The server running the program will be on a 1U rack. The idea is all the LED stuff is custom hardware, but rather than reinvent the wheel, it would be better to use an existing stack to drive the display. The problem is getting java to display on this device.

My initial thoughts are: 1. Run Java in headless mode. 2. Use Xvbf as the framebuffer. 3. Have a program run that reads the framebuffer, unpacks it, and then displays it on the remote device, at 30 fps. 4. Use Processing scripts to generate the graphics.

Does this make sense? Is there a better way? I'm not that knowledgeable about this area, but it seems better than trying to create a new java.awt.

Upvotes: 5

Views: 296

Answers (3)

timday
timday

Reputation: 24892

If the "remote device" is just something directly attached by USB or some PCI controller, this seems sound (and exactly the sort of thing xvfb is made for). But if the remote device is something connected by ethernet or wifi, depending on it's resolution you might find the naive approach of copying all the data each frame requires too much bandwidth and before you know it you'll be rolling your own frame-differencing image compression. If you find yourself going down that route look at the VNC/TightVNC class of software which (at least in the form it's normally used on headless servers) provides an Xvfb-like virtual framebuffer/X-server accessible by a TCP/IP protocol which can transmit the content reasonably efficiently using compression and display it with VNC client software.

Upvotes: 1

Todd Hoff
Todd Hoff

Reputation: 762

Another proposed option is to use Processing's createGraphics() and write the result to a file. I don't know about the tradeoffs of this option. It doesn't support OPENGL. And I'm concerned that the write will be a synchronous operation so calculations can't be going on during the write, which would make it difficult to get a high frame rate I would think.

Upvotes: 1

trashgod
trashgod

Reputation: 205805

I routinely use JFreeChart in headless mode with VNC to generate charts in servlets using ChartUtilities. It seems like you could just download the pictures to a picture frame via USB.

Upvotes: 1

Related Questions