mirror of
https://github.com/storytold/materialcraft.git
synced 2026-11-28 17:19:17 +01:00
Order the final three additive levels in repeated quadrant trees
This commit is contained in:
1 parent
c16baa8662
commit
8bb2e46232
9 files changed
+425
-5
No files matched your search
@@ -123,6 +123,7 @@ pub fn cook_with_base_level_inputs(context: &CookContext, base_level_only: &[boo
|
||||
let mut discard_allowance = MAX_VISITS;
|
||||
let grayscale = !context.b("color_mode");
|
||||
let mut repeated_roots = None;
|
||||
let mut terminal_quadrants = if grayscale && opacity_depth == 8 { super::terminal_quadrants::TerminalQuadrants::new(context) } else { None };
|
||||
let mut seven_level_runs = (grayscale && opacity_depth == 7).then(SevenLevelRuns::default);
|
||||
let mut sparse_runs = if grayscale && opacity_depth == 8 { super::tile_runs::SparseQuadrantRuns::new(context) } else { None };
|
||||
let mut mixed_depth_runs = if grayscale && matches!(opacity_depth, 8 | 9) { MixedDepthRuns::new(context, opacity_depth) } else { None };
|
||||
@@ -156,6 +157,9 @@ pub fn cook_with_base_level_inputs(context: &CookContext, base_level_only: &[boo
|
||||
if seven_level_runs.as_mut().is_some_and(|runs| !runs.visit(node, visit.depth, stamps.len())) {
|
||||
seven_level_runs = None;
|
||||
}
|
||||
if terminal_quadrants.as_mut().is_some_and(|runs| !runs.visit(node, visit.depth, stamps.len(), Some(node.id) == graph.root)) {
|
||||
terminal_quadrants = None;
|
||||
}
|
||||
if sparse_runs.as_ref().is_some_and(|runs| !runs.visit(node, visit.depth)) {
|
||||
sparse_runs = None;
|
||||
}
|
||||
@@ -307,6 +311,9 @@ pub fn cook_with_base_level_inputs(context: &CookContext, base_level_only: &[boo
|
||||
if mixed_depth_runs.as_mut().is_some_and(|runs| !runs.draw(&stamp, opacities.as_deref().unwrap_or_default(), !missed)) {
|
||||
mixed_depth_runs = None;
|
||||
}
|
||||
if terminal_quadrants.as_mut().is_some_and(|runs| !runs.draw(&stamp, opacities.as_deref().unwrap_or_default())) {
|
||||
terminal_quadrants = None;
|
||||
}
|
||||
if missed {
|
||||
if discard_allowance > 0 {
|
||||
discard_allowance -= 1;
|
||||
@@ -415,6 +422,7 @@ pub fn cook_with_base_level_inputs(context: &CookContext, base_level_only: &[boo
|
||||
let groups = groups.map(super::pattern_stamp::DrawRun::whole);
|
||||
let mixed_groups = mixed_depth_runs
|
||||
.and_then(|runs| runs.finish(&stamps))
|
||||
.or_else(|| terminal_quadrants.and_then(|runs| runs.finish(&stamps, repeated_roots.unwrap_or(1))))
|
||||
.or_else(|| sparse_runs.and_then(|runs| runs.finish(&stamps)))
|
||||
.or_else(|| repeated_roots.and_then(|repeats| super::repeated_quadrants::runs(context, &stamps, repeats, max_depth)));
|
||||
Ok(vec![raster::render(context, mixed_groups.as_deref().unwrap_or(&groups), opacities, nonfinite_gray_opacity, base_level_only, runtime_image_selector)?])
|
||||
|
||||
@@ -11,6 +11,7 @@ mod raster;
|
||||
mod region;
|
||||
mod repeated_quadrants;
|
||||
mod shape;
|
||||
mod terminal_quadrants;
|
||||
mod tile_runs;
|
||||
mod variables;
|
||||
|
||||
|
||||
@@ -0,0 +1,247 @@
|
||||
use super::{
|
||||
pattern_stamp::{DrawRun, PatternStamp},
|
||||
raster::MIN_STAMP_SIZE,
|
||||
tile_runs::UNIT_WINDOW,
|
||||
};
|
||||
use crate::CookContext;
|
||||
use materialcraft_core::{PatternNode, PatternNodeKind};
|
||||
|
||||
// With draws on the last three levels, 21 consecutive stamps belong to each
|
||||
// depth-six parent. Paired squares identify the order of these parent ranges
|
||||
// for complete trees. Successive trees share the first submissions.
|
||||
type ParentRange = (usize, usize);
|
||||
const FIRST: &[ParentRange] = &[
|
||||
(1536, 1796),
|
||||
(2560, 2820),
|
||||
(512, 772),
|
||||
(3200, 3328),
|
||||
(1024, 1156),
|
||||
(3712, 3840),
|
||||
(0, 132),
|
||||
(3456, 3584),
|
||||
(2048, 2180),
|
||||
(772, 1024),
|
||||
(1408, 1416),
|
||||
(1796, 2048),
|
||||
(3328, 3336),
|
||||
(1156, 1280),
|
||||
(1472, 1536),
|
||||
(256, 328),
|
||||
(3968, 4096),
|
||||
(3072, 3200),
|
||||
(1344, 1348),
|
||||
(132, 256),
|
||||
(384, 512),
|
||||
(2304, 2312),
|
||||
(2820, 3072),
|
||||
(3584, 3592),
|
||||
];
|
||||
const SINGLE_TAIL: &[ParentRange] =
|
||||
&[(328, 384), (2180, 2304), (2496, 2560), (2312, 2432), (3840, 3968), (1280, 1344), (2432, 2496), (1348, 1408), (3592, 3712), (3336, 3456), (1416, 1472)];
|
||||
const REPEATED: &[ParentRange] = &[
|
||||
(3336, 3456),
|
||||
(5632, 6032),
|
||||
(2180, 2304),
|
||||
(2496, 2560),
|
||||
(7552, 7624),
|
||||
(3592, 3712),
|
||||
(6656, 7056),
|
||||
(1416, 1472),
|
||||
(4608, 5072),
|
||||
(3840, 3968),
|
||||
(1280, 1344),
|
||||
(2432, 2496),
|
||||
(7936, 7940),
|
||||
(1348, 1408),
|
||||
(8064, 8192),
|
||||
(7168, 7240),
|
||||
(328, 384),
|
||||
(7296, 7424),
|
||||
(5120, 5196),
|
||||
(2312, 2432),
|
||||
(7808, 7936),
|
||||
(4096, 4160),
|
||||
(4288, 4496),
|
||||
(7624, 7680),
|
||||
(6144, 6348),
|
||||
(5196, 5248),
|
||||
(5312, 5376),
|
||||
(5568, 5632),
|
||||
];
|
||||
const DOUBLE_TAIL: &[ParentRange] = &[
|
||||
(4160, 4288),
|
||||
(6348, 6400),
|
||||
(6592, 6656),
|
||||
(4496, 4608),
|
||||
(6400, 6528),
|
||||
(7940, 8064),
|
||||
(5248, 5312),
|
||||
(6528, 6592),
|
||||
(7240, 7296),
|
||||
(5376, 5504),
|
||||
(7056, 7168),
|
||||
(7680, 7808),
|
||||
(6032, 6144),
|
||||
(7424, 7552),
|
||||
(5072, 5120),
|
||||
(5504, 5568),
|
||||
];
|
||||
const FOUR_TAIL: &[ParentRange] = &[
|
||||
(4160, 4240),
|
||||
(7240, 7296),
|
||||
(5376, 5504),
|
||||
(12160, 12236),
|
||||
(6032, 6144),
|
||||
(7424, 7552),
|
||||
(9728, 10008),
|
||||
(7056, 7168),
|
||||
(7680, 7808),
|
||||
(10752, 11032),
|
||||
(4496, 4608),
|
||||
(6400, 6528),
|
||||
(11904, 11924),
|
||||
(5072, 5120),
|
||||
(5504, 5568),
|
||||
(8704, 9112),
|
||||
(7940, 8064),
|
||||
(5248, 5312),
|
||||
(6528, 6592),
|
||||
(12032, 12040),
|
||||
(4240, 4288),
|
||||
(11392, 11520),
|
||||
(9216, 9300),
|
||||
(11924, 12032),
|
||||
(8192, 8344),
|
||||
(6348, 6400),
|
||||
(6592, 6656),
|
||||
(11648, 11776),
|
||||
(10240, 10304),
|
||||
(10432, 10644),
|
||||
(10008, 10240),
|
||||
(11520, 11548),
|
||||
(9300, 9344),
|
||||
(9408, 9472),
|
||||
(9664, 9728),
|
||||
(8448, 8536),
|
||||
(12236, 12288),
|
||||
(11264, 11392),
|
||||
(9472, 9552),
|
||||
(8344, 8448),
|
||||
(8576, 8704),
|
||||
(10304, 10332),
|
||||
(11032, 11264),
|
||||
(11776, 11804),
|
||||
(11548, 11648),
|
||||
(13824, 14244),
|
||||
(11804, 11904),
|
||||
(14848, 15268),
|
||||
(9112, 9216),
|
||||
(9600, 9664),
|
||||
(12800, 13152),
|
||||
(12040, 12160),
|
||||
(9344, 9408),
|
||||
(10368, 10432),
|
||||
(16128, 16140),
|
||||
(9552, 9600),
|
||||
(16256, 16384),
|
||||
(15360, 15444),
|
||||
(8536, 8576),
|
||||
(15488, 15616),
|
||||
(13312, 13404),
|
||||
(10332, 10368),
|
||||
(16000, 16128),
|
||||
(12288, 12416),
|
||||
(12480, 12708),
|
||||
(10644, 10752),
|
||||
(15744, 15872),
|
||||
(14336, 14400),
|
||||
(14528, 14748),
|
||||
(13404, 13440),
|
||||
(13504, 13568),
|
||||
(13760, 13824),
|
||||
(12416, 12480),
|
||||
(14748, 14848),
|
||||
(12708, 12800),
|
||||
(14400, 14464),
|
||||
(16140, 16256),
|
||||
(13440, 13504),
|
||||
(14464, 14528),
|
||||
(15444, 15488),
|
||||
(13568, 13696),
|
||||
(15268, 15360),
|
||||
(15872, 16000),
|
||||
(14244, 14336),
|
||||
(15616, 15744),
|
||||
(13152, 13312),
|
||||
(13696, 13760),
|
||||
];
|
||||
|
||||
#[derive(Default)]
|
||||
pub(super) struct TerminalQuadrants {
|
||||
starts: Vec<usize>,
|
||||
draws: usize,
|
||||
shape: Option<i32>,
|
||||
}
|
||||
|
||||
impl TerminalQuadrants {
|
||||
pub(super) fn new(context: &CookContext) -> Option<Self> {
|
||||
(context.tiling_axes() == [false; 2]
|
||||
&& !context.b("cull_outside")
|
||||
&& context.v4("render_region") == UNIT_WINDOW
|
||||
&& context.v4("tiling_region") == UNIT_WINDOW)
|
||||
.then(Self::default)
|
||||
}
|
||||
|
||||
pub(super) fn visit(&mut self, node: &PatternNode, depth: u32, retained: usize, at_root: bool) -> bool {
|
||||
match node.kind {
|
||||
PatternNodeKind::Iterate => at_root && node.children.first() == Some(&None),
|
||||
PatternNodeKind::Switch => depth == 0 && node.children.contains(&None),
|
||||
PatternNodeKind::Quadrant if depth == 8 => node.children.iter().all(Option::is_none),
|
||||
PatternNodeKind::Quadrant if depth < 8 && node.children.iter().flatten().count() == 4 => {
|
||||
if depth == 6 {
|
||||
if self.starts.len() == 4 * 4096 {
|
||||
return false;
|
||||
}
|
||||
// Invisible draws still occupy a place in their parent's run.
|
||||
self.starts.push(retained);
|
||||
}
|
||||
true
|
||||
}
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn draw(&mut self, stamp: &PatternStamp, weights: &[f32]) -> bool {
|
||||
let Some(weight) = weights.get(stamp.depth as usize) else { return false };
|
||||
if !(6..=8).contains(&stamp.depth)
|
||||
|| stamp.blend != 0
|
||||
|| !(2..=16).contains(&stamp.pattern)
|
||||
|| *self.shape.get_or_insert(stamp.pattern) != stamp.pattern
|
||||
|| !(weight * stamp.color[3]).is_normal()
|
||||
|| stamp.size.iter().any(|axis| axis.abs() < MIN_STAMP_SIZE)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
self.draws += 1;
|
||||
true
|
||||
}
|
||||
|
||||
pub(super) fn finish(mut self, stamps: &[PatternStamp], repeats: usize) -> Option<Vec<DrawRun<'_>>> {
|
||||
let (middle, tail) = match repeats {
|
||||
1 => (&[][..], SINGLE_TAIL),
|
||||
2 => (REPEATED, DOUBLE_TAIL),
|
||||
4 => (REPEATED, FOUR_TAIL),
|
||||
_ => return None,
|
||||
};
|
||||
if self.starts.len() != repeats * 4096 || self.draws != self.starts.len() * 21 {
|
||||
return None;
|
||||
}
|
||||
self.starts.push(stamps.len());
|
||||
let mut groups = Vec::with_capacity(FIRST.len() + middle.len() + tail.len());
|
||||
for &(start, end) in FIRST.iter().chain(middle).chain(tail) {
|
||||
let stamps = stamps.get(*self.starts.get(start)?..*self.starts.get(end)?)?;
|
||||
groups.push(DrawRun::whole(stamps));
|
||||
}
|
||||
Some(groups)
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ use std::collections::BTreeMap;
|
||||
mod paired_batches;
|
||||
mod repeated_quadrants;
|
||||
mod sparse_quadrants;
|
||||
mod terminal_quadrants;
|
||||
|
||||
fn coverage(shape: i32, x: f32, y: f32, variation: f32) -> f32 {
|
||||
let sample = super::shape::prepare(shape, variation);
|
||||
|
||||
@@ -3,13 +3,23 @@ use craft_texture::{Image, Kind};
|
||||
use materialcraft_core::OutputFormat;
|
||||
|
||||
// Three disjoint portions of a procedural input address the active quadrant levels.
|
||||
fn field_property(depth: u32, offset: [f32; 2], frame: bool) -> Value {
|
||||
pub(super) fn field_property(depth: u32, offset: [f32; 2], frame: bool, repeated: bool) -> Value {
|
||||
let mut graph = FunctionGraph::default();
|
||||
let pos = graph.add("get_float2", &[], Some(Value::Text("$pos".into())));
|
||||
let scale = graph.add_constant(Value::Float2([(1 << depth) as f32 / 1024.0; 2]));
|
||||
let scaled = graph.add("mul", &[pos, scale], None);
|
||||
let origin = graph.add_constant(Value::Float2(offset));
|
||||
let uv = graph.add("add", &[scaled, origin], None);
|
||||
let uv = if repeated {
|
||||
let number = graph.add("get_float1", &[], Some(Value::Text("$number".into())));
|
||||
let quarter = graph.add_constant(Value::Float(0.25));
|
||||
let row = graph.add("mul", &[number, quarter], None);
|
||||
let zero = graph.add_constant(Value::Float(0.0));
|
||||
let bank = graph.add("vector2", &[zero, row], None);
|
||||
graph.add("add", &[uv, bank], None)
|
||||
} else {
|
||||
uv
|
||||
};
|
||||
let sample = graph.add("samplecol", &[uv], Some(Value::Int2([0, 0])));
|
||||
let result = if frame {
|
||||
let center = graph.add("swizzle2", &[sample], Some(Value::Int2([0, 1])));
|
||||
@@ -87,8 +97,8 @@ fn check_batch_markers(group_counts: &[u32; 64], seed: u32, axes: i32, markers:
|
||||
_ => [0.0; 2],
|
||||
};
|
||||
let mut params = additive_square(0.25, [0.0; 2], [0.0; 2]);
|
||||
params.insert("frameoffset".into(), field_property(depth, offset, true));
|
||||
params.insert("opacity".into(), field_property(depth, offset, false));
|
||||
params.insert("frameoffset".into(), field_property(depth, offset, true, false));
|
||||
params.insert("opacity".into(), field_property(depth, offset, false, false));
|
||||
graph.nodes[(child - 1) as usize].parameters = params;
|
||||
}
|
||||
parent = child;
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
use super::paired_batches::field_property;
|
||||
use super::*;
|
||||
use craft_texture::{Image, Kind};
|
||||
use materialcraft_core::OutputFormat;
|
||||
|
||||
// Each depth-six parent draws before four children, each followed by four leaves.
|
||||
// Address the three levels in separate columns and successive iterations in separate rows.
|
||||
fn location(draw: u32) -> (u32, u32) {
|
||||
let iteration = draw / 86_016;
|
||||
let parent = draw % 86_016 / 21;
|
||||
let within = draw % 21;
|
||||
let (depth, visit, column) = match within {
|
||||
0 => (6, parent, 384),
|
||||
n if (n - 1) % 5 == 0 => (7, parent * 4 + (n - 1) / 5, 256),
|
||||
n => (8, parent * 16 + (n - 1) / 5 * 4 + (n - 2) % 5, 0),
|
||||
};
|
||||
let mut x = 0;
|
||||
let mut y = 0;
|
||||
for bit in 0..depth {
|
||||
x |= ((visit >> (2 * bit)) & 1) << bit;
|
||||
y |= ((visit >> (2 * bit + 1)) & 1) << bit;
|
||||
}
|
||||
(column + x, iteration * 256 + y)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn three_terminal_levels_interleave_repeated_quadrant_trees() {
|
||||
// In a white pixel a tiny positive value survives only when the negative square draws first.
|
||||
let tiny = f32::EPSILON * 0.25;
|
||||
for (count, markers) in [
|
||||
(1, [(28193, 32245, false), (52923, 80165, false), (13176, 44146, true), (9090, 37313, false), (17308, 46423, true), (6792, 15213, false)]),
|
||||
(2, [(148776, 167500, false), (108044, 154830, false), (2356, 50934, true), (80910, 98000, false), (24344, 108669, true), (29011, 120962, false)]),
|
||||
(4, [(81374, 106292, false), (261307, 262710, false), (43010, 163056, true), (224189, 266224, false), (176006, 303409, true), (52157, 146973, false)]),
|
||||
] {
|
||||
let root = if count == 1 { PatternNodeKind::Quadrant } else { PatternNodeKind::Iterate };
|
||||
let mut graph = PatternGraph::with_root(root);
|
||||
let mut parent = graph.root.unwrap();
|
||||
if count > 1 {
|
||||
parent = graph.add(PatternNodeKind::Quadrant).unwrap();
|
||||
graph.nodes[0].parameters.insert("numberadded".into(), Value::Int(count));
|
||||
graph.nodes[0].children[1] = Some(parent);
|
||||
}
|
||||
for depth in 1..=8 {
|
||||
let child = graph.add(PatternNodeKind::Quadrant).unwrap();
|
||||
graph.nodes[(parent - 1) as usize].children.fill(Some(child));
|
||||
if depth >= 6 {
|
||||
let column = match depth {
|
||||
6 => 384,
|
||||
7 => 256,
|
||||
_ => 0,
|
||||
};
|
||||
let offset = [column as f32 / 1024.0, 0.0];
|
||||
let mut properties = additive_square(0.25, [0.0; 2], [0.0; 2]);
|
||||
properties.insert("frameoffset".into(), field_property(depth, offset, true, count > 1));
|
||||
properties.insert("opacity".into(), field_property(depth, offset, false, count > 1));
|
||||
graph.nodes[(child - 1) as usize].parameters = properties;
|
||||
}
|
||||
parent = child;
|
||||
}
|
||||
let definition = find("fx_map").unwrap();
|
||||
let params = resolve_params(
|
||||
definition,
|
||||
&BTreeMap::from([
|
||||
("pattern".into(), Value::PatternGraph(Box::new(graph))),
|
||||
("roughness".into(), Value::Float(0.0)),
|
||||
("color_mode".into(), Value::Bool(false)),
|
||||
("background".into(), Value::Color([1.0; 4])),
|
||||
]),
|
||||
);
|
||||
let variables = BTreeMap::from([("$tiling".into(), Value::Int(0))]);
|
||||
let mut field = BTreeMap::new();
|
||||
for (j, &(negative, positive, _)) in markers.iter().enumerate() {
|
||||
let x = (8.5 + j as f32) / 128.0;
|
||||
field.insert(location(negative), [x, 12.5 / 128.0, -1.0, 1.0]);
|
||||
field.insert(location(positive), [x, 12.5 / 128.0, tiny, 1.0]);
|
||||
}
|
||||
let input = Image::generate(1024, 1024, Kind::Color, |x, y| field.get(&(x, y)).copied().unwrap_or([0.875, 0.90625, 0.25, 1.0]));
|
||||
let inputs = [None, Some(input)];
|
||||
let context = CookContext {
|
||||
w: 128,
|
||||
h: 128,
|
||||
seed: 257831 + 19 * count as u32,
|
||||
format: OutputFormat::F32,
|
||||
tile: false,
|
||||
inputs: &inputs,
|
||||
input_formats: &[OutputFormat::F32; 2],
|
||||
params: ¶ms,
|
||||
resource: &|_| None,
|
||||
vars: &variables,
|
||||
};
|
||||
let image = (definition.cook)(&context).unwrap().remove(0);
|
||||
for (j, &(_, _, negative_first)) in markers.iter().enumerate() {
|
||||
assert_eq!(image.get_gray(8 + j as i64, 12, false), if negative_first { tiny } else { 0.0 }, "{count} trees, marker {j}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ pub(super) use sparse_quadrants::SparseQuadrantRuns;
|
||||
|
||||
use paired_batches::PairedBatches;
|
||||
|
||||
const UNIT_WINDOW: [f32; 4] = [0.0, 1.0, 0.0, 1.0];
|
||||
pub(super) const UNIT_WINDOW: [f32; 4] = [0.0, 1.0, 0.0, 1.0];
|
||||
const DEPTH_THREE_PARENTS: usize = 256;
|
||||
const DEPTH_FOUR_PARENTS: usize = 64;
|
||||
const PAIRED_SUBTREE_PARENTS: usize = 2 * DEPTH_THREE_PARENTS;
|
||||
|
||||
@@ -6032,6 +6032,63 @@ Supply identical original fields to the downstream graph by replacing its source
|
||||
| noise_dirt_gradient_v2 | Source stages | 3/10 | 1,617/3,328 | — / — / 0.122558594 / 0.0274509192 |
|
||||
| noise_dirt_gradient_v2 | Inputs of final pattern | 3/10 | 2,167/3,328 | — / — / 0 / 9.53674316e-07 |
|
||||
|
||||
### Final three quadrant levels in Directional Noise 1
|
||||
|
||||
The third pattern stage is the first differing stage in this directional generator. Its two earlier pattern stages and their first blend match all 16,896 pixels each in eight settings. At the third stage the original window and tiling give 16,884/16,896 U16 pixels (maximum 1) and 10,505/16,896 F32 pixels (maximum 1.78813934e-07). The root remains in progress. [Earlier root measurements](#directional-noise-and-scratch-pattern-sources)
|
||||
|
||||
With unit render and tiling windows, wrapping disabled, and a single additive shape drawn at depths six through eight, each depth-six parent supplies 21 draws. A complete depth-eight tree has 4,096 such parents. One, two and four active trees submit 35, 68 and 139 contiguous parent ranges respectively. The boundaries refer to every visited draw, including squares that miss all pixel centers. For 21 F32 stage renders, using the measured order improves **27,536/46,080 · 4.76837158e-07** to **46,080/46,080 · 0**. This covers a direct tree, a forced one-, two- or four-iteration tree and the graph's own iteration switch. The latter also selects 18 trees in one of the original window settings.
|
||||
|
||||
To measure the order independently, connect all four children at every subdivision through depth eight. Use additive squares at the last three levels, size 0.875, zero roughness, a white F32 background and one processor. Put pale squares at the same distant point with weight 0.25. For each numbered pair move both centers to the same pixel and assign −1 and 2⁻²⁵. A surviving 2⁻²⁵ identifies which square drew first. Repeat with the gains exchanged. Horizontal and vertical strips allow multiple comparisons per image. Bisect parent indices around changes in the observed ordering. Sixteen independent pairs at each tree count, repeated with both gain assignments, agreed in all 96 comparisons. The normal cook regression failed before the correction. [Signed square fixture](../crates/nodes/src/pattern/tests/terminal_quadrants.rs)
|
||||
|
||||
| Comparison | U8 exact / total · max | U16 exact / total · max | F16 exact / total · max | F32 exact / total · max |
|
||||
|---|---:|---:|---:|---:|
|
||||
| Whole graph, 60 settings, one processor | 88,319/88,320 · 1 | 300,641/300,800 · 1 | 90,367/90,368 · 0.000244140625 | 254,791/254,976 · 1.14738941e-05 |
|
||||
| Whole graph, 60 settings, eight processors | 88,319/88,320 · 1 | 300,639/300,800 · 1 | 90,366/90,368 · 0.000244140625 | 254,816/254,976 · 1.14738941e-05 |
|
||||
| Same reference renders, one versus eight | 88,318/88,320 · 1 | 300,652/300,800 · 1 | 90,367/90,368 · 0.000244140625 | 254,783/254,976 · 1.14440918e-05 |
|
||||
| Whole graph, 12 saved settings, one processor | 14,336/14,336 · 0 | 22,769/22,784 · 1 | 1,024/1,024 · 0 | 84,952/84,992 · 1.14440918e-05 |
|
||||
| Reference original versus saved whole graph | 14,336/14,336 · 0 | 22,784/22,784 · 0 | 1,024/1,024 · 0 | 84,992/84,992 · 0 |
|
||||
| Isolated stage, 24 new settings, one processor | 2,048/2,048 · 0 | 2,048/2,048 · 0 | 2,048/2,048 · 0 | 20,480/20,480 · 0 |
|
||||
| Isolated stage, 24 new settings, eight processors | 2,048/2,048 · 0 | 2,044/2,048 · 1 | 2,048/2,048 · 0 | 11,044/20,480 · 3.57627869e-07 |
|
||||
| Isolated stage, 12 saved settings, one processor | — | 2,048/2,048 · 0 | 2,048/2,048 · 0 | 2,048/2,048 · 0 |
|
||||
|
||||
For the 24 new stage settings, use the direct tree, two forced iterations, four forced iterations and the original switch. In each configuration use the following width, height, seed, scale, angle, angle random, disorder and nonsquare expansion. At 16 × 32 use 260153, 2, 0.09375, 0.125, 0.3125, off. At 32 × 16 use 260171, 1, −0.046875, 0.21875, 0.5625, on. At 64 × 64 use 260183, 2, 0.15625, 0.09375, 0.28125, off. Use F32 everywhere and all four formats at 32 × 16. Save in MaterialCraft and reopen in both applications for the first F32 and the middle U16 and F16 cases.
|
||||
|
||||
All 60 original whole-graph buffers and all 12 reopened buffers retain their previous MaterialCraft pixels. Reproduce the whole settings below using the same grayscale output and defaults for omitted controls. Integer errors are stored levels. The full root still differs in its original sampling windows.
|
||||
|
||||
<details>
|
||||
<summary>Whole-graph controls and stored formats</summary>
|
||||
|
||||
| Size | Seed | Scale, disorder, angle, angle random, expand nonsquare | Formats | Reopened |
|
||||
|---|---:|---|---|---|
|
||||
| 128 × 128 | 0 | Defaults | U16 | U16 |
|
||||
| 256 × 256 | 0 | Defaults | U16, U8, F16, F32 | — |
|
||||
| 128 × 128 | 42 | Defaults | U16 | — |
|
||||
| 128 × 128 | 0 | 2, 0.37, 0.125, 0.2, default | U16 | — |
|
||||
| 32 × 32 | 113 | 2, 0.37, 0.125, 0.2, default | F32 | — |
|
||||
| 64 × 64 | 42 | 2, 0.37, 0.125, 0.2, default | U8, U16, F16, F32 | U8 |
|
||||
| 16 × 16 | 103800 | Defaults | F32 | — |
|
||||
| 32 × 32 | 103801 | 1, 0, 0, 0, on | F32 | F32 |
|
||||
| 32 × 32 | 103802 | 1, 0.3125, 0.15625, 0.21875, off | U8, U16, F16, F32 | — |
|
||||
| 64 × 32 | 103806 | 2, 0.6875, -0.21875, 0.40625, on | F32 | F32 |
|
||||
| 32 × 64 | 103807 | 1, 0.3125, 0.15625, 0.21875, off | U16 | — |
|
||||
| 32 × 32 | 103808 | 3, 0.125, 0.375, 0.03125, off | F32 | — |
|
||||
| 64 × 32 | 103809 | 1, 0, 0, 0, on | F16 | — |
|
||||
| 16 × 16 | 0 | Defaults | U8, U16, F16, F32 | U16 |
|
||||
| 64 × 16 | 42 | 2, 0.03125, -0.21875, 0.03125, on | U8, U16, F16, F32 | F16 |
|
||||
| 16 × 64 | 411608 | 1, 0.875, 0.625, 0.875, off | U16, F32 | — |
|
||||
| 64 × 64 | 411669 | 3, 0.34375, 0.09375, 0.34375, on | U8, U16, F16, F32 | U16 |
|
||||
| 128 × 64 | 411730 | 2, 0.96875, 0.71875, 0.96875, off | U16, F32 | — |
|
||||
| 64 × 128 | 411791 | 1, 0.1875, -0.0625, 0.1875, on | U8, U16, F16, F32 | U8 |
|
||||
| 128 × 128 | 411852 | 3, 0.65625, 0.40625, 0.65625, off | U16, F32 | F32 |
|
||||
| 128 × 512 | 411974 | 2, 0.53125, 0.28125, 0.53125, off | U16, F32 | F32 |
|
||||
| 512 × 128 | 412035 | 1, 0.09375, -0.15625, 0.09375, on | U16, F32 | — |
|
||||
| 16 × 32 | 194860 | Defaults | U16, F32 | — |
|
||||
| 64 × 32 | 194907 | 3, 0.34375, 0.09375, 0.34375, on | U8, U16, F16, F32 | U8 |
|
||||
| 32 × 64 | 194954 | 1, 0.1875, -0.0625, 0.1875, on | U8, U16, F16, F32 | U16 |
|
||||
| 64 × 64 | 195001 | 2, 0.53125, 0.28125, 0.53125, off | U16, F32 | — |
|
||||
|
||||
</details>
|
||||
|
||||
### Directional noise and scratch pattern sources
|
||||
|
||||
The ten directional generators produced **135 comparable whole outputs across 190 cases**. The reference produced all 190. The other 55 local evaluations reached the pattern execution limit. Integer errors below are stored levels. A missing error value indicates an unavailable image.
|
||||
|
||||
@@ -374,7 +374,7 @@ Creased matches 10,947,840/10,947,840 pixels across 100 distinct settings throug
|
||||
| [noise_creased.sbs/creased](../assets/sbs/noise_creased.sbs) | 0 | No | [Parity · 787,456/787,456 pixels across 54 distinct settings on one and eight processors](parity-fixes.md#creased-and-crystal-noise-sources-on-one-and-eight-processors) · [Archived settings](parity-fixes.md#original-and-reopened-dirt-moisture-and-cellular-noise-fields) · [Earlier measurements](parity-fixes.md#directional-and-additive-stamp-profiles) · [Stamp-width recheck](parity-fixes.md#pixel-reciprocals-for-stamp-edge-widths) |
|
||||
| [noise_crystal_1.sbs/crystal_1](../assets/sbs/noise_crystal_1.sbs) | 0 | No | [Parity · 809,216/809,216 pixels across 64 distinct settings on one and eight processors](parity-fixes.md#creased-and-crystal-noise-sources-on-one-and-eight-processors) · [Archived settings](parity-fixes.md#original-and-reopened-dirt-moisture-and-cellular-noise-fields) · [Earlier measurements](parity-fixes.md#cloud-and-crystal-pattern-sources-across-scales) |
|
||||
| [noise_crystal_2.sbs/crystal_2](../assets/sbs/noise_crystal_2.sbs) | 0 | No | [Parity · 809,216/809,216 pixels across 64 distinct settings on one and eight processors](parity-fixes.md#creased-and-crystal-noise-sources-on-one-and-eight-processors) · [Archived settings](parity-fixes.md#original-and-reopened-dirt-moisture-and-cellular-noise-fields) · [Earlier measurements](parity-fixes.md#cloud-and-crystal-pattern-sources-across-scales) · [Stamp-width recheck](parity-fixes.md#pixel-reciprocals-for-stamp-edge-widths) |
|
||||
| [noise_directional_noise_1.sbs/directional_noise_1](../assets/sbs/noise_directional_noise_1.sbs) | 0 | Yes | [In progress · 136,222/144,640 pixels in 19 comparable renders](parity-fixes.md#directional-noise-and-scratch-pattern-sources) |
|
||||
| [noise_directional_noise_1.sbs/directional_noise_1](../assets/sbs/noise_directional_noise_1.sbs) | 0 | Yes | [In progress · 734,118/734,464 whole pixels across 60 settings on one processor, 734,140 on eight](parity-fixes.md#final-three-quadrant-levels-in-directional-noise-1) · [Earlier directional measurements](parity-fixes.md#directional-noise-and-scratch-pattern-sources) |
|
||||
| [noise_directional_noise_1_v2.sbs/directional_noise_1](../assets/sbs/noise_directional_noise_1_v2.sbs) | 0 | No | [In progress · 133,251/142,592 pixels in 18 comparable renders](parity-fixes.md#directional-noise-and-scratch-pattern-sources) |
|
||||
| [noise_directional_noise_2.sbs/directional_noise_2](../assets/sbs/noise_directional_noise_2.sbs) | 0 | Yes | [In progress · 103,497/107,776 pixels in 11 comparable renders](parity-fixes.md#directional-noise-and-scratch-pattern-sources) |
|
||||
| [noise_directional_noise_2_v2.sbs/directional_noise_2](../assets/sbs/noise_directional_noise_2_v2.sbs) | 0 | No | [In progress · 105,116/107,776 pixels in 11 comparable renders](parity-fixes.md#directional-noise-and-scratch-pattern-sources) |
|
||||
|
||||
Reference in new issue
Block a user