Skip to content

Add the generators Gradient, Stripes, Waves and Noise (#104) - #707

Merged
sofian merged 11 commits into
devfrom
feat-104-visual-generators
Dec 4, 2026
Merged

sofian merged 11 commits into
devfrom
feat-104-visual-generators

Conversation

@sofian

@sofian sofian commented Dec 4, 2026

Copy link
Copy Markdown
Member

Summary

Four new generators in File > Add Generator, drawn by the graphics card from ISF files, after Checker, Grid, Color and Color Wheel:

  • Gradient: two or three colours, linear, radial, conic or diamond, with an angle, a centre, repeats, a mirror and a hardness that goes from a smooth blend to plain bands. The blend is dithered, so that it shows no steps.
  • Stripes: stripes of two colours, a count, an angle, a width and a softness in pixels.
  • Waves: waves of two colours, in straight lines or in rings around a centre, from a soft sine to sharp bands.
  • Noise: smooth clouds (simplex noise in layers), cells (Worley) or a plasma, between two colours, with a scale, a detail (1 to 6 layers) and a seed.

Each of them blends its colours as Blend says: RGB, in a straight line; Hue, through the hues the shorter way round the colour wheel; Rainbow, the longer way round, all the hues when both colours have the same. The hues go through OKLab (Björn Ottosson, MIT License), so that the lightness stays even.

All of them move as soon as they are added, at 6 per minute: repeats, pairs of stripes or waves that go by in a minute, or cycles of the noise. This default is provisional, to be confirmed by the people who run the workshops. The speed is a new unit, per minute ("/min"), also given to the flow of Color Wheel. The motion comes from the animator of ISF, a fraction of a cycle that wraps around: it never jumps when the speed changes, and keeps its precision however long MapMap runs, which matters on the Raspberry Pi.

Also:

  • Color comes before Color Wheel in the menu: Checker, Grid and Color to fit shapes to surfaces, then the patterns.
  • Color Wheel folds its Radial Color and Animation groups at first, with GROUPS.
  • Gradient (linear and radial), Stripes and the Smooth and Cells kinds of Noise start from the ISF files of VIDVOX and Carter Rosenberg (MIT License) and the simplex noise of Ashima Arts and Stefan Gustavson (MIT License), credited in each CREDIT and in resources/shaders/CREDITS.md. Waves, the conic and diamond gradients and the plasma are new.
  • French and Spanish translations of the new texts; the Spanish has not been read by a Spanish speaker yet. The texts of the effects of Add five basic effects, levels and a mix to every effect #700 were collected but are not translated yet.

Slice: Générateurs visuels (#104).

Demo

  1. File > Add Generator: Checker, Grid, Color, Color Wheel, Gradient, Stripes, Waves, Noise.
  2. Add Gradient: a black and white gradient going by. In the Media tab, choose Conic, tick Three Colors, raise Hardness to 100 %: three plain sectors turning.
  3. Add Stripes, set the Angle to 45° and the Width to 20 %; change the Speed while it moves: no jump.
  4. Add Waves, choose Rings, drag the centre: rings go out from it; Reverse brings them in.
  5. Add Noise, try Smooth, Cells and Plasma; change the Seed: another pattern. Set Color A and Color B to the same red and choose Blend > Rainbow: all the hues.
  6. Save, close, reopen: every setting is back.

Tests

  • make check on Ubuntu (offscreen): 724 tests pass, every commit builds and passes alone. New: pixel tests of each generator (shapes, colours, hardness with two and three colours, sharpness, rings at equal distances, seed, the three blends), the motion of stripes when the speed changes, the round trip of a project with the four generators (tests/fixtures/patterns.mmp), the unit per minute, the menu order and the folded groups of Color Wheel.

  • Tried in MapMap on Ubuntu, in English and in French (screenshots below).

  • Time to draw one image, --frame-stats-sync, Ubuntu, Intel Core Ultra 9 275HX with its integrated graphics (Mesa 26), median over 20 s:

    Generator 1024 × 1024 2048 × 2048
    Gradient 0.93 ms 1.11 ms
    Gradient, conic, three colours 0.98 ms 1.19 ms
    Stripes 0.80 ms 1.02 ms
    Waves, rings 0.93 ms 1.13 ms
    Noise, smooth, detail 3 3.01 ms 3.61 ms
    Noise, smooth, detail 6 4.33 ms 5.88 ms
    Noise, cells 1.66 ms 2.25 ms
    Noise, plasma, detail 3 0.87 ms 1.07 ms
    Noise, plasma, detail 6 1.57 ms 1.56 ms
    Color Wheel, for comparison 2.37 ms 3.41 ms

    Blending through the hues costs more, at 2048 × 2048: Gradient (Hue) 2.97 ms, Stripes (Rainbow) 2.71 ms, Waves (Rainbow) 3.17 ms, Noise smooth (Rainbow) 7.44 ms.

  • Not measured: macOS and the Raspberry Pi. @aalex, could you run the same measure on the Mac (--frame-stats-sync, with the project attached)?

@sofian sofian added this to the 1.0 milestone Dec 4, 2026
@sofian sofian self-assigned this Dec 4, 2026
@sofian
sofian requested a review from aalex December 4, 2026 17:01
@sofian

sofian commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

Screenshots on Ubuntu, with this branch.

File > Add Generator: Color comes before Color Wheel, then the four new generators.

addgen

The four generators with their default settings, black and white: Gradient, Stripes, Waves and Noise.

main

Blend: Gradient (Hue), Stripes and Waves (Rainbow), and Noise with both colours the same red and Blend set to Rainbow, with its panel.

blend-view

In French: the panels of Waves and Gradient.

fr-panels2

@sofian
sofian merged commit 8cc3643 into dev Dec 4, 2026
5 of 6 checks passed
@sofian
sofian deleted the feat-104-visual-generators branch December 4, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants