Procedural Voxel Generation

Hello world !

I’m a noob in procedural generation and i’m trying to make an infinit terrain like Minecraft. I use a noise fonction, but when I generate a chunk, the next chunk… It seems to be a chaotic terrain ! The noise isn’t continous. We can see easily the border of each chunk.
I despair… Can you help me ? This is my noise function :


public void init_noise3D(int seed){
	random = new Random(seed);
	for(int i = 0; i < xsize; i++){
		for(int j = 0; j < ysize; j++){
			for(int k = 0; k < zsize; k++){
				noiseTab3D1[i][j][k] = (float)random.nextDouble();

public float random_noise3D(int i, int j, int k)
    return noiseTab3D[i][j][k]*10;

public static double interpolation_lineaire1D(double a, double b, double x) {
	   return a * (1 - x) + b * x;

public static double interpolation_cos1D(double a, double b, double x) {
	   double k = (1 - Math.cos(x * Math.PI)) / 2;

	   return interpolation_lineaire1D(a, b, k);

public double interpolation_cos3D(double a, double b, double c, double d, double e, double f, double g, double h, double x, double y, double z) {
	// TODO Auto-generated method stub
	double i1 = interpolation_cos1D(a, b, x);
	double i2 = interpolation_cos1D(c, d, x);
	double i3 = interpolation_cos1D(i1, i2, y);
	double i4 = interpolation_cos1D(e, f, x);
	double i5 = interpolation_cos1D(g, h, x);
	double i6 = interpolation_cos1D(i4, i5, y);
	return interpolation_cos1D(i3, i6, z);

public double function_noise3D(double x, double y, double z) {
	   int i = (int) (x / pas);
	   int j = (int) (y / pas);
	   int k = (int) (z / pas);
	   return interpolation_lineaire3D(random_noise3D(i, j, k), random_noise3D(i + 1, j, k), random_noise3D(i, j + 1, k), random_noise3D(i + 1, j + 1, k), random_noise3D(i, j, k+1), random_noise3D(i + 1, j, k+1), random_noise3D(i, j+1, k+1), random_noise3D(i+1, j+1, k+1), (x / pas) % 1, (y / pas) % 1, (z / pas) % 1);


Thank you;


Well you need a continous noise function (perlin noise for example), else you cannot have continous terrain.

So you say I haven’t perlin noise function ? How can I make a perlin noise function ? How can I make an infinite noise function ?
Please help me :slight_smile:

…if only there were a way to search the forum to see if perlin noise had been talked about in detail 50 times already… :wink: