Skip to content

Repository files navigation

CAMO - Procedural Camouflage & Texture Generator

Try the Live Demo

Real-time procedural camouflage and texture generator with two implementations:

  1. Web App (index.html) - Browser-based real-time generator with interactive controls
  2. DaVinci Resolve Fusion Fuse (MARPATCamo.fuse) - Native Fusion plugin for video production

Both generate MARPAT-style digital camouflage, MultiCam-style organic patterns, and a wide range of artistic texture presets using fractal Brownian motion (fBm) over simplex noise.

Screenshot

https://github.com/ecsplendid/CAMO/raw/main/demo.mp4

Demo: Web app (first half) followed by DaVinci Resolve Fusion integration (second half)


Web App

Quick Start

Open index.html in any modern browser. No dependencies, no build step.

Features

  • Real-time rendering at 60-120fps using Canvas 2D with Uint32Array pixel writes
  • 20+ presets spanning military camouflage, cinematic textures, and artistic palettes
  • Two rendering modes:
    • Digital (MARPAT) - Pixelated rectangular cells with hard color thresholds
    • Organic (MultiCam) - 3-layer architecture with smooth gradient blending, organic blobs, and micro-texture
  • Zoom & pan - Scroll to zoom (toward cursor), drag to pan. Wobble-free integer screen-space grid mapping
  • Animation - Directional scrolling with speed/direction controls
  • Seethe - Cyclical in-place pattern evolution via domain warping (no translation). Threshold shifting creates organic "breathing" motion
  • Screen Pixels mode - Pixel size stays constant on screen regardless of zoom
  • Effects - Static domain warp, contrast adjustment, color inversion
  • Per-color controls - Individual color pickers and weight sliders for each palette color
  • Export - Save current view as PNG or generate a 512x512 tile

Controls

SectionControlDescription
PresetButtons20+ presets: Woodland, Desert, Snow, Urban, Tiger Stripe, Flecktarn, CADPAT, Night, MultiCam, MC Arid, MC Tropic, Cyberpunk, Autumn, Ocean, Lava, Pastel, Film Grain, Noir, Smoke, Parchment, Moss, Concrete, Dusk, MLST
PatternPixel SizeSize of each pattern cell (1-16)
ScaleNoise frequency - lower = larger features
Detail (Octaves)Noise detail levels (1-8)
LacunarityFrequency multiplier between octaves
PersistenceAmplitude decay between octaves
Pixel AspectWidth/height ratio of pattern cells
Screen PixelsWhen checked, pixel size is constant on screen regardless of zoom
EffectsWarpStatic fbm domain warping intensity (0-5)
ContrastNoise contrast before color mapping (0.5-2.0)
InvertFlip the noise value
ColorsColor pickersPer-color hex value and weight
Threshold SpreadSpread of color band boundaries
AnimationAnimate OffsetEnable directional scrolling
SpeedScroll speed
DirectionScroll angle (0-359 degrees)
SeetheEnable cyclical in-place pattern evolution
Seethe SpeedEvolution rate
Seethe AmountEvolution intensity
Noise SeedSeedNoise permutation seed (0-999)

Performance Optimizations

  • Zoom-adaptive coarsening - Grid cells merge when sub-pixel, maintaining consistent performance at any zoom level
  • Coarse gradient grid - MultiCam background gradient computed at 1/8 resolution with bilinear interpolation
  • Reduced octaves at zoom-out - Detail noise octaves decrease when zoomed out (invisible detail is not computed)
  • Uint32Array pixel writes - 4x fewer array operations vs byte-by-byte writes
  • Integer screen-space mapping - Eliminates floating-point wobble artifacts during animation
  • Grid-cell noise caching - Noise computed once per grid cell, not per screen pixel

DaVinci Resolve Fusion Fuse

Installation

  1. Copy the fuse file to the Fusion Fuses directory:

    macOS:

    cp MARPATCamo.fuse ~/Library/Application\ Support/Blackmagic\ Design/DaVinci\ Resolve/Fusion/Fuses/

    Windows:

    Copy MARPATCamo.fuse to:
    %AppData%\Blackmagic Design\DaVinci Resolve\Support\Fusion\Fuses\
    

    Linux:

    cp MARPATCamo.fuse ~/.fusion/BlackmagicDesign/DaVinci\ Resolve/Fusion/Fuses/
  2. Restart DaVinci Resolve

  3. In the Fusion page, right-click the node editor and select Add Tool > Generator > MARPAT Camo

Performance Note

The Fusion Fuse uses Lua-based CPU rendering (per-pixel SetPixel loops). Performance is highly dependent on Pixel Size:

  • Pixel Size 8+: Smooth interactive preview at 1080p
  • Pixel Size 4-6: Usable for preview, slight lag
  • Pixel Size 1-3: Slow for interactive work, best reserved for final render
  • Organic (MultiCam) mode: More computationally intensive than Digital mode due to 3-layer blending and additional noise evaluations

For interactive editing, work at a higher pixel size and reduce it for the final render. Frame caching means static frames render only once.

The web app achieves significantly better performance because it uses optimized JavaScript with Uint32Array writes and runs in the browser's highly optimized Canvas pipeline.

