0.0.8 • Published 4 years ago

bluegen v0.0.8

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

Stochastic Screen Generator (for printing, stippling, etc)

Click here to try it out

This little web app generates stochastic (blue noise) screens for digital halftoning/stippling. It has four methods:

  • Void-and-cluster: A classic, this one works best for generating stochastic screens for printers.

  • Dart: Classic, progressive dart throwing. Generates the highest quality masks.

  • SPH: SPH fluid method. Not quite as good as dart, and a bit harder to control. Is much slower at higher resolutions.

  • Jitter: A very simple randomlized hexagonal grid method. Randomizes the hiearhcial levels, not the point positions. Mostly for reference purposes. Produces the worst results.

  • AA: AA patterns, optimized to have blue noise properties via the SPH method. Based on papers by Abdalla G. M. Ahmed, but modified to use skewed grids and a dynamic threshold limit instead of a fixed one.

Usage

Load bluenoise9.html in a web browser. Press "Start Generating".

example image

What are AA Patterns?

example image

AA Patterns, invented by Abdalla G. M. Ahmed, are generated by intersecting the vertices of one grid with (half of) the cells of another. The resulting patterns are highly controllable; they can be aperiodic, or they can periodic to within a certain interval.

My innovation here is progressive sampling (used for halftone/stippling, importance sampling in ray tracers, etc).

I get the best progressive sampling I can by skewing the grid, and then I apply an SPH fluid method (a simplified version of the SPH mode, actually).

The SPH method works by building a hiearchy of fluids. Each fluid level can "see" levels that are coarser than it is, but not ones that are more dense. This was my first attempt, and later I also tried the Weighted Sample Removal paper, but then it dawned on me that the SPH method works in basically the same way, but works better with AA patterns.

Using with Blue Noise Stippler

To test the generated masks, you can use this stippling app of mine. Here's a direct link to the app itself.

Click on the "Save To Cache" button on the lower-right side of the screen. You should see a message like "saving blue noise mask to local storage." You should be able to use the new mask in the stippling app.

FFT

The FFT power spectrum feature is ported from PSA. I recommend using it with "dimensions" set to 50 or less (I usually use 32).

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago