Git Product home page Git Product logo

silicate's Introduction

Silicate - Procreate File Renderer

Cross-platform native viewer for .procreate files. There is a reference.procreate file in the base directory for users to try.

Downloads

  • Latest builds are available through CI here.
    • Download the release-{insert your OS here} zip and unpack to obtain the binary.
      • macOS users: You will need to unpack the zip and the dmg file to access the binary. You might also need to go to System Preferences and allow the application to run, since there is no code signing.

Features

  • Native desktop app for Windows, macOS, and Linux.
  • Load and view multiple .procreate files at once.
  • Export .procreate files to png, jpeg, tga, tiff, webp, bmp formats.
  • Change layer settings and live-preview the final result.
    • Currently supports blending modes, clipping masks, opacity, hiding, and groups.
  • Drag and drop loading.
  • GPU rendering, leveraging cross-platform wgpu integration.
    • Rotate and flip the canvas at orthogonal angles and orientations.
    • Rotate the view arbitrarily.
    • Smooth or pixelated sampling in the viewer.

Wishlist

The following features will probably be added sometime in the future.

  • Documentation.
  • More utilization of async mechanics.
  • Nicer and more robust UI.
  • PSD export.
  • PSD preview (limited).

Notes

Accuracy

The renderer produces slightly different results from the reference render by Procreate's engine. The compositor produces accurate blending results except for Saturation and Hue, both of which resembles Photoshop's blending style instead of the style used by Procreate.

Efficiency

The compositor is relatively modular, but it is completely written from scratch with no reference to existing research. If you are willing to contribute improvements to the existing design or design a completely new compositor, feel free to do so.

Procreate File Format

All .procreate files are standard ZIP files with the following structure.

- {UUID} [Folder]
  - Contains .chunk files, presumably the actual pixel canvas data for the document.
- QuickLook [Folder]
  - Thumbnail.png - Low-quality screenshot generated by Procreate.
- video [Folder]
  - segments [Folder]
    - segment-X.mp4, where X is a number starting from 1.
- Document.archive - NSKeyedArchive containing layer information along with other document information like canvas size.

NS Keyed Archive

This is Apple's format for serializing Objective-C/Swift instances. It is basically a giant dictionary containing 4 items:

  • version - Irrelevant
  • archiver - Irrelevant
  • top - Top-level structure of the instance.
    • In this case, we are interested in the SilicaDocument instance.
    • It contains a plethora of key-value pairs that will not be enumerated here. However, the structure is interesting. The key is a simple string, and the value is oftentimes an id index that points to an object in objects.
    • This object in objects is the true value of that key.
  • objects - The universe of values used in the archive.

Raster Canvas Data

Each layer in a Procreate file has a uuid associated with it. It's raw RGBA data is located under {uuid}/. The folder contain chunks with the naming convention {col}~{row}.chunk, which are tile_size * tile_size raw RGBA data that has been compressed with LZO. Recombine these chunks together to obtain the raw layer data.

  • It is important to note that the raw layer data is premultiplied RGBA.

Attribution

  • Silica Viewer Base code for understanding the Procreate format.
  • Prospect Another Procreate viewer, but only final composite. Supports timelapse playback.

silicate's People

Contributors

avarel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

silicate's Issues

no releases available

I would like to run this on Linux but I can't figure it out, I've never seen anything released like this before.  The CI you linked to redirects to https://github.com/Avarel/silicate/actions but don't see any release-{insert your OS here}.zip files.  If I click on "Update actions #17" it tells me things such as "release-x86_64-linux Expired".  Or if I click "Update submodule version #39" for v0.2.0 release i get told "The logs for this run have expired and are no longer available."  Please provide more instruction.  Thanks

Silicate crashes on files with many layers

Very cool project! I'm trying to use your compositor to automate exports of layer groups for my weird workflow, and finding that it crashes for the largest of my files (~1GB, 102 layers at 2732 x 2048px each) with the following error:

