Thursday, February 26, 2009

Shaders

So it helps when you initialize the array of classes. Now the multiple shaders work!

You create your array of pointers in the .h file:
Atom **atomArray; // ** designates an array of pointers

Initialize them in the .ccp file:
atomArray = new Atom*[numAtoms]; //creates the array

create the objects like so:
if (key == '1'){
atomArray[numAtoms] = new Atom(0,0,0,"brick");
numAtoms++;
}

call the methods:

for (int i=0;i < numAtoms;i++){
atomArray[i] -> draw();
}


and then things don't crash so often.

Onward and forward!

I realize this post is labeled Shaders and does not talk about them other than they are working.

Crunch Time!

I am having memory issues with the ofShader add on. If I can't get an answer I will have to add the shader purely in OpenGL. It is fairly easy but a lot of extra coding. I have the default base mode up and running. There is one glitch that all the alchemy symbols appear in the corner when the program first runs but after that they are fine. Occasionally they move when they have not finished fading out so I will add a if statement to stop that from happening. The pixel class for mode 2 is almost done. I need to add a movement behavior and then make some keys to test out functionality. From nothingness the user will create pixels of varying color and movement. Once a certain number is met they will form primitives and fog entering mode three. Mode three will be more complex. The maya file for the bottles was emailed and will hopefully be printed soon. A very dear thanks to George for a superb job modeling the bottles. Well its off to get a sandwich and program some more. Half way done with today's work if I have good luck I can start working in on tomorrows to do list.

Tuesday, February 24, 2009

This Week's Report

Three classes up and running. Hopefully I can finish the bottle file today.

Things not working:
I can't get more than one shader at a time.

Things to get done tomorrow:
Create some nice looking shaders.
Render a video of smoke to overlay over the graphics.
Add the video as a texture to a 3D plane.

Thursday THESIS MADNESS DAY:
Finish coding the next two steps in the "alchemy" process. (that leaves 3 more to go!)
Add some wiimote interaction into the main program.

Friday:
Bother ID about bottles.
Code...code...make pretty art.

Weekend:
Code...code...make pretty art. Order that last bits needed. Probably should sleep and clean my apartment sometime.

Wednesday, February 18, 2009

Display Lists

I am running my openGL primitives through a display list and now my program is much faster. I actually will have to change the movement algorithms to slow some of the objects down. However I did get the following error after creating many many shapes.

2009-02-18 18:12:50.225 openFrameworksDebug[2294:10b] *** -[GLUTView wantsLayer]: unrecognized selector sent to instance 0x47c050
2009-02-18 18:12:50.227 openFrameworksDebug[2294:10b] GLUT Fatal Error: internal error: NSInvalidArgumentException, reason: *** -[GLUTView wantsLayer]: unrecognized selector sent to instance 0x47c050

Looking into whatever this is.

Thursday, February 05, 2009

Wiimotes

I have OpenFrameWorks taking in information from three Wiimotes simultaneously. Through OSC I can easily send the roll, pitch, yaw, and x and y coordinates. The Wiimote is a nifty little piece of hardware. It internally triangulates its location with the four IR points and sends the data. Less math for me to do and less processes for my program to run. I created a program that you can move simple glut shapes with the location of the wiimote. There is less false data when you change your z position that I expected. It might be accurate enough and not require modifications.

Wednesday, February 04, 2009

Updates

I got some GLSL to work in OpenFrameWorks. I also have two wiimotes working in OF by using Osculator and sending it through OSC. The creators of Osculator stated that the program only worked with five to six wiimote leaving me one to two short. The easiest solution is to have a second computer control five to four wiimote and send them over a port using OSC. This leaves the remaining computer to control the other wiimotes and the graphics. I beat in the corners of my apothecary to give it a more aged look. The flow chart for the program behaviors should be done tomorrow. I should also get the wiimote IR in OpenFrameWorks running tomorrow. By Friday or Monday I will have a 3D print of the bottle and will start casting.