Results 1 to 7 of 7

Thread: Browser based .ILD viewer for PhotonLexicon FTP collection (and others)

  1. #1
    Join Date
    May 2014
    Location
    Connecticut
    Posts
    701

    Default Browser based .ILD viewer for PhotonLexicon FTP collection (and others)

    Hello folks!

    While working on another project (SELEM 14 attendees know what I'm talking about, will post about it here very soon), I needed a way to wade through the thousands of ILDA files on the PL FTP site without downloading them all and loading them one-by-one into any number of the full-featured desktop laser programs available. You may have seen my posting in another thread about this recently. Well, I have completed this little side project and wanted to share it with the community.

    Here's the link if you want to jump right in: https://lexbrook.com/ildac/render/

    I have the entire PL FTP collection available for live preview in any browser, as well as the X-LASER Mercury GOBO library (thanks, Adam Raugh!). I've also loaded up the free ILDA files from Laser Graffiti (see: https://lasergraffiti.weebly.com/) and some test patterns if you need those.

    As you see, you can browse any of the collections, and instantly view the animated ILD file in the browser viewer. If you like the preview, you can download that one ILD file without needing to download the entire library. You can adjust the size and speed of the viewer window as well.

    There are A LOT of really cool and fun gems in those ILDA files you might not find otherwise. I've been having a blast going through these files.

    You can also upload your own ILD files to the viewer. NOTE: This only uploads the file to your browser-- this does not upload the file to the webserver or the online collection!

    Please let me know what you think. If you have or know of any other free ILD file collections to add to the site, please let me know, and I'd be happy to add them.

    This app was made possible by these two open-source projects as well as the sources for all the ILD files. THANK YOU!
    https://github.com/possan/ilda.js (I modified this repo to handle ILDA formats 4 and 5)
    https://github.com/vobruba-martin/jq...ax.arraybuffer (needed to convert binary files into ArrayBuffer format)

    -Hank
    Last edited by HankLloydRight; 09-07-2021 at 09:21.

  2. #2
    Join Date
    Jan 2006
    Location
    Charleston, SC
    Posts
    2,147,489,174

    Default

    That's pretty cool, Hank!

    I noticed that some of the files don't display though. I'm wondering if they might have been saved in one of the older ILDA formats? Some of the ones in the Alphalite folder, for example, just come up blank, and I noticed the same thing when I spot-checked a few other directories in the files from China section.

    Adam

  3. #3
    Join Date
    May 2014
    Location
    Connecticut
    Posts
    701

    Default

    Quote Originally Posted by buffo View Post
    That's pretty cool, Hank!

    I noticed that some of the files don't display though. I'm wondering if they might have been saved in one of the older ILDA formats? Some of the ones in the Alphalite folder, for example, just come up blank, and I noticed the same thing when I spot-checked a few other directories in the files from China section.

    Adam
    Yes, I noticed that too, I'm not sure exactly what's happening there, but those files do display normally on a projector.
    I just haven't had time to dive into the few files that don't render. But I will eventually. I'd say about 98% of the files do render properly.

  4. #4
    Join Date
    May 2014
    Location
    Connecticut
    Posts
    701

    Default

    Well, that was easy. Those files in the "Alphalite" directory that didn't render had invalid bytes in positions 5-7 which according to the ILDA spec, should all be set to x00. They weren't. So I set them to x00 and now they work fine in the renderer. Please let me know of any others like that you find, and I'll try to fix the files, they might have a similar error in the file headers.

    edit: They're still not perfect as they don't have the ending header with 0 records to denote the EOF, so they might not "loop" around correctly at this time.

    edit2: I found the source of the problem. In the possan/ilda.js render library, he's reading bytes 5 through 8 as a long integer for the format type. When he should be discarding those first three "reserved bytes and only reading byte 8 as a 8-bit int. I'll look into fixing that now so I don't have to manually fix the ILD files.

    edit3: Bug in repo fixed, the 3 reserved bytes are now ignored. I also added back a few files from that Alphalite collection that weren't working before.

    Also, if you hit on any other file that comes up blank, try clicking the "Show single points" link. The way the HTML canvas works it doesn't show single points very well, so I add a single pixel next to a single point so it's visible on the canvas. Many of the ILD files in the "China" collection are just single points, so enabling this option will allow them to appear on the render canvas.

    thanks.
    Last edited by HankLloydRight; 09-07-2021 at 09:39.

  5. #5
    Join Date
    Jan 2006
    Location
    Charleston, SC
    Posts
    2,147,489,174

    Default

    Ah... Much better! I see that many of the files that were not displayed were just long strings of individual points, so enabling the "show single points" setting worked perfectly.

    Have you noticed that some patterns that have long, straight lines are actually displayed with a little bit of variation in the line? Like in the "test pattern" folder, most of the outer border lines are being rendered as tiny sine waves rather than straight lines. Any idea why?

    Adam

  6. #6
    Join Date
    May 2014
    Location
    Connecticut
    Posts
    701

    Default

    Quote Originally Posted by buffo View Post
    Have you noticed that some patterns that have long, straight lines are actually displayed with a little bit of variation in the line? Like in the "test pattern" folder, most of the outer border lines are being rendered as tiny sine waves rather than straight lines. Any idea why?
    Yes! That's the opposite problem!! LOL. When the code detects a single point, it adds a pixel so it's visible. But on straight lines like that sometimes it adds a pixel when it shouldn't (it can only add a pixel horizontally or vertically,but with a single point, it's not easy to tell "direction"). So just turn "Show single points" off and the lines should straighten out. But I think I can fix that too now that I think about it.

    edit: Yeah, easy fix, I should have done this before. Now both types of ILD files will show properly. I removed the show/hide dots option. But if you see anything else strange, please let me know.
    Last edited by HankLloydRight; 09-07-2021 at 12:16.

  7. #7
    Join Date
    Jul 2008
    Posts
    565

    Default Great Job

    Excellent work, thanks for sharing!

    I really like the frame fadeout effect in the viewer.
    Once milk has been poured over corn flakes, the clock starts ticking.

Posting Permissions

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