Archive for December, 2006
Greetings 2006
Monday, December 25th, 2006Only the Pure
Wednesday, December 20th, 2006It’s built in a Processing stylee from nothing but nothing but code. Not once (to my anguish) did I capitulate and use the Flash GUI. It also has the basics of a CMS (press “L” for the Layout Manager). Download the source here. Yes it’s only AS2.0, but I’m poor. If you have issues with it, press “C” to bring up the debug console and mail me the info.
24 Hours My Ass
Sunday, December 17th, 2006Art
Monster a day
Ron Mueck show photos
A tea-cup that incorporates stain into the design (I love tea me)
Flame Fractals made using Apophysis
Movie
Simpsons Movie trailer
Grand Theft Mario
Animator vs Animation 2
Music
Skeelo – I Wish
The Making of Dark Side of The Moon (Pink Floyd)
Top 50 music videos of 2006 (Thanks again DoCopenhagen)
Dreams – TV on the Radio
Staring at the Sun – TV on the Radio
Marching Band does Radiohead
Code
Scriptable masks for Flash
Joshua Davis’ Flash to the Core demo files (with downloads!)
CDATA tags and getting HTML text from a Flash XML
List of computer vision resources
Dijkstra’s Algorithm comparison
Dijkstra demos and code
OSPF (Open Shortest Path)
Dijkstra in actionscript
Dijkstra (another explanation)
Efficient object management in Java
Turbo-Charging Java for Real-Time Applications
Hidden font utility in Win XP
Flash Delegate.as article
Computer Science links (BIG PAGE)
Online CSS tab designer
AfterEffects video tutorial (fast loading too)
Misc
LED Throwie Taxidermed Rats (I kid you not).
Jesus in a dogs arse
The man who unknowingly jacked-off watching his half-sister
Point cloud experiments with Sunflow
Friday, December 15th, 2006![]() using a glass shader |
![]() ambient occlusion (AO) |
![]() AO & depth of field |
This series and the previous images (with the random triangles) were fully rendered outside Processing. Currently this is far more flexible than my other plan to have Sunflow wrapped in a PGraphics. For one, the export option allows for easier tweaking the scene parameters (the global illumination lighting models have a lot of parameters and options to explore) as well as batch rendering frame sequences from the command line. This is far more resource friendly and efficient than handling the rendering directly from within a PApplet context, especially with high quality rendering times often lasting several hours per frame (you can get decent preview within seconds/minutes though).
So the library currently only supports triangulated geometry and I still need to make a decision & come up with a better mechanism to support various Sunflow primitive object types. This decision might involve breaking away from the restrictions imposed by my current implementation, which is based on Processing’s beginRaw() mechanism, just like the existing DXF/PDF export libraries. What’s fine for these other formats is not quite good enough for my case. For example, using sphere() together with beginRaw() in Processing will currently export a triangulated version of the sphere, not the pure mathematical surface. The problem is, there don’t seem to be any API hooks in PGraphics for various drawing commands and or state changes (box() is similar, but not problematic in this case). Unless I’m really missing something quite obvious, “recorder” PGraphics classes only get involved with and get access to the final, world transformed geometry. For my purposes I’d also like to get access to the current fill/stroke colours and transform matrices. Because PGraphics has “protected” access and doesn’t provide any getters for these properties, users are currently forced to duplicate some of these drawing commands in order to keep the library in synch with the “main” PGraphics instance used. So am still wading through the source(s) and trying to come up with a more user friendly solution…
By popular demand, here’s some more background info about the making of the 3 images above.
The lastest version of Sunflow (still unreleased, need to check out from SVN) is featuring a new ParticleSurface object primitive, which is the basis for the images above. Reading through the source code, I quickly figured out this type of object is only based on 2 parameters: a “point cloud” of 3d particles and a global radius size used for each particle. In order to quickly test drive & define some point clouds of my own, I wrote this absolute basic generator script below:
// point cloud generator for// Sunflow's (v0.7.0+) ParticleSurface primitivevoid setup() { try { FileOutputStream fs = new FileOutputStream("c:/molecule_"+(System.currentTimeMillis()/1000)+".pointcloud"); DataOutputStream ds = new DataOutputStream(fs); float x=0,y=0,z=0; // start at origin float scl=0.25; float dim=50; for (int i = 0; i < 250000; i++) { // randomly progress within the bounding box x=max(-dim,min(dim,x+random(-1,1)*scl)); y=max(-dim,min(dim,y+random(-1,1)*scl)); z=max(-dim,min(dim,z+random(-1,1)*scl)); // write out coordinates as raw floats ds.writeFloat(x); ds.writeFloat(y); ds.writeFloat(z); } ds.flush(); ds.close(); println("done."); } catch (Exception e) { e.printStackTrace(); }}
The next step then is to reference this generated data from a Sunflow scene file (You’ll need to edit the file name near the end)…
/*pointcloudtest.scsunflow test scene skeleton2006-12-13 toxi.co.uk*/image { resolution 768 432 % resolution 1920 1080 aa 1 2}
background { color 1 1 1}
accel kdtreefilter gaussian 2 2bucket 128 hilbert
%% camera definitions
% uncomment this one to enable depth-of-field/* camera { type thinlens eye 0 10 70 target -20 -20 0 up 0 1 0 fov 60 aspect 1.7777777 fdist 27 lensr 0.85} */
camera { type pinhole eye 0 10 70 target -20 -20 0 up 0 1 0 fov 60 aspect 1.7777777}
%% define a simple area light for soft shadows
light { type meshlight name l1 emit 1 1 1 radiance 48 samples 32 points 3 -60 20 60 0 60 -60 60 20 60 triangles 1 0 1 2}
shader { name a type amb-occ bright .4 .9 1 dark 0 0 0 samples 128 dist 16}
object { shader a type dlasurface % need edit this file path filename c:/molecule_1166058556.dat radius 0.125}
Save this file using the “.sc” extension and open it in Sunflow. Use the “IPR” renderer for easier previewing. You might need to adjust camera settings to better fit your generated particles.
If you end up successfully rendering something and have a flickr account, please do submit images to the newly created Sunflow group pool. Thanks!
Finally, I’m no expert in global illumination (in fact playing around with Sunflow are my very 1st baby steps with that technology). Everything I know so far about the SC file format is collected from examining the source code of the SCParser class and the demo files you can download. If you have any questions about rendering with Sunflow (not related to the tie-in with Processing), please check the official forum @ sourceforge…
Pomme d’amour
Thursday, December 7th, 2006
So this is it. I finally got my hands on a brand new MacBookPro notebook, being my first Macintosh computer I have ever owned. The switch from PC/Windows was less difficult than I first thought, though I am still feeling a bit uncomfortable with the keyboard and shortcuts (” Where the hell are the ‘{}’ chars ? “). Of course, this is very little pain compared to the difficulties I have been encountering for some time now with my slowly-dying three years old laptop : broken keyboard and dvd device, usb ports switching on an off randomly, unbearable fan noise and heat, degrading Windows operating system, and on and on … Anyway, I installed BootCamp, so I am still able to develop Windows applications which was very important for continuing developping VisionFactory on that platform.
I brought it to the second Processing workshop I animated in Craslab (Paris) last week-end. It went super well, again with lovely participants and organizers. Cheers to them ! For the occasion, I had coded a very little application based on Dan Shiffman SMS library and directly inspired from his particles example. It’s basic and brute force codeing, but still it is fun. By the way, it produced small Oooohs and Aaaahs when I showed it to the workshop audience, guess it was time to show how to install and use libraries in Processing.
Photo and video were shot by Mike, who just released his new website yesterday, exposing his masterpiece paintings.


