From 6f930d13705d7b0090a7aba920d56e74bdfb33c4 Mon Sep 17 00:00:00 2001 From: piexel Date: Sun, 18 Oct 2026 14:38:20 +0200 Subject: [PATCH] Apply axialFracturing to a style's built-in fractures axialFracturing on a style only changed how that style fractures its parent, so setting it on a style like IRIS changed nothing. It now also makes the style's own built-in fractures axial. A fracture the pack adds keeps its own axialFracturing setting. Model used: Claude Opus 5.5 --- .../volmit/iris/engine/object/IrisGeneratorStyle.java | 6 +++++- .../src/main/java/com/volmit/iris/util/noise/CNG.java | 11 +++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/volmit/iris/engine/object/IrisGeneratorStyle.java b/core/src/main/java/com/volmit/iris/engine/object/IrisGeneratorStyle.java index 8b8cb47ea..f39c0c6f1 100644 --- a/core/src/main/java/com/volmit/iris/engine/object/IrisGeneratorStyle.java +++ b/core/src/main/java/com/volmit/iris/engine/object/IrisGeneratorStyle.java @@ -64,7 +64,7 @@ public class IrisGeneratorStyle { @MinNumber(0.00001) @Desc("The Output multiplier. Only used if parent is fracture.") private double multiplier = 1; - @Desc("If set to true, each axis is warped by its own sample of this fracture instead of one shared value, which avoids straight diagonal lines. This is usually 2 or 3 times slower than normal.") + @Desc("If set to true, each axis is warped by its own sample instead of one shared value, for the most natural looking fracturing. Applies to this style's built-in fractures, and to how this style fractures its parent when used as a fracture. This is usually 2 or 3 times slower than normal, more for styles with many built-in fractures such as IRIS.") private boolean axialFracturing = false; @Desc("Apply a generator to the coordinate field fed into this parent generator. I.e. Distort your generator with another generator.") private IrisGeneratorStyle fracture = null; @@ -121,6 +121,10 @@ public class IrisGeneratorStyle { cng = cng.scale(1D / zoom).pow(exponent).bake(); cng.setTrueFracturing(axialFracturing); + if (axialFracturing) { + cng.makeNestedFracturesAxial(); + } + if (fracture != null) { cng.fractureWith(fracture.create(rng.nextParallelRNG(2934), data), fracture.getMultiplier()); } diff --git a/core/src/main/java/com/volmit/iris/util/noise/CNG.java b/core/src/main/java/com/volmit/iris/util/noise/CNG.java index 9364eabf6..b29878553 100644 --- a/core/src/main/java/com/volmit/iris/util/noise/CNG.java +++ b/core/src/main/java/com/volmit/iris/util/noise/CNG.java @@ -314,6 +314,17 @@ public class CNG { return rng; } + public void makeNestedFracturesAxial() { + if (fracture != null) { + fracture.setTrueFracturing(true); + fracture.makeNestedFracturesAxial(); + } + + if (children != null) { + children.forEach(CNG::makeNestedFracturesAxial); + } + } + public CNG fractureWith(CNG c, double scale) { fracture = c; fscale = scale;