Zip format import

Guest 2020-2-1 2517

I want to print my own procedurally generated volumetric models using chitubox. Rather than converting and exporting these models to STL or some surface mesh, it makes much more sense for me to feed these models as volumetric data to chitubox directly.

The first thing that comes to mind is simply saving my volume model as a set of PNGs in the ZIP file format, importing those into chitubox, and then saving to a sliced format of choice appropriate for the printer. To facilitate that, I imagine first saving a ZIP file with the right dimensions, compatible gcode, and all.


However, I see quite a few threads here about issues with importing zip files, even the ones generated by chitubox itself. Is there a specification somewhere, outlining what it takes to generate a valid chitubox ZIP file?


Or would there be a better way to implement such a workflow altogether? Perhaps using another format than the ZIP files?

And is it even true that chitubox can convert from a ZIP format to any other supported export format? Or does chitubox fundamentally require a surface mesh as an input, in order to be able to build up all the internal state to run all file export logic?

New Post (9)
  • Guest 2020-2-1
    Quote 2Floor
    Small update; as reported by another user, unzipping and rezipping the folder, without any modification, on the latest OSX, does not result in a recognized file. I imagine this is some small issue like a flag set on the zip file; but it would be nice to know what it is exactly.

    Re-opening the original zip file is awefully slow; it seems to try and do a volumetric render in the absence of mesh data, which drags down your computer, it seems like. Either way, when I managed to get a response from the save button, I do not get to choose an extension. So I am not sure what the point of opening a ZIP file is at all.

    As I understand, the Longer Orange supports converting chitubox ZIP format to their native format; perhaps I should pick up one of those and see if that workflow pans out?
  • Guest 2020-2-1
    Quote 3Floor

    In trying longer , I have to enable AA, otherwise Longer outputs empty files without error. With 8x AA, I do get an output; though I cannot test it as I dont own a longer printer.

    Same problem remains though; an unzipped and rezipped folder, without any editing, is not recognized as a valid file by Longer, just as Chitu itself rejects it.

    I tried some things like excluding OSX hidden folders from the zip and so on, but it makes no difference. Anyone knows what this missing ingredient is that makes a valid Chitu ZIP file?

  • Guest 2020-2-1
    Quote 4Floor

    Tried editing the chitu zipfile programatically in python, and this seems to work fine, as far as Longer is concerned. The following edits, both impacting the structure of the ZIP file (swapping two files), as well as generating novel PNG data (inverting colors), results in no problems.

    That is, on the software side; it remains to be seen how the printer feels about it. Time to buy a Longer Orange I suppose!

    import zipfile
    import imageio
    import io
    path = r'chitu.zip'
    with zipfile.ZipFile(path, mode='a') as zf:
        i1 = zf.read('1.png')
        i10 = zf.read('10.png')
        img = imageio.imread(i1, '.png')
        stream = io.BytesIO()
        i1 = imageio.imwrite(stream, 255 - img, format='.png')
        zf.writestr('10.png', stream.getvalue())
        zf.writestr('1.png', i10)

  • Guest 2020-2-1
    Quote 5Floor
    ...except that the Longer Orange does not seem to support AA; which was on my list of desired features... it does not say it does NOT support AA; so maybe its just on by default?

    Damn; ive looked at all other MSLA printers, and so far I have not found any other printers that would conveniently support cramming my volume data into their file formats. Am I missing something? Any other pieces of software that will import chitubox ZIP files?
  • CHITUBOX 2020-2-8
    Quote 6Floor
    Guest ...except that the Longer Orange does not seem to support AA; which was on my list of desired featur ...
    Hi,you can use format plugin
    https://drive.google.com/drive/folders/1zK2PgGpJY6x_HFpZTrEBOP0LPMdSY97q?fbclid=IwAR2XyvSs_jCWwqXymOh9ZEvcuyKNuj-ibnmbLAmfOsZMWzjJdke71kxANwQ
  • CHITUBOX 2020-2-8
    Quote 7Floor
    Guest ...except that the Longer Orange does not seem to support AA; which was on my list of desired featur ...
    Hello, the import and export efficiency of the ZIP format is very low, so we used a new intermediate format .gf. This year, a developer document will be released on the official website. At that time, users can develop plug-ins to generate the desired format.
  • 2020-3-20
    Quote 8Floor
    I'm in the same situation and want to import a bunch of PNGs that I generated via irmf.io.

    I just discovered this: https://github.com/Photonsters/PhotonFileValidator/issues/47 which sounds like I could write a ZIP file in the SL1 format then run it through the converter to generate a .photon format file, then import that into ChiTuBox.
  • 2020-3-20
    Quote 9Floor
    Update: I found a whole bunch of file conversion tools here: https://github.com/Photonsters/anycubic-photon-docs#photon-file-image-format
  • Guest 2020-5-25
    Quote 10Floor
    I have tried to replace the pngs in the archive without extraction. But any alteration I make makes the zip invalid. It would be great to have the ability to import images generated elsewhere, be it by a zip file or folder.