[src\compositor\dev.rs:52] adapter.get_info() = AdapterInfo {
    name: "AMD Radeon RX 6800 XT",
    vendor: 4098,
    device: 29631,
    device_type: DiscreteGpu,
    driver: "AMD proprietary driver",
    driver_info: "23.5.2 (AMD proprietary shader compiler)",
    backend: Vulkan,
}
[src\compositor\dev.rs:53] adapter.limits() = Limits {
    max_texture_dimension_1d: 16384,
    max_texture_dimension_2d: 16384,
    max_texture_dimension_3d: 8192,
    max_texture_array_layers: 8192,
    max_bind_groups: 8,
    max_bindings_per_bind_group: 640,
    max_dynamic_uniform_buffers_per_pipeline_layout: 8,
    max_dynamic_storage_buffers_per_pipeline_layout: 8,
    max_sampled_textures_per_shader_stage: 4294967295,
    max_samplers_per_shader_stage: 4294967295,
    max_storage_buffers_per_shader_stage: 4294967295,
    max_storage_textures_per_shader_stage: 4294967295,
    max_uniform_buffers_per_shader_stage: 4294967295,
    max_uniform_buffer_binding_size: 2147483648,
    max_storage_buffer_binding_size: 2147483648,
    max_vertex_buffers: 16,
    max_buffer_size: 18446744073709551615,
    max_vertex_attributes: 64,
    max_vertex_buffer_array_stride: 16383,
    min_uniform_buffer_offset_alignment: 32,
    min_storage_buffer_offset_alignment: 32,
    max_inter_stage_shader_components: 128,
    max_compute_workgroup_storage_size: 32768,
    max_compute_invocations_per_workgroup: 1024,
    max_compute_workgroup_size_x: 1024,
    max_compute_workgroup_size_y: 1024,
    max_compute_workgroup_size_z: 1024,
    max_compute_workgroups_per_dimension: 65535,
    max_push_constant_size: 128,
}
thread 'tokio-runtime-worker' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_texture
    Not enough memory left

', C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.3\src\backend\direct.rs:3019:5
stack backtrace:
   0:     0x7ff772d93bc1 - <unknown>
   1:     0x7ff772baf46b - <unknown>
   2:     0x7ff772d87639 - <unknown>
   3:     0x7ff772d95acb - <unknown>
   4:     0x7ff772d95899 - <unknown>
   5:     0x7ff772d9657b - <unknown>
   6:     0x7ff772d96025 - <unknown>
   7:     0x7ff772d95f79 - <unknown>
   8:     0x7ff772d95f64 - <unknown>
   9:     0x7ff77300b735 - <unknown>
  10:     0x7ff772dcbcec - <unknown>
  11:     0x7ff772dfd2de - <unknown>
  12:     0x7ff772e3c342 - <unknown>
  13:     0x7ff772ed6e29 - <unknown>
  14:     0x7ff772f4490d - <unknown>
  15:     0x7ff772b7086a - <unknown>
  16:     0x7ff772b23a40 - <unknown>
  17:     0x7ff772da0797 - <unknown>
  18:     0x7ff772da054d - <unknown>
  19:     0x7ff772d9333b - <unknown>
  20:     0x7ffa755f7614 - BaseThreadInitThunk
  21:     0x7ffa76ea26b1 - RtlUserThreadStart

I'm running the exe from the latest master build for windows with RUST_BACKTRACE=full. It sounds like the canvas data is being loaded into vmem and the representation used is punching through the available memory. Am new to rust but happy to dig into it if you've got pointers where to start.

Please add PSD export asap!!

Please add PSD export asap!! without it this gem of a tool is not as uselful. sorry new here , dont knw where to add a reqeuest on github.
thankyou for this.
eagerly waiting.

Opening files directly from file explorer in linux

Okay so this is a bit convoluted but I figured it doesn't hurt to at least bring it up.
I'm testing Silicate on linux right now using a build based on b1d18bd (v0.2.1) and it works pretty well so far. The reason I'm using a build based on that commit is it looks like it's the latest one that will successfully compile a linux executable, and I didn't want to put a ton of time into troubleshooting the code just to see if it would even work.

I've created a custom MIME type for .procreate files so the file association points to silicate, it looks like this:

/usr/share/mime/packages/application-x-procreate.xml

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="application/procreate">
    <comment>Procreate Art project files</comment>
    <glob pattern="*.procreate"/>
  </mime-type>
</mime-info>

/usr/share/applications/silicate.desktop

[Desktop Entry]
Version=2.1.0
Type=Application
Name=Silicate
GenericName=Procreate Viewer
Comment=View and explore .procreate files
Keywords=Procreate;illustration;art;images;painting;
Exec=silicate
Icon=silicate
MimeType=application/procreate

Opening a .procreate file through gnome's file explorer Nautilus now opens Silicate, so the file association is working, the problem is this doesn't open the file itself, it only opens the app as if it was launched by itself (so I still have to pick the file from Silicate's "Load Procreate File" dialog).

I don't know if this functionality even exists in Silicate, or if I've done something wrong. If the former, I guess this can be seen as a feature request, if the latter, some assistance would be greatly appreciated. Thank you for making this by the way, it's an absolute lifesaver for me!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.