{"id":15550178,"url":"https://github.com/ggerganov/asteroid-generator","last_synced_at":"2025-09-11T01:30:37.466Z","repository":{"id":116326956,"uuid":"101547876","full_name":"ggerganov/asteroid-generator","owner":"ggerganov","description":"The demo generates and renders asteroids floating in space. The shape and the texture of the generated asteroids are procedurally generated. The space background is procedurally generated as well.","archived":false,"fork":false,"pushed_at":"2017-09-03T16:36:32.000Z","size":37,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-03T13:52:17.309Z","etag":null,"topics":["asteroids","computer-graphics","procedural-generation","raytracing","shadows"],"latest_commit_sha":null,"homepage":null,"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/ggerganov.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":"2017-08-27T11:28:52.000Z","updated_at":"2024-09-05T06:24:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"10e3b751-1f88-4f99-9bb7-a10b5cf8740f","html_url":"https://github.com/ggerganov/asteroid-generator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggerganov%2Fasteroid-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggerganov%2Fasteroid-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggerganov%2Fasteroid-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggerganov%2Fasteroid-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggerganov","download_url":"https://codeload.github.com/ggerganov/asteroid-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232581259,"owners_count":18545418,"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":["asteroids","computer-graphics","procedural-generation","raytracing","shadows"],"created_at":"2024-10-02T13:52:15.782Z","updated_at":"2025-01-05T11:43:34.172Z","avatar_url":"https://github.com/ggerganov.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/ggerganov/asteroid-generator.svg?branch=master)](https://travis-ci.org/ggerganov/asteroid-generator?branch=master)\n\n# asteroid-generator\nThe demo generates and renders asteroids floating in space. The shape and the texture of the generated asteroids are procedurally generated. The space background is procedurally generated as well.\n\n\u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=bGKxsXbf358\" target=\"_blank\"\u003e\u003cimg src=\"http://img.youtube.com/vi/bGKxsXbf358/0.jpg\" alt=\"CG++ Data over sound\" width=\"360\" height=\"270\" border=\"10\" /\u003e \u003c/a\u003e\n\n## Features\n\n- Procedurally generated space background with Perlin noise\n- Procedurally generated asteroid shape and texture with Perlin noise\n- Raytracing performed 100% on the CPU using modified “Relaxed Cone Stepping” technique for spherical objects.\n- Hard and Soft (approximation) shadows\n- Terrain and texture mipmapping\n- Frame buffering for stable visualization\n\n## Building \u0026 running\n\n    git clone https://github.com/ggerganov/asteroid-generator\n    cd asteroid-generator\n    make\n    ./bin/asteroid-generator\n    \n### Examples:\n\nChange the **RNG seed** to get different asteroids/background\n\n    ./bin/asteroid-generator 1234\n    \nChange the resolution to **400x400**:\n\n    ./bin/asteroid-generator 1234 400 400 0 0.0 1 1 0 -1 -1 1 0.06 24 1\n    \nIncrease the frame buffer size to **100** frames. Use this in case the frames are rendered faster than the specified Frame Rate. This way the newly generated frames will be buffered in the frame buffer, so they can be displayed later:\n\n    ./bin/asteroid-generator 1234 800 600 100 0.0 1 1 0 -1 -1 1 0.06 24 1\n\nAdd initial buffering time. In the beginning of the execution, the rendered frames will be buffered for **10.0 seconds** before they start being displayed to the user:\n    \n    ./bin/asteroid-generator 1234 800 600 100 10.0 1 1 0 -1 -1 1 0.06 24 1\n    \nReduce antialiasing artifacts by increasing the number of rays per pixel to **2x2 = 4**. This increases significantly the computation time.\n    \n    ./bin/asteroid-generator 1234 800 600 100 0.0 2 2 0 -1 -1 1 0.06 24 1\n    \nIncrease the frame rate to **30 FPS**:\n    \n    ./bin/asteroid-generator 1234 800 600 100 0.0 1 1 0 -1 -1 1 0.06 30 1\n    \nSpeed up the animation by a factor of 2 (i.e. increase time step to **0.12** from 0.06):\n    \n    ./bin/asteroid-generator 1234 800 600 100 0.0 1 1 0 -1 -1 1 0.12 24 1\n    \n## Dependencies\n\n- OpenGL\n- GLUT\n- OpenMP\n    \n## Notes\n\nThe entire computation in the demo is performed on the CPU, therefore it is good to have more cores. I tried running the demo with default parameters on a 16 core machine Intel Xeon E5-2640 @ 2.00 GHz and it runs in real time. In case it does not run in real time on your machine, try increasing the frame buffer size and buffering time from the command line arguments. Another option is reducing the resolution. OpenGL is used only to open a window so I can draw my frames with glDrawPixels to it. No other OpenGL functionality is used.\n\nDuring execution the shape of the asteroid changes periodically. Every time the camera is far from the surface of the asteroid, the shape of the asteroid is re-generated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggerganov%2Fasteroid-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fggerganov%2Fasteroid-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggerganov%2Fasteroid-generator/lists"}