Aliasing Beauty
Finally, i posted about the Aliasing Beauty, a relative to Black&White project created for Written Images book. Read more..
Finally, i posted about the Aliasing Beauty, a relative to Black&White project created for Written Images book. Read more..
Kinect is a new product from Microsoft for XBox360. With an RGB camera, a 3D depth sensor (structured IR light) and a multi-array microphone , it is able to compute a depth map, something very interesting for the interactive world of creativity and gaming. Nothing new as technology, but still, interesting and cheap. Since its release people have been trying to work in order to hack it and get it to work with windows and mac OS. Quite a few people have been working on drivers and a way to hack the gadget to get access to the color/depth data. One of these people is called Alex from Code Laboratories, the man behind the PS3eye camera drivers for PC’s. Recently, he released a new package (C and C#) that includes drivers and SDK for Kinect. I took the SDK and with JNA i wrote a library for java that wraps the original one and also tries to make its use easy for starters.
A very early release is available http://victamin.googlecode.com/files/CLNUI4J_01.zip. This might or might not work out-of-the-box and it sure needs improvement and more work, but as they say, release early, release often. This package includes the library and basic examples running on Eclipse IDE and processing IDE (untested). It is known that this library does not work directly with Processing.
EDIT! Version 0.2 is now available at: http://victamin.googlecode.com/files/CLNUI4J_02.zip.
You can now find a friendly wrapper and a couple of examples to get you started.
I would love to get some feedback, so if you’re a Kinect owner and you’re into java/processing, give it a spin and let me know how it works out for you.
Have fun.
So here it is, the application and source code for GML Viscosity.
I finally took the time to clean up this project and make a public release. In the packages you will find binaries and source code for the application, so if you’re thinking of using it and come up with something nice, let me know. After the first release i have fixed some problems with memory access and crashes. I have also added a simple UI for easy pick of tags from the “data/tags” folder on your hard-drive.
What is it?
- GML Viscosity is an experiment. It is application used to draw GML tags on a viscous liquid rendered purely on the GPU side.
What does it do?
- It liquifies your tags, in a way you can hardly read them but still looks cool (thats graffiti).
- It is possible to load gml files from the disk or directly from the “lots of zeros”book database.
How can I interact?
- Not implemented on this version. This version selects and draw gml files randomly from the web or from a tags folder. For a smart person it should be easy to add mouse support. The code is also prepared to support multitouch so, it should be easy to implement TUIO and create your multitouch version.
- Use ‘r’ key to randomly fetch a new tag from the website and if available it will draw it on the screen.
- Use the GUI window to pick any tag from the folder “tags” inside data folder.
Where can i get it?
Windows Version | MacOSX Version
Have fun.
Recently I have been doing some work with OpenCL and i found myself messing up with old code and re-writing most of it . At first it was interesting and quite funny but no more, so, I thought it was time to make things easier for myself and just make things reusable by creating a wrapper which would wrap most of the boring and time-consuming parts. This would be a wrapper on OpenCL for Java and/or Processing. Well, a well known guy named Mehmet “Memo” Akten has done such a wrapper in C++ for the OpenFrameworks and Cinder libraries. I have ported it to Java.
There are some problems with reading/writing from/to GL textures. For some reason it crashes on me. I have been working with JavaCL‘s author, so hopefully it will be working soon.
:: Download
Download it, install it and try it.
If you find any problems or if you have suggestions, let me know.
Have fun.
I have recently done some experimental work in order to render mass amounts of cubes. I was moved by this video from Smash, i wanted to know how far i would be able to go on my NVidia GT240M (rendering side). My first choice was Geometry Shaders.
I quickly wrote an app that sent a list of points in space to the GPU and a geometry shader would generate a cube mesh for each one of the points. Tested it on 100.000 cubes and the framerate was bad(10fps or so). The time was now for optimization.
Next step was to optimize the cube generation by lowering from a 24 vertex cube to 14 vertex triangle strip. Things got better, but nothing close to my expectations. I was not satisfied, i mean, i had alot of cubes on screen (100K which was not that much) and that was it, nothing else. We’re talking about 20fps or so, for 100.000 cubes (around 1.2 million triangles per frame). Later on i added vertex normals to the geometry shader and started to work on some lighting/shadowing, but i ended up going back on the rendering side of the job. Meanwhile, i was speaking with a friend of mine about this idea and we were discussing ways to compute lighting but i couldn’t stop thinking about my real problem. So it came to me.
Previously, i have done some experiments with opengl hardware instancing, but never got to do much about it . What better time than now, so i grabbed the project and took it for a spin. After a few hours i had the same amount of cubes on screen with a much much better framerate. Quickly implemented some eye-candy (coloring, texturing, vertex lighting), some tweaking here and there and as i was listening to Mr. Peter Broderick (hi, i love you man) added some audio analysis to the feature list.
Last but not least, a kind of “Brownian Motion” was used to generate points in space, increased the cube count to 512*512 and watched it flow ( at 20fps ).
In conclusion, Hardware instancing was much easier to implement and performance seems much better at first sight. Above is a video of 262.144 audio-reactive cubes with GPU animation and basic lighting at around 20fps. For my video card i think that is very good. On a sidenote, i have not given up on the geometry shaders. I am not sure what will be my next step regarding the subject (back to geometry shaders?) but for now this is it. Hardware Instancing kicked Geometry Shaders in the ass.