I began playing around with hydra a bit today (and I’m only six months behind…). It’s really straightforward to program in, but thinking about the resulting image one pixel at a time took a little getting used to. The environment that Adobe provides for developing shaders is fantastic. It automatically creates control sliders when you declare parameters, so you can tweak the resulting images on the fly. I’m looking forward to seeing how this shading language is implemented in future versions of the creative suite so I can play with it further. For now, I have a simple displacement function that operates both linearly and radially, and allows you to ‘fade’ out the edges a bit.
For examples by someone with a lot more control over shaders, see Quasimondo.
For source code and more, check out the Hydra Gallery (I added mine at the bottom).
More photos on flickr.
I started messing around with Conway’s game of life this morning when no projects were assigned to me (I got plenty just before lunch, though). I was pretty bored with the tried-and-true 2-d grid rendering, so I tried the tried-and-true process of exploding the individual cells out into space based on pixel brightness (colors are currently selected randomly from a photo). I’ll probably continue to explore this in the near future to see what I can massage out of it.
I created a simple text animation class this evening that mimics the transition effect found on yugop.com. Type on the second line, then click ‘animate transition’ to watch the top line transition to what you entered.
The text effect now exists in both AS2 and AS3 versions. The timer class in AS3 provides a cleaner way to manage the animation, although I kind of liked normalizing the milliseconds myself.
Alright, so the influence on this is pretty obvious. Type in the text field at the bottom to break your own message. I’m still messing around with the matrix in flash — it really bothers me that I can’t just push/pop and know where I am in space. I ended up using some trig at one point to try to predictably adjust the matrix values. Perhaps I will resort to papervision so I can do simple matrix translations. Anyone who cares to look in to the matter in 2d can download the source.
I am loading a bunch of DisplayObjects and lining them up horizontally by grabbing their .width property and separating each by a certain margin. In doing so, I encountered a bizarre quirk in Flash. Sometimes, Sprites report a massively negative width ( -107373134.4, to be exact ). This occurs when I have attached a DisplayObject that has begun playing a NetStream but has not yet received metaData for the stream (a local .flv). My row gets all confused and places the next object at that massively negative location, which bungles up the rest of the view.
Okay, so the issue was coming from setting the position of the playhead based on the progress of the video before the video had made any progress. Rather than reporting the attempted access of an undefined value, flash decided to try to place the playhead in non-space. While theoretically cool, this prevents practical things from happening. A simple conditional statement fixed things if( video.progress > 0 ) position stuff.