Skip to content

Interactive 2D wave optics simulator. Turn any image into a refractive scene, add sources, watch waves refract, diffract and interfere. Probes, intensity maps, video export.

C#

The manual compares the memory of the three preview tiers and says dithering needs 16-bit samples

Alexander Graef646bcd1d9373
diff --git a/MANUAL.md b/MANUAL.md
index fbf9d24..427b978 100644
--- a/MANUAL.md
+++ b/MANUAL.md
@@ -212,11 +212,13 @@ The View menu. Its settings belong to the program, not to the project, and are k
4. **Language**: System, English, Deutsch, Français or Nederlands; the program switches at once.
5. **Preview resolution**: Full, Half or Quarter: the preview's run computes the canvas at a reduced size, faster and with less memory, for a weaker machine. An export always uses the full size.
6. **Preview frames**: Full, every second or every fourth frame kept by the preview's run; the timeline does not change.
-7. **Preview samples**: 16-bit float keeps the full values, so the brightness can be changed after a run and every level of a gradient shows; 8-bit palette index stores each pixel as its colour at the brightness of the run's start, half the memory, and a brightness change then needs a new run, which starts by itself.
-8. **Preview dithering**: With 16-bit samples, the pictures can be dithered as if the screen had 10, 12, 14 or 16 bits per channel, which hides the banding of dark gradients; on screen only, never in an export. Off by default, except on a machine with plenty of memory (see below).
+7. **Preview samples**: 16-bit float keeps the full values, so the brightness can be changed after a run and every level of a gradient shows; 8-bit palette index stores each pixel as its colour at the brightness of the run's start, half the memory, and a brightness change then needs a new run, which starts by itself; the preview dithering is not available with 8-bit samples.
+8. **Preview dithering**: With 16-bit samples, the pictures can be dithered as if the screen had 10, 12, 14 or 16 bits per channel, which hides the banding of dark gradients; on screen only, never in an export. This option is not available with 8-bit samples, which have nothing finer to dither. Off by default, except on a machine with plenty of memory (see below).
On its first start the program chooses the preview resolution, the preview frames, the preview samples and the dithering for the machine it runs on, once, and the View menu shows the choice. A machine with 32 GB of memory or more starts with 16-bit samples, dithered to 16 bits. A machine with less than 16 GB, with a hard disk under the cache file, without an OpenCL graphics card or with four processor threads or fewer starts at half resolution with every second frame and 8-bit samples. Every other machine starts at full resolution with every frame and 8-bit samples. Each setting can be changed here at any time.
+The three choices differ in memory: a Full HD scene of 1920 × 1080 pixels run for 1500 frames, with the field and the intensity both kept, takes 11.6 GB with 16-bit samples at full resolution and every frame, 5.8 GB with 8-bit samples at full resolution and every frame, and 740 MB at half resolution with every second frame and 8-bit samples. The settings combine: half resolution divides a frame by four, quarter resolution by sixteen, every second or fourth frame divides their number the same way, and 8-bit samples halve each frame against 16-bit.
+
### The Simulation menu
![menu-simulation](Assets/menu-simulation.svg)
diff --git a/README.md b/README.md
index 065dcbd..e381b32 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ Videos are written as MP4, MPEG-1, AVI or QuickTime; frames as PNG or JPEG, in s
## Speed
-The simulation runs on the GPU, or on the CPU where there is no suitable GPU. On the first start, the preview quality is chosen to suit the machine, and the View menu changes it at any time: for slower machines, the preview can run at a reduced resolution or with fewer frames, while exports always use the full quality. On a sufficiently fast machine, the preview can keep floating-point values and dither the pictures, which shows finer gradients. Finished frames stay in memory for scrubbing and go to disk when a run outgrows it.
+The simulation runs on the GPU, or on the CPU where there is no suitable GPU. On the first start, the preview quality is chosen to suit the machine, and the View menu changes it at any time: for slower machines, the preview can run at a reduced resolution or with fewer frames, while exports always use the full quality. On a sufficiently fast machine, the preview can keep floating-point values and dither the pictures, which shows finer gradients. Finished frames stay in memory for scrubbing and go to disk when a run outgrows it. Depending on these settings, the same run of 1500 Full HD frames takes between 740 MB and 11.6 GB.
## Examples