algorithmic modeling for Rhino
It's been entirely too long since my last update, but I'm proud to announce that a new version of Firefly (126.96.36.199) is now available! There are a lot of new features and components with a few bug fixes as well.
Improved Arduino Support
The Firefly Firmata (Arduino Sketch) has gone through a massive overhaul - making it much more compact, efficient, and extensible. The sketch is now just over 230 lines of code (compared to more than 500 in the previous version). But more importantly, the firmata is now more extensible; making it easier to add support for new Arduino boards... Like what you ask? Well, support for the new Arduino Due platform for example. The Arduino Due is an advanced board and while it may look similar to the Arduino Mega... it's actually quite different under the hood. It features an ARM Cortex-M3 CPU which means its really fast. It also features 12-bit analog resolution for reading and writing (which is pretty awesome). As I said, the Due is a more advanced board and it does require some caution when getting started. You can find out more about the Due platform at the Arduino Due Getting Started page.
One of the biggest changes with the revision of the Firmata was that it required some structural changes with how the data is sent/received from Grasshopper. So, if you are planning on using the latest version of the Firmata, you'll need to also have the latest Firefly components installed as well. This shouldn't be an issue because the installer will place the new Firefly Firmata in your sketchbook folder and install the new components as well... but it's worth noting so you don't try to mix and match the versions.
Kinect Version 2 Support
Earlier this summer, Microsoft released a new and improved version of its popular Kinect motion tracking sensor. The sensor includes better body, hand, and joint orientation, 1080p color video (1920x1080), depth video (512x424), and a new active infrared video (512x424). The sensor now has the capability to track up to 6 people at once (compared to only two people with the previous version).
This build of Firefly now comes with three new components to work with this new sensor. The Video Stream can access the color, depth, and infrared video streams at different resolutions. Simply right-click on the video component to choose the video feed and resolution. Note: You may need to update your graphics card in order to get the infrared video stream to work properly (at least I did before it began working properly). The Skeleton Tracker is similar to the previous version, but can now track up to 6 people. And the Mesh Reconstruction component will build a fully colored 3D mesh using the color and depth data from the sensor. I plan to add more components to this section soon, but I wanted to go ahead and release this so more people could use it! [EDIT: I would like to thank Panagiotis Michalatos for his collaboration in the development of the Kinect V2 tools].
New Computer Vision Tools
This release also includes a number of new computer vision tools. One component to note is the Bitmap Tracer, which can be seen in action here. The Bitmap Tracer component spawns a number of randomly generated particles which trace the edges of a bitmap using the nearest contouring vector. Another pair of components is the Bitmap Decompose/Recompose which can either decompose or reconstruct a bitmap using a list of values for its constituent channels. These two can be used together to swap channels in an image (think chroma keying). There's also a Bitmap Threshold component which uses the average dithering algorithm to find the color quantization of an image. Lastly, I've updated the Leap Motion Finger Tracking component to work with the latest release of the Leap v2.2.1 software release. The component now has improved finger tracking including joint and bone position/orientation.
In addition to these new features, there's also a number of bug fixes too (check out the readme if your interested). As always, I welcome any and all feedback on this build. Your support really helps, so please let me know what you think!
thank you for the new release - its beautiful!
I like especially the idea of the bitmap tracer - it gives surprisingly artistic results and drawing with particles is a really interesting topic.
Do you have already plans for further development? Here are some ideas that came into my mind:
It would be nice if the particles also have a life time (for example if they die after getting stock for two long a one position).
Other possibility would be some local interaction between them would be possible like they merge or split, repulse, avoid collision, etc..
Also it would be nice to have some control over the particles during the drawing process. Maybe you can expose some of the internal parameters as inputs?
One small thing i noticed is that if you trace the output bitmap from the dithering component the particles still trace the original bitmap.
And finally some of the results of yesterdays testing:
Great work. I really like the image. Not that it needs any refinement... but one other thing I tried when I was wondering on this was to do a little post-processing. For example, all of the little tick marks that fall in the background. You can remove those by just finding the length of all the output curves and then culling all of the ones that are under a certain length. Again, I think the drawing is pretty spectacular. Congrats.
Regarding the feature suggestions... all are really good ideas. I refer to the points that move across the image as "particles"... but they aren't actually particles in the traditional sense. Particles (like boids) typically have a behavior associated with them... and in this instance they're really just points that find the closest contour vector and then move in that direction a small distance. It's similar to a particle I guess... but not nearly as sophisticated. I'm not sure adding other behaviors (at least in the traditional sense) would be very useful... but it could be worth a shot. I'll try to take a look and see how it goes. The particle lifetime is another good suggestion... although I'd have to think about how to do it. Right now, all the particles 'start' at the same time so if it was time based, then they'd all die at the same time (unless there was some randomness involved). I could 'emit' the particles (rather than spawning them all at once) to get around that... or I could 'kill' them off based on a different parameter (length for example). All good thoughts. I guess I'll keep playing around with it :)
Thanks for all your suggestions.
BTW, I just re-read your post (I originally read it too fast). Your suggestion about 'killing' off the particle if it's in one place too long is pretty nice. I'd have to beef up (or create :) an actual particle class that could hold parameters like the time it's been alive, etc... but again... it's a good suggestion.
Also, you should post your image to the Grasshopper image gallery. It really is quite nice.
Thank you for your quick answer and the kind words!
I'm also happy that you like some of the ideas..
I mean I can imagine that implementing some more sophisticated behavior would be a lot of work and you also would have to generally decide if you want to push firefly in that direction - before you start thinking about potential new behavior. I will also let you know if i come up with some ideas for that.
But I think also with the existing behavior (follow closest contour vector) some nice things could be done. You brought me to the idea that it would be already quite interesting to be able to control where particles get emitted and yes their lifetime.
This could be done by inputting a list of points. (birth location)
And then a second list with a value of how many iterations they will survive.
Then you could do things like to emit particles only in certain color regions and make their lifetime also dependent on the location.
Don't know how I didn't get around to downloading this until now...but it's incredible! The Leap tools are incredibly advanced - starting to wonder if there's a tiny x-ray machine in there somewhere! So many things have been resolved in the latest release, and it's good to have all of that amazing new functionality in GH.
Thanks again for all the hard work. Looking forward to experimenting with this in the near future.