Results 1 to 10 of 10

Thread: bitmap to ilda. a rant and some experimemts

  1. #1
    swamidog's Avatar
    swamidog is online now Jr. Woodchuckington Janitor III, Esq.
    Join Date
    Nov 2006
    Location
    santa fe, nm
    Posts
    1,545,760

    Default bitmap to ilda. a rant and some experimemts

    i built a laser projector a while back. it was a rite of passage for me, but that's a story for another day.

    i have no interest in shows. i want to make art and unstick the images in my head.

    here i am with a little box of science (i call it the satellite of love) in my living room. there's something seductive in its physical presence. the mass, the hum of fans, the otherworldly light that flickers out.

    i bought LSX and an etherdream DAC. it's an awesome combination. i've made some good shows.

    there's some great show content on the pl ftp site. i grabbed it all, discarded the junk, and watched "walk like an egyptian" about a hundred times.

    in an earlier time, i used to do 3d work for video. at university i did performance art with amigas and flickering wireframe animations. nights and nights of rendering time with little 680x0's and frame recorders. the wireframe aesthetic stuck with me. during my chicago years, i did a series of photographs with laser projection grids on nudes.

    i'm wandering, but i think you can see where i'm going with this.

    i'm not interested in making flickering neon cartoons. that's what video projectors are for. i want polygons and lines and strange geometries.

    LSX included ILD SOS. i spent some time converting bitmaps to svgs with inkscape and piping them through ILD SOS. it works well and is great for a frame or two, but useless for a long sequence of frames. inkscape has a command shell. it may do the trick, but i was a little annoyed at how it worked under osx and i decided to switch gears.

    the bitmap to path conversion routine in inkscape is based on potrace. i grabbed the source for potrace and compiled it on my mac.

    http://potrace.sourceforge.net/

    potrace wants pnm files. no problem. imagemagick is an awesome utility for doing command line image manipulation.

    http://www.imagemagick.org/script/index.php

    i fed it some test frames.

    two problems.

    1) potrace doesn't handle color. it turns out inkscape does some excellent magic under the hood to work around this. this is not a show stopper.

    2) potrace doesn't do centerline tracing. bzzzzt!

    back to the magnetic abyss.

    google suggests autotrace. it's old and free, but the source is still floating around.

    http://autotrace.sourceforge.net/

    i untar, make, make install it, and spend some time working out the syntax.

    it looks promising and inkscape has no problems opening my test svg.

    i raised one eyebrow and had some alchemist coffee.

    i rendered a lot of blobby sphere animation frames.

    Click image for larger version. 

