New answers tagged

1

It seems each time you call getHeight(x,z) you get different results, regardless of whether the (x,z) is the same or not, so the generated normals don't match the terrain surface. Normals will match the actual terrain if you compute them from the generated terrain, and not from what getHeight returns. However, it makes sense to also fix getHeight so it ...


0

You appear to be writing your vertices in a straight line. That is, vertex0 has position (0,0,0). vertex1 has position (-6,0,0). vertex2 has position (-12,0,0). vertex3 has position (-18,0,0), and so on. Once you've finished all 128 vertices along one strip, you move back to the start and then specify vertex128 (0,0,-6). (and then (-6,0,-6), ...


-2

Thanks to some of the above comments I did find my answer. I forgot to post my answer, but I thought I would go ahead and add it for anyone who is curious. I recommend looking at the original algorithm and also the above mentioned link to explain the general idea. I chose to use three-dimensional Perlin Noise (by Ken Perlin originally). This is a smooth ...


0

You can use RLE. But you can use SVO (Sparse Voxel Octree), id Tech 6 uses SVO. A SVO is a 3D computer graphics rendering technique using a raycasting or sometimes a ray tracing approach into an octree data representation. The technique varies somewhat, but generally relies on generating and processing the hull of points (sparse voxels) which are visible ...


0

Don't copy and paste the cubes by hand. Create one cube for each block-type you have, make them into prefabs, and then write a script which Instantiates your cube prefabs over and over again when the game starts. Here is a small example script to get you going. It will spawn a 10x10x10 block of the prefab you assign to it. using UnityEngine; public class ...



Top 50 recent answers are included