Post-Processing

Light Beams

Light Beams creates volumetric god ray effects, simulating light streaming through atmosphere. Bright areas emit rays that radiate from a configurable light source position.

Example Configuration

light-beams.json
{
  "effect": {
    "postProcesses": [
      {
        "id": "pp_beams",
        "type": "light-beams",
        "enabled": true,
        "settings": {
          "lightX": 0.5,
          "lightY": 0.5,
          "exposure": 0.3,
          "decay": 0.96,
          "density": 1,
          "intensity": 1
        }
      }
    ]
  }
}

Settings

PropertyTypeRangeDefaultDescription
lightXnumber0-10.5Light source X position
lightYnumber0-10.5Light source Y position
exposurenumber0-10.3Ray brightness
decaynumber0.9-10.96Ray falloff rate
densitynumber0.5-21Ray density/spread
weightnumber0-10.5Sample weight
samplesnumber10-10050Quality (more = smoother)
thresholdnumber0-10.5Brightness threshold for rays
intensitynumber0-21Overall effect intensity
animatedboolean-falseEnable particle animation
particleAmountnumber0-10.3Particle density
particleSpeednumber0-20.5Particle movement speed
particleSizenumber0.5-31Base particle size

Suggested Presets

StyleSettings
SunburstlightX: 0.5, lightY: 0.2, exposure: 0.4, intensity: 1.2
Window LightlightX: 0.8, lightY: 0.3, exposure: 0.3, decay: 0.94
Dramaticexposure: 0.5, intensity: 1.5, threshold: 0.3, samples: 80
Dusty Raysanimated: true, particleAmount: 0.5, particleSpeed: 0.3

API Usage

render-request.json
POST /api/v1/render
{
  "state": {
    "canvas": {
      "aspectRatio": "16:9",
      "backgroundColor": "#1a1a1a"
    },
    "layers": [...],
    "selectedLayerId": null,
    "effect": {
      "effectId": "none",
      "enabled": true,
      "postProcesses": [
        {
          "id": "pp_1",
          "type": "light-beams",
          "enabled": true,
          "settings": {
            "lightX": 0.3,
            "lightY": 0.2,
            "exposure": 0.4,
            "threshold": 0.4,
            "intensity": 1.2,
            "samples": 60
          }
        }
      ]
    }
  },
  "format": "png",
  "width": 1920,
  "height": 1080
}

Tips

  • Position light source where bright areas exist in the image
  • Higher samples = smoother rays but more processing
  • Lower threshold creates rays from dimmer areas
  • Enable particles for atmospheric dust/fog effect
  • Works great with high contrast images