Name:	frame-000211.jpg 
Views:	42 
Size:	20.4 KB 
ID:	30591

    and wrote a oneliner to batch the conversion:

    cshort$ ls -1 *jpg | awk -F".jpg" '{print "convert "$1".jpg "$1".pbm; autotrace --centerline --output-format svg "$1".pbm > "$1".svg"}' > batch.sh

    cshort$ head -5 batch.sh
    convert frame-000000.jpg frame-000000.pbm; autotrace --centerline --output-format svg frame-000000.pbm > frame-000000.svg
    convert frame-000001.jpg frame-000001.pbm; autotrace --centerline --output-format svg frame-000001.pbm > frame-000001.svg
    convert frame-000002.jpg frame-000002.pbm; autotrace --centerline --output-format svg frame-000002.pbm > frame-000002.svg
    convert frame-000003.jpg frame-000003.pbm; autotrace --centerline --output-format svg frame-000003.pbm > frame-000003.svg
    convert frame-000004.jpg frame-000004.pbm; autotrace --centerline --output-format svg frame-000004.pbm > frame-000004.svg

    two minutes later and i had 1080 svg frames.

    i opened up the directory in ILD SOS and exported the svgs into a single ILDA animation.



    this is a baby step. but very satisfying.
    suppose you're thinkin' about a plate o' shrimp. Suddenly someone'll say, like, plate, or shrimp, or plate o' shrimp out of the blue, no explanation. No point in lookin' for one, either. It's all part of a cosmic unconciousness.

  2. #2
    Join Date
    Dec 2007
    Location
    Stockholm, Sweden
    Posts
    551

    Default

    Nice work, that looks promising!

  3. #3
    swamidog's Avatar
    swamidog is online now Jr. Woodchuckington Janitor III, Esq.
    Join Date
    Nov 2006
    Location
    santa fe, nm
    Posts
    1,545,760

    Default

    i don't want to cross post too much, but i used this technique in my "pump up the volume" show:



    Quote Originally Posted by dar303 View Post
    Nice work, that looks promising!
    Last edited by swamidog; 04-22-2013 at 16:17.
    suppose you're thinkin' about a plate o' shrimp. Suddenly someone'll say, like, plate, or shrimp, or plate o' shrimp out of the blue, no explanation. No point in lookin' for one, either. It's all part of a cosmic unconciousness.

  4. #4
    Join Date
    Aug 2009
    Location
    Onancock VA
    Posts
    224

    Default

    Nice work. I hope to gett the images in my head put to screen someday.

  5. #5
    Join Date
    Mar 2011
    Location
    Chicago area, IL
    Posts
    222

    Default

    This post caught my attention with the same amount of force as when I first saw a homebuilt RGB projector.
    Swami, you have shared quite a bit of information here and did a ton of work exploring different software.
    Forgive my ignorance, but I'm wondering about couple more bits of info --- then think its time to dig in.

    I'm having memories of working at ma bell.... Are you running Unix of some sort (the instructions untar, make, etc) ? I see there is a windows verson for autotrace, in this case could the batch commands be executed from a MS-DOS prompt? What are you using to draw your .jpgs (what is the .pbm file?) that you batch convert to svg then finally ILDSOS?

    Its sorta surprising there are not more follow up posts to this thread.... Looks like a wealth of power and information is written into this gem of a post....

    Been playing with Inkscape and ILDSOS long enough to realize the power.... Now its time to figure out how to use some open source software (hopefully) for animation. I have access to all sorts of AutoDESK software such as CAD, and did some .dxf experiments and loaded into ILDSOS, but like you said, thats one frame at a time.

    I discovered access to AutoDesk's Sketchbook designer.

    It can save .psd, tiff, png, bmp, jpg, portable bitmap, and targa (whatever that is) .tga .vda ..

    Swami, do you think this could be a reasonable tool to start from (Sketchbook), and if so, which file extension do you think I should save to for best performance?

    Hopefully this information can help others ..... I'd try to chat but the firewall at work blocks it ..... Thanks!

  6. #6
    swamidog's Avatar
    swamidog is online now Jr. Woodchuckington Janitor III, Esq.
    Join Date
    Nov 2006
    Location
    santa fe, nm
    Posts
    1,545,760

    Default

    good questions!

    i did this all on my mac running OSX (which is just unix with an excellent interface).

    the blobby sphere frames were rendered in "groboto" (http://www.groboto.com/v3/).

    and the graphics in my "pump up the volume" show were rendered in lightwave 3d.

    i haven't tried it, but i'm fairly certain you can use ildsos to convert dxf directly into 3d ilda frames. this would be something to talk to drlava about.

    pbm is just a portable bitmap. there's a whole series of old graphic formats pbm/pgm/ppm, etc. that i used to use in my old unix days. here's some background:

    http://en.wikipedia.org/wiki/Netpbm_format

    i'm sorry i don't have any experience with sketchbook, but it sounds like it would work.

    Quote Originally Posted by JasonB View Post
    This post caught my attention with the same amount of force as when I first saw a homebuilt RGB projector.
    Swami, you have shared quite a bit of information here and did a ton of work exploring different software.
    Forgive my ignorance, but I'm wondering about couple more bits of info --- then think its time to dig in.

    I'm having memories of working at ma bell.... Are you running Unix of some sort (the instructions untar, make, etc) ? I see there is a windows verson for autotrace, in this case could the batch commands be executed from a MS-DOS prompt? What are you using to draw your .jpgs (what is the .pbm file?) that you batch convert to svg then finally ILDSOS?

    Its sorta surprising there are not more follow up posts to this thread.... Looks like a wealth of power and information is written into this gem of a post....

    Been playing with Inkscape and ILDSOS long enough to realize the power.... Now its time to figure out how to use some open source software (hopefully) for animation. I have access to all sorts of AutoDESK software such as CAD, and did some .dxf experiments and loaded into ILDSOS, but like you said, thats one frame at a time.

    I discovered access to AutoDesk's Sketchbook designer.

    It can save .psd, tiff, png, bmp, jpg, portable bitmap, and targa (whatever that is) .tga .vda ..

    Swami, do you think this could be a reasonable tool to start from (Sketchbook), and if so, which file extension do you think I should save to for best performance?

    Hopefully this information can help others ..... I'd try to chat but the firewall at work blocks it ..... Thanks!
    suppose you're thinkin' about a plate o' shrimp. Suddenly someone'll say, like, plate, or shrimp, or plate o' shrimp out of the blue, no explanation. No point in lookin' for one, either. It's all part of a cosmic unconciousness.

  7. #7
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    LaseBoy can convert a single DXF image into a frame or a whole directory full of DXF files in alpha-numeric order into a frame set.

    There are some options for importing, but in general a whole frame set it imported as one thing and all of it is scaled to fit the screen as a whole thing.

    IldSOS gets its DXF reading ability from the core of LaserBoy. Andrew added the SPLINE entity to his code, but it is 2D only. All of the DXF import capabilities of LaserBoy are fully 3D.

    LaserBoy can read DXF colors from the standard 256 color DXF palette (included with LaserBoy) or DXF true color. In either event, the colors you get can be best matched to the default ILDA palette of 63 colors or whatever...

    Just make sure to export your DXF as rev 12. That uses POLYLINE instead of SPLINE.

    Plus LaserBoy is free so you can try it at no cost.

    LaserBoy can also open a standard bitmap file into the background of the screen and you can manually trace over it with LaserBoy's drawing functionality.

    BTW, The ILDA output capabilities of autotrace were tested by its developer using a very early version of LaserBoy, when LaserBoy was still a Linux only thing.

    James.
    Last edited by james; 04-22-2013 at 16:59.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  8. #8
    Join Date
    Oct 2006
    Location
    Cleveland, Ohio
    Posts
    2,342

    Default

    For batch conversion, or video conversion I have used LaserCam Pro. Point it to a section of your desktop, and run a slideshow of the images you want to have converted, and viola, an ILDA containing all batch converted frames.

  9. #9
    swamidog's Avatar
    swamidog is online now Jr. Woodchuckington Janitor III, Esq.
    Join Date
    Nov 2006
    Location
    santa fe, nm
    Posts
    1,545,760

    Default

    yeah... laser cam is surprisingly awesome.



    Quote Originally Posted by drlava View Post
    For batch conversion, or video conversion I have used LaserCam Pro. Point it to a section of your desktop, and run a slideshow of the images you want to have converted, and viola, an ILDA containing all batch converted frames.
    suppose you're thinkin' about a plate o' shrimp. Suddenly someone'll say, like, plate, or shrimp, or plate o' shrimp out of the blue, no explanation. No point in lookin' for one, either. It's all part of a cosmic unconciousness.

  10. #10
    Join Date
    Mar 2011
    Location
    Chicago area, IL
    Posts
    222

    Default

    Thanks guys for the responses and information ! Now I'm off to look into this deeper.

    Jason

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •