EYESY openFrameworks (beta) mode development

Here’s a thread for dev conversation on making Modes for the openFrameworks / openGL / Lua version of EYESY.

Perhaps this can be a good place to share tips / tricks / techniques / questions for making ofLua Modes along with sharing scripts themselves (until patchstorage gets an EYESY category - see here to vote for adding the EYESY category there).

Here’s an example I made yesterday which uses Stereo inputs - audio changing circle size, z position, and color, knobs changing rotation.

(had to remove audio on this since it was something off my iPod and not cleared for YT)

7 Likes

Very cool! I’m pretty clueless about Open Frameworks and Lua so I’m just starting by tweaking other patches. Care to post yours?

I started by modifying the ofLua examples.

I’ll try to post some examples soon

EDIT: here’s a couple Modes if someone wants to test them (second one is whats in the video above)

RectGridSOUND.zip (2.2 KB)

2circles.zip (1.8 KB)

1 Like

Awesome I’m looking for new modes… Thanks,

1 Like

I’ve started to get some ofLua examples posted on Patchstorage.

4 Likes

I’m assuming these patches you’ve listed on patchstorage require another step beyond simply uploading and unzipping the files on a stock Eyesy…

do I need to change something to run these Lua files?

I uploaded and unzipped, saved, and rebooted.

there are no new patches on the Eyesy.

They are for the oFLua/openframeworks version of EYESY - so you need to have that beta stuff installed. See here

Then these modes would be dropped in /sdcard/Modes/oFLua. Then you would need to Stop Video from the web editor, and Start oFLua

1 Like

thanks for the quick reply!

is it possible to have both “regular” Eyesy and oFLua versions on the device and simply switch in the OSD menu?

They are 2 different “engines” so you can’t run them at the same time. But they can co-exist and you can easily switch between them from the web editor (without a device reboot).

I don’t believe there is a way to switch between engines from the device controls - only from the web editor (or via SSH).

1 Like

that’d be cool if that was possible while on a gig (without a computer)!

thanks for the tips!

You could run the web editor on your phone or a tablet. :slight_smile:

1 Like

Oooo, I forgot about that in this moment

It’d be super handy if we could create a backup of the SD card from the editor.

…unless we already can and I’m just daft…

I just read that installing oF/Lua will wipe the card.

Are there any Web resources that one might refer to in order to begin learning LUA/OFx/OpenGL in general or specifically as they relate to developing Modes for the EYESY?

1 Like

There is some info here about this: EYESY disk image for openFrameworks / openGL / Lua (beta) Specifically:

Additionally we posted EYESY Example Modes for openFrameworks / openGL / Lua which should take some of the guesswork out of getting the bigger concepts/syntax from openFrameworks into Lua.

1 Like

I thought this thread might serve as a good place to collect references.

Ask questions here for sure - I’ve been poking at the OF stuff for a couple months on and off.

Unfortunately the ofLua versions of the OF functions are sometimes a little confusing if you’re looking at OF source code and trying to adapt it.

Resources

This is a list of all the oFLua function syntax which can be helpful if you’re not sure about how a particular function is done in oFLua.

OF documentation

Then there’s also the openFrameworks discussion forum, but that might be a much wider/deeper rabbit hole than you need.

OpenGL/WebGL resources:

shadertoy

OpenProcessing

2 Likes

Still don’t know how to make this sort of thing go on EYESY yet, but gonna try…

Another WebGL resource:

1 Like

Curious to see how this goes! I’ve got some old shader code I want to turn into an eyesy mode, but I’m new to OFx/Lua so still struggling to figure out how to do that

2 Likes

So I tried to adapt some shader code into a new mode yesterday and ran into the following issue

[ error ] ofShader: sorry, it looks like you can’t run ‘ARB_shader_objects’
[ error ] ofShader: please check the capabilites of your graphics card:
[ error ] ofShader: setupShaderFromSource(): failed creating GL_VERTEX_SHADER shader
[ error ] ofShader: sorry, it looks like you can’t run ‘ARB_shader_objects’
[ error ] ofShader: please check the capabilites of your graphics card:
[ error ] ofShader: setupShaderFromSource(): failed creating GL_FRAGMENT_SHADER shader
[ error ] ofShader: linkProgram(): trying to link GLSL program, but no shaders created yet

It seems as though you need to set the GL ES version to get shaders working on the Pi. I linked a similar github issue below that seems to solve this issue. The problem I’m running into however, is that the ofGLWindowSettings class being accessed in the c++ code in the github issue doesn’t seem to be implemented in the Lua build of OF. I’ll keep looking into this one but if anyone has any suggestions to address this that would be super helpful!

1 Like

I ran into similar problems and didn’t get far in solving them.

The github issue above is in regards to OF 0.9.3 and things have changed a bit in OF 0.11.0 (which is what’s on EYESY). (I believe) ofGLWindowSettings settings; does not seem to be used now. Many of the OF shader examples didn’t work for me on the Pi. I worked on this like a month ago and don’t remember all the various details now.

See my reference here: Running Shader On Rpi 4 - arm - openFrameworks

So - unfortunately it seems like an open issue. I’ve not had time to go back and poke at this further.

3 Likes