Beautiful effect! One question - in the example client, if I drag the 3D model while it's drawing is it still comparing against the front projection or is it comparing against the projection from which I'm viewing (if that makes sense)?
To answer your question, rotating the view doesn't affect the calculations at all. Internally it renders (unrotated) into a smallish scratch buffer for comparisons; it's only when painting to the screen that it knows how to rotate the output.
That's good. So you could combine it with head-tracking and have an interactive 3D piece of "growing" art on your wall. I'm guessing the GPU on a Raspberry Pi, for example, would be underpowered but it would be fun to look into.
Well, rendering data that's already made is very light weight, since it's only a few hundred triangles.
As for creating new projections, it depends on whether you can read data from the gpu with gl.readPixels() or not. From googling docs I thought this would work anywhere OpenGLES 2.0 was supported, but my test device claims to support OpenGLES 3, and readPixels() fails on it - I haven't looked closely at why yet.
6 comments
[ 4.0 ms ] story [ 21.3 ms ] threadIncidentally, even after implementing this I'm still not sure if it's proper to call it a genetic algorithm. Any comments welcome.
Thanks for checking!
To answer your question, rotating the view doesn't affect the calculations at all. Internally it renders (unrotated) into a smallish scratch buffer for comparisons; it's only when painting to the screen that it knows how to rotate the output.
As for creating new projections, it depends on whether you can read data from the gpu with gl.readPixels() or not. From googling docs I thought this would work anywhere OpenGLES 2.0 was supported, but my test device claims to support OpenGLES 3, and readPixels() fails on it - I haven't looked closely at why yet.