Comments (6)
In the NoiseTool the default setting is any value >= 0 is solid
You can see the generated min/max values and change the isosurface value in the debug window
from fastnoise2.
Mmm that's weird cause I am getting a very weird result (https://prnt.sc/XPb80X4USDDK). The max value that I get from the NoiseTool is a 0.02, almost all the values are negative.
For the sampling I am using fnGenSingle3D and iterating each block of a cube (16x16x256) , it's not efficient but I'm just doing some tests.
Is there any detailed documentation for the parameters of the Gen* functions (grid, single, etc)?
FastNoise2.INSTANCE.fnGenSingle3D(caveNoise, chunkX*16+x.toFloat(), y.toFloat(), chunkZ*16+z.toFloat(), seed)
Just for reference, I made a binding using JNA, it works fine but maybe I understood the parameters wrong.
from fastnoise2.
Sorry I got that the wrong way round, value >= 0 is air.
Max is only 0.02 to keep the cave sizes smaller, you can change this by adjusting the Subtract node.
from fastnoise2.
Hi, thanks for replying so quickly.
I tried that but the result it's the inverse of what you see in the picture (the holes are now filled and viceversa).
At this point I am wondering if I am using the generator functions correctly.
Given a cube X * Y * Z of size 1625616, running the following code
for(int x = 0; x < 16; x++){
for(int y = 0; y < 256; y++) {
for(int z = 0; z < 16'; z++) {
bool isCave = fnGenSingle3D(caveNoise, x, y, z, seed) >= 0f
... store result ...
}
}
}
it should give me a coherent list of coordinates that form up a cave.
I also tried a simple terrain generation tree and instead of sampling each 2D coordinate I tried using GenUniformGrid2D; I tried generating two chunks, which means I run the following code:
int chunkX = 0, chunkZ = 0;
float[] chunk1 = fnGenUniformGrid3D(chunkNoise, arrayPointer, chunkX*16, 0, chunkZ*16,16, 256, 16, 0.1f, seed, null)
int chunkX = 1, chunkZ = 0;
float[] chunk2 = fnGenUniformGrid3D(chunkNoise, arrayPointer, chunkX*16, 0, chunkZ*16,16, 256, 16, 0.1f, seed, null)
In that case the surface of the terrain is coherent (meaning it doesn't make any weird jump) only inside the same chunk, making highly noticeble the connection between the two chunks.
When using UniformGrid how do I specify the steps it makes with the coordinates? If x is 0 and xSize is 16, what does it use a step for reaching the required size? 1? Or does it use the frequency parameter?
I also wanted to describe the issue with the terrain generation cause everything is problably related to how I am using the APIs given I couldn't find any documentation.
from fastnoise2.
It's likely caused by you indexing the noise array using the incorrect axis, in your first code block above your for loops go x, y, z when it should be z, y, x. Have a look at the example code on the wiki.
As for the cave noise, I'd guess the issue is somewhere else in your code, what you have posted looks correct.
from fastnoise2.
Got the cave noise to work using GenUniformGrid instead of GenSingle3D. Weird tough
from fastnoise2.
Related Issues (20)
- OpenSimplex2 4th Dimension HOT 3
- View zoom in Node Editor HOT 3
- Where to put ImGui when building noisetool HOT 2
- CMake with MSVC setup for debug mode HOT 2
- Compile on macOS ARM doesn't produce binary HOT 2
- GenUniformGrid2D scaled xstart and ystart
- Issues Using on Windows HOT 10
- Is there C bindings? HOT 4
- Could there be a way to get both the value and the gradient? HOT 2
- What do I use the voxel tool for? HOT 1
- Could there or is there a way to get the maximum and minimum possible returned value for a node tree HOT 1
- Does library has 1D noise? HOT 1
- DistanceToPoint NaN at (0,0) HOT 2
- API Documentation / best place to search for in source code HOT 1
- FastNoise2 asserts without RTTI HOT 19
- FastNoise2 is taking more time to generate a 2D grid than FastNoiseLite HOT 2
- Crash when using c# bindings HOT 4
- What does node performance measure? HOT 1
- Thread safety crash when launching noises from background thread. HOT 1
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 fastnoise2.