{"id":13664702,"url":"https://github.com/djorna/terrain-generation","last_synced_at":"2025-04-26T01:33:24.450Z","repository":{"id":224129622,"uuid":"157022737","full_name":"djorna/terrain-generation","owner":"djorna","description":"An implementation of heightmap-based terrain generation algorithms.","archived":false,"fork":false,"pushed_at":"2019-06-02T03:00:49.000Z","size":50531,"stargazers_count":33,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-10T22:39:54.603Z","etag":null,"topics":["c-plus-plus","opencv","paper-implementations","procedural-generation","procedural-terrain","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/djorna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-10T21:23:56.000Z","updated_at":"2024-10-04T15:14:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"d47a8ab3-c365-4096-b422-9822fc8c1c41","html_url":"https://github.com/djorna/terrain-generation","commit_stats":null,"previous_names":["djorna/terrain-generation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djorna%2Fterrain-generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djorna%2Fterrain-generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djorna%2Fterrain-generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djorna%2Fterrain-generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djorna","download_url":"https://codeload.github.com/djorna/terrain-generation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250919710,"owners_count":21507997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus","opencv","paper-implementations","procedural-generation","procedural-terrain","unity3d"],"created_at":"2024-08-02T05:03:04.758Z","updated_at":"2025-04-26T01:33:24.444Z","avatar_url":"https://github.com/djorna.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# Terrain Generation\nTerrain Generation is an implementation of *Realitime Procedural Terrain Generation* for generating mountainous terrain as a C++ library using OpenCV. The program generates random height maps using a combination of midpoint displacement, Voronoi diagrams, simplex noise, thermal erosion, hydraulic erosion, and a custom erosion operation. With a little effort, the heightmap can be imported into Unity3D, Unreal Engine, Gazebo, or any other physics simulation environment to create 3D landscapes.\n\n## References\n**Jacob Olsen: Realtime Procedural Terrain Generation**, University of Southern Denmark, 2004. **[PDF](http://web.mit.edu/cesium/Public/terrain.pdf)**\n\n**Simplex Noise Implementation:** https://github.com/SRombauts/SimplexNoise\n\n## Dependencies\n* OpenCV\n* C++11\n\nRefer to the following sources for instructions on installing OpenCV: [Windows](https://www.learnopencv.com/install-opencv3-on-windows/) and [Ubuntu](https://www.learnopencv.com/install-opencv3-on-ubuntu/).\n\n*Note: Tested on Windows 10 and Ubuntu 16.04, but it should compile on any platform*\n\n## Building\n    mkdir build \u0026\u0026 cd build\n    cmake -DBUILD_TESTS=ON -DBUILD_UNITY=OFF -DBUILDOpenMP=ON ..\n    make -j8\n\n## Running Demos\n\n### Diamond-Square algorithm\n    test_diamond_square 9 0.5 # Diamond-square algorithm with side lengths s = 2^9 + 1 = 513 and persistence = 0.5\n\n![Diamond Square](examples/diamond_square.png)\n\n### Voronoi Diagrams\n\n    test_voronoi -1 1 20 # Voronoi diagram with c_1 =-1, c_2=1, and n_points=50\n\n![Voronoi](examples/voronoi.png)\n\n### Combination\n    test_combine -1 1 20 \n![DiamondSquare and Voronoi Combined](examples/combined.png)\n\n### Perturbation Filter\n    test_perturb 0.1 # Run perturbation with magnitude of 0.1\n\n![Perturbation Filter](examples/perturb.png)\n\n\n### Thermal Erosion\n    test_thermal_erosion 50 # 50 Iterations of thermal erosion\n\n![After Thermal Erosion](examples/thermal_erosion_eroded.png)\n\n### Hydraulic Erosion\n    test_hydraulic_erosion 50 0.1 0.1 0.5 0.1\n\n![After Hydraulic Erosion](examples/hydraulic_erosion_eroded.png)\n\n### Fast Erosion\n    test_fast_erosion 50\n\n![After Fast Erosion](examples/fast_erosion_eroded.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjorna%2Fterrain-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjorna%2Fterrain-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjorna%2Fterrain-generation/lists"}