Thanks guys,
Will take a look at the code ;D
Mike - height=SimplexNoise.noise(x,y); the x and y, taking it I store the height inside an array
and then render?
I do this:
int voxelHeights[] = new int[xAmount * zAmount]; // used to store amount of voxels on y
and in render:
int index = 0;
for(int x = 0; x < this.xAmount; x++)
{
for(int z = 0; z < this.zAmount; z++)
{
for(int y = 0; y < voxelHeights[index]; y++)
{
glTranslatef(x,y,z);
glCallList(voxelList);
glTranslatef(-x,-y,-z);
}
index++;
}
}
At the moment, I use random value for height:
private void generateWorld() {
Random randomGenerator = new Random();
for (int heights = 0; heights < xAmount * zAmount; heights++) {
int height = randomGenerator.nextInt(16);
if(height == 0) height = 1;
voxelHeights[heights] = height;
}
}
So I’m guessing that I need to put the simplex noise in my generateWorld method?
Thanks again, really appreciate your advice.
Steve