mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 02:36:59 +00:00
MOAR
This commit is contained in:
parent
a4d1b5b972
commit
991aaa8677
@ -21,8 +21,9 @@ public class NoiseView extends JPanel {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 2094606939770332040L;
|
private static final long serialVersionUID = 2094606939770332040L;
|
||||||
|
|
||||||
RollingSequence r = new RollingSequence(256);
|
RollingSequence r = new RollingSequence(60);
|
||||||
CNG cng = NoiseStyle.PERLIN_IRIS.create(new RNG(RNG.r.nextLong())).scale(0.25);
|
boolean colorMode = true;
|
||||||
|
CNG cng = NoiseStyle.SIMPLEX.create(new RNG(RNG.r.nextLong())).scale(0.25);
|
||||||
GroupedExecutor gx = new GroupedExecutor(Runtime.getRuntime().availableProcessors(), Thread.MAX_PRIORITY,
|
GroupedExecutor gx = new GroupedExecutor(Runtime.getRuntime().availableProcessors(), Thread.MAX_PRIORITY,
|
||||||
"Iris Renderer");
|
"Iris Renderer");
|
||||||
ReentrantLock l = new ReentrantLock();
|
ReentrantLock l = new ReentrantLock();
|
||||||
@ -66,8 +67,9 @@ public class NoiseView extends JPanel {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Color color = Color.getHSBColor((float) (n), 1f - (float) (n * n * n * n * n * n),
|
Color color = colorMode
|
||||||
1f - (float) n);
|
? Color.getHSBColor((float) (n), 1f - (float) (n * n * n * n * n * n), 1f - (float) n)
|
||||||
|
: Color.getHSBColor(0f, 0f, (float) n);
|
||||||
int rgb = color.getRGB();
|
int rgb = color.getRGB();
|
||||||
co[xx][z] = rgb;
|
co[xx][z] = rgb;
|
||||||
}
|
}
|
||||||
@ -98,7 +100,7 @@ public class NoiseView extends JPanel {
|
|||||||
frame.add(new NoiseView());
|
frame.add(new NoiseView());
|
||||||
frame.setLocationByPlatform(true);
|
frame.setLocationByPlatform(true);
|
||||||
frame.pack();
|
frame.pack();
|
||||||
frame.setSize(900, 500);
|
frame.setSize(1440, 820);
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,38 @@
|
|||||||
|
package com.volmit.iris.noise;
|
||||||
|
|
||||||
|
import com.volmit.iris.noise.FastNoise.FractalType;
|
||||||
|
import com.volmit.iris.util.RNG;
|
||||||
|
|
||||||
|
public class FractalBillowPerlinNoise implements NoiseGenerator, OctaveNoise {
|
||||||
|
private final FastNoise n;
|
||||||
|
|
||||||
|
public FractalBillowPerlinNoise(long seed) {
|
||||||
|
this.n = new FastNoise(new RNG(seed).imax());
|
||||||
|
n.SetFractalOctaves(1);
|
||||||
|
n.SetFractalType(FractalType.Billow);
|
||||||
|
}
|
||||||
|
|
||||||
|
public double f(double v) {
|
||||||
|
return (v / 2D) + 0.5D;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double noise(double x) {
|
||||||
|
return f(n.GetPerlinFractal((float) x, 0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double noise(double x, double z) {
|
||||||
|
return f(n.GetPerlinFractal((float) x, (float) z));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double noise(double x, double y, double z) {
|
||||||
|
return f(n.GetPerlinFractal((float) x, (float) y, (float) z));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setOctaves(int o) {
|
||||||
|
n.SetFractalOctaves(o);
|
||||||
|
}
|
||||||
|
}
|
@ -5,6 +5,7 @@ public enum NoiseType {
|
|||||||
SIMPLEX(seed -> new SimplexNoise(seed)),
|
SIMPLEX(seed -> new SimplexNoise(seed)),
|
||||||
PERLIN(seed -> new PerlinNoise(seed)),
|
PERLIN(seed -> new PerlinNoise(seed)),
|
||||||
FRACTAL_BILLOW_SIMPLEX(seed -> new FractalBillowSimplexNoise(seed)),
|
FRACTAL_BILLOW_SIMPLEX(seed -> new FractalBillowSimplexNoise(seed)),
|
||||||
|
FRACTAL_BILLOW_PERLIN(seed -> new FractalBillowPerlinNoise(seed)),
|
||||||
FRACTAL_FBM_SIMPLEX(seed -> new FractalFBMSimplexNoise(seed)),
|
FRACTAL_FBM_SIMPLEX(seed -> new FractalFBMSimplexNoise(seed)),
|
||||||
FRACTAL_RIGID_MULTI_SIMPLEX(seed -> new FractalRigidMultiSimplexNoise(seed)),
|
FRACTAL_RIGID_MULTI_SIMPLEX(seed -> new FractalRigidMultiSimplexNoise(seed)),
|
||||||
CELLULAR(seed -> new CellularNoise(seed)),
|
CELLULAR(seed -> new CellularNoise(seed)),
|
||||||
|
@ -42,6 +42,32 @@ public enum NoiseStyle {
|
|||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
SIMPLEX(rng -> new CNG(rng, 1D, 1).scale(1)),
|
SIMPLEX(rng -> new CNG(rng, 1D, 1).scale(1)),
|
||||||
|
|
||||||
|
@Desc("Very Detailed smoke using simplex fractured with fractal billow simplex at high octaves.")
|
||||||
|
@DontObfuscate
|
||||||
|
FRACTAL_SMOKE(rng -> new CNG(rng, 1D, 1)
|
||||||
|
.fractureWith(new CNG(rng.nextParallelRNG(1), NoiseType.FRACTAL_BILLOW_SIMPLEX, 1D, 8).scale(0.2), 1000)
|
||||||
|
.scale(0.34)),
|
||||||
|
|
||||||
|
@Desc("Thinner Veins.")
|
||||||
|
@DontObfuscate
|
||||||
|
VASCULAR_THIN(rng -> new CNG(rng.nextParallelRNG(1), NoiseType.VASCULAR, 1D, 1).scale(1).pow(0.65)),
|
||||||
|
|
||||||
|
@Desc("Cells of simplex noise")
|
||||||
|
@DontObfuscate
|
||||||
|
SIMPLEX_CELLS(rng -> new CNG(rng.nextParallelRNG(1), NoiseType.SIMPLEX, 1D, 1).scale(1)
|
||||||
|
.fractureWith(new CNG(rng.nextParallelRNG(8), NoiseType.CELLULAR, 1D, 1).scale(1), 200)),
|
||||||
|
|
||||||
|
@Desc("Veins of simplex noise")
|
||||||
|
@DontObfuscate
|
||||||
|
SIMPLEX_VASCULAR(rng -> new CNG(rng.nextParallelRNG(1), NoiseType.SIMPLEX, 1D, 1).scale(1)
|
||||||
|
.fractureWith(new CNG(rng.nextParallelRNG(8), NoiseType.VASCULAR, 1D, 1).scale(1), 200)),
|
||||||
|
|
||||||
|
@Desc("Very Detailed fluid using simplex fractured with fractal billow simplex at high octaves.")
|
||||||
|
@DontObfuscate
|
||||||
|
FRACTAL_WATER(rng -> new CNG(rng, 1D, 1)
|
||||||
|
.fractureWith(new CNG(rng.nextParallelRNG(1), NoiseType.FRACTAL_FBM_SIMPLEX, 1D, 9).scale(0.03), 9900)
|
||||||
|
.scale(1.14)),
|
||||||
|
|
||||||
@Desc("Perlin. Like simplex but more natural")
|
@Desc("Perlin. Like simplex but more natural")
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
PERLIN(rng -> new CNG(rng, NoiseType.PERLIN, 1D, 1).scale(1.47)),
|
PERLIN(rng -> new CNG(rng, NoiseType.PERLIN, 1D, 1).scale(1.47)),
|
||||||
@ -62,6 +88,14 @@ public enum NoiseStyle {
|
|||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
PERLIN_IRIS_THICK(rng -> CNG.signatureThick(rng, NoiseType.PERLIN).scale(1.47)),
|
PERLIN_IRIS_THICK(rng -> CNG.signatureThick(rng, NoiseType.PERLIN).scale(1.47)),
|
||||||
|
|
||||||
|
@Desc("Billow Fractal Perlin Noise.")
|
||||||
|
@DontObfuscate
|
||||||
|
FRACTAL_BILLOW_PERLIN(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_PERLIN, 1D, 1).scale(1.47)),
|
||||||
|
|
||||||
|
@Desc("Billow Fractal Perlin Noise. 2 Octaves")
|
||||||
|
@DontObfuscate
|
||||||
|
BIOCTAVE_FRACTAL_BILLOW_PERLIN(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_PERLIN, 1D, 2).scale(1.17)),
|
||||||
|
|
||||||
@Desc("Billow Fractal Simplex Noise. Single octave.")
|
@Desc("Billow Fractal Simplex Noise. Single octave.")
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
FRACTAL_BILLOW_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX, 1D, 1)),
|
FRACTAL_BILLOW_SIMPLEX(rng -> new CNG(rng, NoiseType.FRACTAL_BILLOW_SIMPLEX, 1D, 1)),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user