Closed steampixel closed 3 years ago
I did not know I had to do that. You are free to fork this project.
Hey @EthanHermsey this is not a "must have". This is just about legal things. With a license like MIT or AGPLv3 for example others can use your code within their own software without asking you for permission for every single use case. The license describes what is and what is not allowed with your code. For example if I wanted to make my fork of your code available under the MIT license to others, I can only do that if your code is also licensed under MIT. Licensing makes sharing and collaborating easier and leads to the fact that projects will survive longer. Also pull requests will only make sense if a contributor knows how the contribution will be licensed in future.
Thank you for that explanation! It's really clear. I wanted to give you pointer on how the code works on 2 awkward parts.
The first is how the chunkController positions the mesh:
this.terrainMesh.position.x += this.offset.x * ( gridSize - this.chunkOverlap ) * gridScale;
this.terrainMesh.position.z += this.offset.z * ( gridSize - this.chunkOverlap ) * gridScale;
Netmesh's and dual contouring meshes are notoriously hard to combine with chunks because the points on the edge of the grid are not really connected to anything. There are a few solutions; skirts, stitching or, in my case, smushing the chunks together. The drawback of this is that it's possible to see the hard edges between chunks. However, from experience I can say that it's not a very big deal if you have grass or other ground clutter on the surface. http://ngildea.blogspot.com/2014/09/dual-contouring-chunked-terrain.html
The other is when the playerController checks for 'visible chunks' or adjusts terrain, it adds the chunks to a global object 'createNewChunks' and 'updateChunks' respectively. Then in the draw loop, every 0.2 seconds it updates and removes the first chunk in those lists.
OK thank you for this intro! I think this technology is a nice way to build some kind of sandbox games other than voxels. I want to find a solution for using multiple textures with this kind of net meshes. I think the https://threejs.org/examples/webgl_decals.html could be a nice try. But at first I will try to understand and simplify your code. I already managed to remove the p5 library to minimize dependencies and complexity.
Ha yeah :p and it's so fast too! http://basis64.nl/nature/ That's what I had been working on for a couple of weeks.. It's code is not neat at all and it's not in a great state, I was experimenting with lod chunks, it loads a bit too slow atm. Testing out triplanar shading, generative rocks/cliffs, surface scatter vegetation and working with instanced meshes.
What the hell? This is fuckin impressive :-) I can play this between 30 and 35 FPS. Wow
It would be nice if you could add a license to this repo. So others could start fork and contribute code to it.