Raster Editing Tools
Relevant source files
The following files were used as context for generating this wiki page:
- website/content/features.md
- website/content/blog/2024-07-31-graphite-progress-report-q2-2024.md
- website/content/volunteer/guide/student-projects/_index.md
- website/content/volunteer/guide/student-projects/completed-projects.md
- website/content/blog/2022-03-12-graphite-a-vision-for-the-future-of-2d-content-creation.md
- README.md
Raster editing in Graphite represents a paradigm shift from traditional destructive pixel manipulation to a nondestructive, procedural workflow. While Graphite began as a vector editor, it is evolving into a generalized graphics engine where raster tools interpret user interactive edits as modifications to an underlying node graph rather than permanent alterations to pixel data. This architecture allows raster operations—such as brush strokes, filters, and masks—to remain resolution-independent and infinitely adjustable.
The raster toolset is currently experimental and undergoing active development, with significant infrastructure improvements focused on GPU acceleration and raw image processing. The goal is to provide a familiar tool-centric experience, similar to traditional image editors, that seamlessly translates into a node-based compositor.
Sources: website/content/features.md, README.md, website/content/blog/2022-03-12-graphite-a-vision-for-the-future-of-2d-content-creation.md
Hybrid Editing Architecture
Graphite utilizes a unique hybrid workflow where interactive viewport tools manipulate a procedural node graph behind the scenes. In raster editing, this means that instead of storing a modified grid of pixels, the document stores a description of the editing operations.
Data Flow and Node Integration
The Graphene node engine executes these operations by defining artwork as procedural programs. For raster content, this involves converting graphical data (like vectors) into images or processing existing image data through various effect nodes.
The diagram shows how user interactions with raster tools flow through the message system to update the procedural node graph, eventually rendering through GPU-accelerated nodes.
Sources: website/content/features.md, website/content/blog/2024-07-31-graphite-progress-report-q2-2024.md, website/content/volunteer/guide/student-projects/completed-projects.md
Core Raster Features and Infrastructure
The raster toolset includes both established tools and ongoing infrastructure projects designed to support professional workflows.
| Feature/Component | Description | Status |
|---|---|---|
| Brush Tool | Parametric recording of brush strokes that can be restyled after the fact (e.g., pencil to acrylic). | Experimental |
| Rasterize Node | Converts graphical content (vector art) into an image at a chosen area and resolution scale. | Ongoing |
| Mask Mode | Reuses vector/raster tools to draw masks which become marquee (marching ants) selections. | Planned |
| GPU Acceleration | infrastructure for loading CPU node implementations into GPU shaders using Rust GPU. | Ongoing |
| Raw Decoding | Native Rust library (rawkit) for decoding Sony ARW and other raw camera formats. | In-Development |
Sources: website/content/blog/2024-07-31-graphite-progress-report-q2-2024.md, website/content/volunteer/guide/student-projects/_index.md, website/content/volunteer/guide/student-projects/completed-projects.md
Procedural Raster Operations
GPU-Accelerated Node Execution
To maintain performance with high-resolution images, Graphite is implementing a compile-time pipeline that converts Rust-based node implementations into GPU shaders. This allows per-pixel color adjustments and fragment shader effects to run natively on the GPU while maintaining identical algorithms with their CPU fallbacks.
This sequence illustrates the transformation of Rust node code into executable GPU shaders to power raster effects.
Sources: website/content/volunteer/guide/student-projects/completed-projects.md:14-25
Selection and Masking (Marquee)
A central part of the raster workflow is the implementation of a "Mask Mode." In this mode, users leverage existing vector tools (Rectangle, Ellipse, Pen) to define areas. Upon exiting the mode, these shapes are converted into a "marching ants" selection mask that constrains further raster manipulations.
Key Components:
- Marching Ants Shader: A visualization effect for the selection boundary.
- Integration: The selection mask integrates directly with the node graph to filter inputs for downstream nodes.
Sources: website/content/volunteer/guide/student-projects/_index.md:275-295
Future Roadmap for Raster Tools
The vision for Graphite's raster capabilities includes several high-level competencies aimed at matching industry standards:
- Image Processing: Advanced adjustment layers, filters, and effects integrated as nodes.
- Digital Painting: Procedurally styled brushes and history-based stamping.
- VFX Compositing: Multi-layer nondestructive blending and masking.
- Neural Tools: AI-powered tools such as "Magic Wand" for object segmentation (Segment Anything 2) and depth estimation.
Sources: website/content/features.md, website/content/volunteer/guide/student-projects/_index.md:162-175, website/content/blog/2022-03-12-graphite-a-vision-for-the-future-of-2d-content-creation.md
Summary
Raster editing in Graphite is fundamentally defined by its integration with the Graphene node engine. By treating raster operations as nondestructive parameters rather than static pixel data, Graphite enables a resolution-independent workflow that remains sharp at any scale. While current features like the Rasterize node and the rawkit decoder provide the foundation, ongoing work in GPU acceleration and Mask Mode will establish Graphite as a versatile tool for both vector and professional raster content creation.