Fuse Features

  • 21 presets: Woodland, Desert, Snow, Urban, Night, Noir, Smoke, Parchment, Moss, Concrete, Dusk, Cyberpunk, Autumn, Ocean, Lava, Pastel, Film Grain, MultiCam, MC Arid, MC Tropic, MLST, Custom
  • Two rendering modes: Digital (MARPAT) and Organic (MultiCam)
  • 6 color pickers with weights - All presets prefill the pickers; customize any color after selecting a preset
  • All parameters keyframeable - Animate any parameter over time in the Fusion spline editor
  • Seethe animation - Keyframe the Seethe control linearly for continuous in-place pattern evolution. The value acts as a rate: constant value = continuous evolution, 0 = frozen
  • X/Y/Z Offsets - Translate the pattern (keyframe for scrolling animation). Z offset morphs through 3D noise space
  • Zoom - Scale the pattern view
  • Warp - Static fbm domain warping for organic flowing shapes
  • Contrast - Sharpen or soften color transitions
  • Invert - Flip the noise mapping
  • Frame caching - Automatically skips re-rendering when no parameters have changed between frames
  • Grid-cell caching - Noise computed per grid cell, not per pixel (significant speedup)
  • Coarse gradient grid - Organic mode computes background at 1/16 resolution with bilinear interpolation

Fuse Parameters

ParameterTypeDefaultDescription
PresetDropdownWoodlandSelect from 21 built-in presets or Custom
ModeDropdownDigitalDigital (MARPAT) or Organic (MultiCam)
Pixel SizeSlider (1-32)4Pattern cell size in pixels
ScaleSlider (0.1-50)5.0Noise frequency
OctavesSlider (1-8)4Noise detail levels
LacunaritySlider (1-4)2.0Frequency multiplier
PersistenceSlider (0-1)0.5Amplitude decay
Pattern AspectSlider (0.5-3)1.5Cell width/height ratio
SeedSlider (0-999)42Noise seed
X OffsetScrew0Horizontal translation (keyframeable)
Y OffsetScrew0Vertical translation (keyframeable)
Z OffsetScrew03D noise depth (keyframeable)
ZoomSlider (0.01-10)1.0Pattern scale
SeetheScrew0Animation rate - keyframe linearly for evolution
Seethe AmountSlider (0-5)1.0Seethe intensity
WarpSlider (0-5)0Static domain warping
ContrastSlider (0.5-2)1.0Color band sharpness
InvertCheckboxOffFlip noise values
Colors 1-6Color pickersPreset-dependentRGBA color values
Weights 1-6Sliders (0-1)Preset-dependentColor band proportions

Usage Tips

  • Animating the pattern: Keyframe X/Y Offset for scrolling, or keyframe Seethe for in-place evolution
  • Best performance: Use Pixel Size 4+ for interactive preview; reduce for final render
  • Color matching: Colors are written in the project's working color space. If colors look different in Edit vs Fusion, ensure your project's Color Space settings are consistent
  • Organic mode: More computationally intensive due to 3-layer blending. Use larger pixel sizes for interactive work
  • Custom colors: Select any preset to load its palette into the color pickers, then modify individual colors

Technical Details

Pattern Generation Algorithm

Both implementations use the same core algorithm:

  1. Simplex noise with seeded permutation tables for deterministic output
  2. Fractal Brownian motion (fBm) - Multiple octaves of noise summed with decreasing amplitude and increasing frequency
  3. Dual noise layers - Primary noise for large-scale structure, secondary noise at 2.7x frequency for additional detail
  4. Color quantization - Noise values mapped to discrete color bands via weighted cumulative thresholds

MultiCam 3-Layer Architecture

Based on research into Crye Precision's MultiCam design and the Dutch NFP fractal method:

  1. Background gradient (Layer 1) - Very low-frequency noise (0.15x scale) creates smooth regional color transitions. Two adjacent palette colors are interpolated based on noise value, creating the "color-shifting" effect that makes MultiCam appear to change hue regionally
  2. Mid-frequency organic blobs (Layer 2) - Standard fBm noise provides macro-scale disruption shapes. Composited onto the gradient with variable opacity: hard edges deep inside color bands, fading edges near thresholds
  3. High-frequency micro-texture (Layer 3) - Fine-grain detail from the secondary noise layer. Adds subtle per-channel RGB variation for close-range disruption

Seethe Implementation

Unlike simple translation, seethe creates cyclical in-place evolution:

  • Domain warping: sin(position + phase) and cos(position + phase * 0.7) distort noise coordinates in a position-dependent way. Each cell gets a unique warp, so the pattern morphs organically without sliding
  • Threshold shifting: Sinusoidal modulation of color band boundaries causes colors to ebb and flow cyclically
  • No scale modulation: Pattern scale remains constant (no zoom/breathing)

Color Presets

CategoryPresets
MilitaryWoodland, Desert, Snow, Urban, Night, Tiger Stripe, Flecktarn, CADPAT
MultiCamMultiCam (standard), MC Arid, MC Tropic
CinematicNoir, Smoke, Dusk, Film Grain, Parchment
NaturalMoss, Concrete, Autumn, Ocean
ArtisticCyberpunk, Lava, Pastel
BrandMLST (Machine Learning Street Talk - navy/gold)

License

MIT License. See LICENSE for details.

Credits

Built with procedural noise generation techniques. MultiCam-style rendering inspired by published research on the Dutch NFP fractal method and Project Chameleon algorithm.

About

Procedural camouflage & texture generator - Web app + DaVinci Resolve Fusion plugin. MARPAT, MultiCam, and 20+ artistic presets with real-time rendering.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages