Comments (9)
from webgl-noise.
from webgl-noise.
from webgl-noise.
from webgl-noise.
As you can see in the last image at the end of this comment, the values jump when the position crosses certain planes.
The jump is small, so it might only be visible when magnifying the the noise function by about a thousand.
This issue might not be visible when using the function as a source for color information or similar,
but it can show up as a very visible jump in some applications like isosurface generation for terrain.
At least when using the function as a base layer to generate large scale structures like mountains or large caverns in 3d.
Please let me know if you can reproduce the issue.
Following is a standalone shader that produces the images below.
Comment out the blocks other than the one you want to see.
Note: When you zoom in on the [A] image you can see that this shows up in
lots of places.
//#include "noise3D.glsl"
void main () {
vec2 pos = gl_FragCoord.xy - vec2(700.0);
//// [A] Shows the discontinuity as a clearly visible lines in the derivative, even visible in multiple places
//pos /= 400.0;
//float val = snoise(vec3(pos, 0.0) + vec3(300, -300, -300));
//
//float dx = dFdx(val * 100);
//float dy = dFdy(val * 100);
//frag_col = vec4(dx, dy, 0.0, 1.0);
////
//// [B] Same as above but zoomed in to one of the 'crosses' I also see in my raymarcher
//pos += vec2(900.0, -1000.0);
//pos /= 2000.0;
//float val = snoise(vec3(pos, 0.0) + vec3(300, -300, -300));
//
//float dx = dFdx(val * 100);
//float dy = dFdy(val * 100);
//frag_col = vec4(dx, dy, 0.0, 1.0);
////
//// [C] Visualized without the derivative
pos += vec2(900.0, -1000.0);
pos /= 2000.0;
float val = snoise(vec3(pos, 0.0) + vec3(300, -300, -300));
val -= 0.403;
val *= 300.0;
frag_col = vec4(val, val, val, 1.0);
////
}
Edit: Deleted previous comment because typing it in gmail made it not have formatting.
from webgl-noise.
Indeed 0.5 fixes it on first inspection.
As far as I can tell your repo also uses 0.6 on that line.
I'm going to keep that line changed in my cope for now.
Anyway thanks for the quick reply.
from webgl-noise.
I guess I should keep this issue open until the code in this repo is changed.
from webgl-noise.
from webgl-noise.
At long last, I got around to fixing this issue in both repos (ashima/webgl-noise and stegu/webgl-noise) for both versions affected (noise3D.glsl and noise3Dgrad.glsl). Note that the change from 0.6 to 0.5 affects the range of output values, so I had to tweak the arbitrary final scaling factor as well, to cover the range [-1, 1] reasonably well.
Closing the issue.
from webgl-noise.
Related Issues (20)
- 3D simplex noise exhibiting spacial artifacts not found in 2D simplex noise HOT 30
- Ugly artifacts in 2d simplex HOT 5
- Gradient to 3D Simplex Noise HOT 7
- Question: offsetting / seeding noise2D.glsl . HOT 1
- Periodicity along diagonal HOT 6
- Mention the range somewhere HOT 2
- Texture-intensive noise implementations HOT 4
- Period z is ignored for float pnoise(vec3 P, vec3 rep) HOT 5
- webgl HOT 2
- 6D noise HOT 2
- Making perturbed normal bumps HOT 15
- Problems in Safari iOS on mediump HOT 25
- Use of implementation in art project HOT 10
- pnoise is not repeating HOT 3
- Linker flags in Linux makefiles HOT 2
- Procedural Focal Points HOT 3
- demo fails to build on OS X HOT 4
- How to get the noise value in [0, 1] HOT 3
- Seeds HOT 35
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webgl-noise.