Post-Processing

Grain

Grain adds film-like noise to the image, simulating the texture of analog film stock. This effect adds organic warmth and vintage character, breaking up smooth digital gradients and adding visual interest.

Example Configuration

grain.json
{
  "effect": {
    "postProcesses": [
      {
        "id": "pp_grain",
        "type": "grain",
        "enabled": true,
        "settings": {
          "intensity": 0.3,
          "size": 1.5,
          "speed": 1,
          "colorAmount": 0
        }
      }
    ]
  }
}

Settings

PropertyTypeRangeDefaultDescription
intensitynumber0-10.3Amount of grain noise
sizenumber1-31.5Grain particle size
speednumber0-21Animation speed (0 = static)
colorAmountnumber0-10Color grain vs monochrome (0 = mono)

How It Works

Film grain is caused by the random distribution of silver halide crystals in photographic film. This effect simulates that texture digitally.

  • Intensity controls how visible the grain is
  • Size affects the coarseness of the grain particles
  • Speed animates the grain for video (set to 0 for static images)
  • Color amount adds chromatic variation to simulate color film stock

Suggested Presets

StyleSettings
Subtle Textureintensity: 0.15, size: 1.0, colorAmount: 0
35mm Filmintensity: 0.3, size: 1.5, colorAmount: 0
Color Filmintensity: 0.4, size: 1.5, colorAmount: 0.1
Super 8intensity: 0.5, size: 2.5, speed: 1.5

API Usage

render-request.json
POST /api/v1/render
{
  "state": {
    "canvas": {
      "aspectRatio": "16:9",
      "backgroundColor": "#1a1a1a"
    },
    "layers": [...],
    "selectedLayerId": null,
    "effect": {
      "effectId": "dither-atkinson",
      "enabled": true,
      "postProcesses": [
        {
          "id": "pp_1",
          "type": "grain",
          "enabled": true,
          "settings": {
            "intensity": 0.4,
            "size": 1.5,
            "colorAmount": 0.1
          }
        }
      ]
    }
  },
  "format": "png",
  "width": 1920,
  "height": 1080
}

Tips

  • Start with low intensity (0.1-0.3) for natural-looking results
  • Combine with vignette for complete vintage film look
  • Larger size values simulate larger film formats
  • Use speed > 0 for video to avoid static patterns
  • Add colorAmount (0.05-0.15) for color film authenticity
  • Grain helps hide banding in gradients and smooth areas