Guia completo para criar um sistema procedural voxel avançado.
Chunks ↓ Noise Base ↓ Heightmaps ↓ Continentes ↓ Biomas ↓ Montanhas ↓ Domain Warping ↓ Cavernas ↓ Floating Islands ↓ Estruturas ↓ Vegetação ↓ Renderização ↓ Streaming ↓ Otimização
Entender os conceitos base.
[x][y][z]
16x16x256
32x32x256
blocks[x][y][z]
chunkX = floor(worldX / CHUNK_SIZE) chunkZ = floor(worldZ / CHUNK_SIZE)
height = noise(x, z)
height = noise(x * scale, z * scale)
Controla o tamanho das formações.
Controla altura das formações.
Scale pequena: 0.001 → Continentes gigantes
Scale grande: 0.1 → Terreno caótico
Grande + Médio + Pequeno
double total = 0;
double amplitude = 1;
double frequency = 0.01;
for(int i = 0; i < octaves; i++) {
total += noise(x * frequency, z * frequency) * amplitude;
amplitude *= 0.5;
frequency *= 2;
}
value = 1 - abs(noise); value *= value;
warpX = noise(...) warpZ = noise(...) height = noise(x + warpX, z + warpZ)
continental = noise(x * 0.0005, z * 0.0005)
temperature = noise(...) humidity = noise(...) erosion = noise(...)
if(temp > 0.7 && humidity < 0.3)
desert
grass dirt stone deepstone bedrock
noise(x, y, z)
if(cave > threshold)
removeBlock()
density(x,y,z)
density -= yFalloff
Para árvores avançadas.
Chunks
Mundo básico
OpenSimplex
Heightmaps
FBM
Ridged Noise
Domain Warp
Continentes
Biomas
Layers
Cavernas
Floating Islands
Estruturas
Vegetação
Mesh Generation
Greedy Meshing
Lighting
Streaming
Multithreading
Otimização
Erosão
Conteúdo RPG
Sistemas avançados
https://github.com/Auburn/FastNoiseLite
https://www.shadertoy.com
https://iquilezles.org/articles/fbm/
https://iquilezles.org/articles/warp/
Mundos voxel NÃO são um algoritmo.
Eles são dezenas de sistemas proceduralmente conectados.