gibber-cc / gibber

An audiovisual live coding environment for the browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graphics issues

RnbWd opened this issue · comments

I noticed some issues in gibber2:

  1. Calling 'Graphics.init('3d')' displays a warning that my browser doesn't support webGL, and then the visuals crash. I noticed this issue when doing the tutorial on audiovisual mapping: using 'G.Graphics.init( '3d', col )', with or without the column cause this problem to occur. I'm using the latest version chrome on mavericks, and the graphics work fine before init('3d') is called.

  2. film shader doesn't work on my browser - it just blacks out the visuals. The equivalent function on gibber1 works fine for me, and the other shaders seem to work alright. Dots/kaleidoscope shaders are some of the coolest effects I've ever played with :)

  3. when calling functions that map onto graphics, like

// map the amplitude of the snare to the
// y rotation
a.rotation.y = b.snare.Amp

I have to call the function twice for the events to bind.

I haven't gone into the code-base yet, so I don't have productive advice :(

Thank you for developing this incredible piece of software!

Thanks for the bug report! I will dig in and get back to you on this.

I've just realised that 3) may be similar to another issue I just created (#12).... although funnily enough I was having trouble getting the simpler mapping as mentioned by @RnbWd to work even after multiple executions a moment ago, whereas the more complex loop example manages to assign one new mapping per execution of the loop (presumably as each invocation stops when it gets to an exception, but leaves a functional mapping in place at the same time as throwing the exception).

I also have the same problem with the Film shader, and have indeed had similar problems with some of the Three.js post-processing examples in the past in my own private project; work on that has been on hold for a little while, but I have been meaning to look back into it and contribute back up to Three if I make progress.

(also thanks for the nice software etc...)

Just a note that I did look into this issue a while back... but I was never able to figure out what was wrong with the Film shader specifically. My only thought is that it might take advantage of a particular feature on graphics cards that isn't always available.

Graphics.init('3d') works fine for me now... let me know if it's not still working for anyone.

I've just tried running on my Windows machine with an nVidia 560ti and found that the Film shader does work, but Graphics.init('3d') complains (with an inappropriate message) if it's already been drawing 3d. Let me know if you'd like any more details. I was running on an iMac before.

Actually, I'm getting seemingly inconsistent results here. After refreshing the page, I found that Film() was not working but Graphics.init('3d') was. After another refresh, they both were.

I had thought that I might have seen Graphics.init('3d') run quietly after doing some 3d, but I can't reproduce that now.

If I do

Cube()
Graphics.init("3d") //error dialog pops up
Film()

Then I get a blank screen, but if I then call Torus() I get a torus with a Film effect.
If I call Cube, then init, then Torus (at this point I see both a cube and a torus), then Film (at this point I see a torus with a film effect, but no cube)... at some point I noticed that I could layer on different effects, but none of the geometry was working...

I remember being slightly confused by the logic of how buffers are used in the EffectProcessor, as I mentioned, at some time I mean to make somewhat better sense of it.

I don't know to what extent the graphics card itself is important vs ANGLE implementation details / browser versions... FWIW I've done some work on an installation using WebGL with some very particular shaders and we use NodeWebkit partly for stability against those kinds of changes (which can lead to showstopping bugs when the browser updates) and partly for its other features.

Sorry for the delayed response... I've been traveling (and performing with Gibber!).

Some of the problems with the Graphics initialization stem from 2D vs 3D modes in Gibber. In 2D, I don't use WebGL, as WebGL requires a great deal more CPU than simply using canvas. However, I really like the idea of being able to combine shaders with 2D drawing, so, 2D mode effectively turns into a WebGL textured fullscreen quad as soon as a user instantiates a shader ( assuming webgl is available ). Basically, 2D mode becomes 3D mode as soon as a shader is employed.

This whole process is a mess right now. I need to completely refactor it. Hopefully some of these issues will go away after I sink some time into it. I plan to do so in the very near future... it's near the top of my list. Will keep this issue updated accordingly.

No worries re. delay; hope your travels have been good (NIME / LiveCoding and the Body in Brighton I guess, and maybe more).

All seems to make sense, good luck with your refactor.

So much for "Will keep this issue updated accordingly". This should be much improved now, although it's still messy even after I tried to refactor it. But it seems like you can switch between the demos (which alternate between 2d and 3d modes) and everything mostly works. Let me know if there are still big problems.

Seems much improved at a glance. Nice to have Gibber brought back into my radar; must have more of a play at some point.