tommyettinger / MultiTileBlueNoise

Storage for blue noise textures, including mixed-tiling textures, in results/
MIT License
17 stars 1 forks source link

excuse me: what else should i do besides using a voidAndCluster mask to change an image into a halftoned one? #1

Closed audo23 closed 1 year ago

audo23 commented 1 year ago

excuse me: what else show i do besides using a voidAndCluster mask to change an image into a halftoned one? I mean, compared with the classical blue noise dithering method,, or is there any demo code that shows how to change an image into halftoned one using voidAndCluster method? thanks.

tommyettinger commented 1 year ago

I think I answered this in a different venue, but Void and Cluster generates a blue noise texture and is normally not done at runtime because it takes a long time for large textures. Halftoning can use a blue noise texture, or the R2 sequence, or interleaved gradient noise, or various other techniques, but doesn't specifically involve Void and Cluster. I might write a quick piece of halftoning code in one of my other repos; I will link it here when it's ready.

tommyettinger commented 1 year ago

Here's a build of the halftoner app, which should be runnable if you have Java installed just by unzipping the file and running the JAR. Halftoner.zip It loads the cat picture in the same folder and produces this: Roar-BW-halftone

The sources are here: https://github.com/tommyettinger/ditherator/blob/main/core/src/main/java/com/github/tommyettinger/Halftoner.java I'm still updating them a bit, but they should be clear enough (except for the Java NIO ByteBuffer code, that's never that clear... but it is fast.)

I'm closing this now, I hope this has answered your question. The ditherator repo also has issues that may be a better place for this.

tommyettinger commented 1 year ago

Just to folllow up, you might want to prefer the files with "Tri" in results, since they change the appearance of halftoning a lot. Here's with the 1024x1024 "standard" blue noise texture: https://i.imgur.com/adlnLMO.png , and here's with the 1024x1024 "tri" texture: https://i.imgur.com/srtajJL.png .