this is a remake of this old processing sketch http://vimeo.com/711364 now running realtime. Sorry for the crappy quality which makes the shader effect I am proud of kind of invisible. Its sort of a motion blur when tha camera shakes to the beat.
looks good! but I would recommend you use something like snapz pro to capture the footage :P. You can use soundflower (free from cycling '74) to create a virtual audio output port which you can also route to your speakers so you hear whats going on, and snapz pro can record the audio with the video… (you can also use it route internal audio playing - e.g. mp3 - to software for processing as well)…
I use soundflower to get anything from my soundcard since it doesnt work without it. I tried to screencapture it with different programs but that makes the music go out of sync and furthermore destroys the framerate. So I decided against it. I will try to make some prerendered footage during the next days/weeks.
PS: There is sound on the video. I only had the speakers of my mbp around thats why the quality is so crappy.
I made a prerendered version. First I wrote all the fft data from the sound file to an XML and afterwards saved every single frame of the anymation using the FFT data from the XML to end up with a “rendered” video.
I guess I can only help you with the way I make the bubbles look 3D. I use a Shader for Billboarding purposes, so that the bubble textures always face the camera. it looks something like this:
I’m trying to do the billboarding using a shader. I’m using your code sample, and some code sample from Simon Gelfius [from a Processing project] as example.
I have ofxShader working in my project.
When I set the following shaders active the GL_QUADS [and the texture mapped on it] become invisible.
What am I missing ? Does something specific need to done to the opengl context in order to make this works - the ‘relation’ between the opengl camera and the Billboarding.
After doing this example application I have at least some stuff on the screen, but it is still buggy.
Following are the different params available:
press ‘1’ to turn off shader - It speaks for itself
press ‘2’ to toggle on/off rotating camera - Camera rotating around the center of the stage
press ‘3’ to toggle on/off on shader A [only] - This activates the shader included in an example for ofxShader. It deforms the shape/vertex.
press ‘4’ to toggle on/off on shader B [only] - This activates the billboarding shader.
press ‘5’ to map or not a texture on the GL_QUAD; - Map or not the texture on the GL_QUADS
For tests:
2 ----> works
5 ----> works
2 + 3 ----> works
2 + 4 ----> Almost there, just some wrong coordinates. The GL_QUADS is not drawn in the center.
4 + 5 ----> totally off
For the Camera I’m using some code shared by Rui Madeira.
I had to change ofTexture for this. I know I should have extended it, but I didn’t
I added to functions:
in the .h
int getTextureTarget();
unsi[]gned int getTextureName();
//----------------------------------------------------------
int ofTexture::getTextureTarget(){
return textureTarget;
}
//----------------------------------------------------------
unsigned int ofTexture::getTextureName(){
return (GLuint)textureName[0];
}
and made those properties public
int width, height; // pixel width (ie, 320 x 240)
int tex_w, tex_h; // internal w,h coords (ie, 512 x 256)
So the glTexCoord4f is definitively the solution, but I don’t manage to set the values in a way that it works. Or the quad is not placed correctly or the texture does not show.
I played around with some example in p5 but couldn’t figure out how to apply the solution to the quad in my really basic code.