Feature: Simplex Noise Generator

Authored by eoinoneill on Mar 5 2019, 10:05 PM.


Group Reviewers

Using a fill layer, you can now generate a simplex gradient noise texture. This noise can be looped seamlessly, distorted in two dimensions, and given a string of text to use as an optional custom seed value.

This new generator plugin makes use of a C port of Kurt Spencer's permissive, open source, and patent-free OpenSimplex noise implementation.

If no custom seed string is given, a seed number will be chosen randomly.

In order to achieve seamless looping without distortion we generate noise in 4-dimensions, and sample each pixel from a toroidal (doughnut-shaped) pattern. In order to keep the look of the noise consistent between looping and non-looping modes, both are sampled from 4-dimensions. (This doughnut-shape in a cloud of noise is a bit easier to imagine in 3-dimensions, but creates obvious distortion issues, and so a fourth dimension is necessary.)

Patch by Eoin and Emmet O'Neill.

Test Plan

Try it out.

  • Add a new fill layer, setting mode to "Simplex Noise".
  • Turn on canvas wrap-around mode.
  • Test looping vs non-looping noise.
  • Test X and Y distortion.
  • Try a few optional custom seed strings.

Note: As of now, in order to see changes to the generator while tweaking values you have to create the fill layer first, then open the layer properties and tweak the values. This is consistent with old behavior but should probably be improved in a future patch.

Diff Detail

R37 Krita
Lint Skipped
Unit Tests Skipped
eoinoneill created this revision.Mar 5 2019, 10:05 PM
Restricted Application added a reviewer: Krita. · View Herald TranscriptMar 5 2019, 10:05 PM
Restricted Application edited projects, added Krita; removed Krita: Abyss. · View Herald Transcript
eoinoneill requested review of this revision.Mar 5 2019, 10:05 PM
eoinoneill edited the summary of this revision. (Show Details)
rempt added a comment.Mar 5 2019, 10:11 PM

Cool! Wolthera is building it now, I just had a note about the license. It looks like it should look, though...


This, for consistencies sake, probably should be in simplexnoise/3rdparty/c-open-simplex. We also need to have a copy of the LICENSE file in the original repo.

woltherav accepted this revision.Mar 5 2019, 10:15 PM
woltherav added a subscriber: woltherav.

I can confirm it

  • builds
  • can be created
  • is editable.
  • can be saved and loaded with all values set to nonstandard values.

If you fix the location of the files, this can be pushed :)

This revision is now accepted and ready to land.Mar 5 2019, 10:15 PM

Cool. We'll sort out the dependency and license stuff and push it.

Thanks Boud and Wolthera.

eoinoneill closed this revision.Mar 6 2019, 12:41 AM

Pushed, closing now. Thanks.