{"id":21354717,"url":"https://github.com/iveevi/tranquil","last_synced_at":"2025-10-13T16:16:47.598Z","repository":{"id":132435338,"uuid":"513222732","full_name":"iveevi/tranquil","owner":"iveevi","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-01T23:26:24.000Z","size":780,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-13T16:16:47.388Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iveevi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-07-12T16:52:17.000Z","updated_at":"2022-11-06T20:40:55.000Z","dependencies_parsed_at":"2025-01-22T17:44:54.349Z","dependency_job_id":"6f754796-b329-4436-845c-d292728e8f27","html_url":"https://github.com/iveevi/tranquil","commit_stats":null,"previous_names":["iveevi/tranquil"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iveevi/tranquil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iveevi%2Ftranquil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iveevi%2Ftranquil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iveevi%2Ftranquil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iveevi%2Ftranquil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iveevi","download_url":"https://codeload.github.com/iveevi/tranquil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iveevi%2Ftranquil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016063,"owners_count":26085799,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-22T04:14:20.147Z","updated_at":"2025-10-13T16:16:47.582Z","avatar_url":"https://github.com/iveevi.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tranquil\n\nTranquil is a relaxing simulation of complex effects like caustics, clouds, water, and wind. It is written in C++ and uses OpenGL for rendering.\n\nThis project intends to explore many other effects. However, the current `main` branch will no longer be maintained. Please see the new `rust` branch for more active development.\n\nSee a short video of the current state of the project [here](https://www.youtube.com/watch?v=eTDaw-ayivQ).\n\n# Running\n\nThe project is built with [smake](https://github.com/vedavamadathil/smake). Once `smake` has been installed in your system, simply run `smake main -j [THREADS]` and the executable will be built and run.\n\n# Details\n\nVideo demo above has a relatively low resolution; this was intended as an artistic choice. In the end, I want to achieve a pretty simulation which is visually pleasing and complex at the same time.\n\nThe rendering is done using raytracing through GLSL shaders. To reduce the cost of rendering and keeping the simulation somewhat pleasing to watch, the resolution is divided in two in both dimensions (so every ray cast will correspond to 4 pixels).\n\nThe current features are listed below.\n\n* **Basic mesh rendering:** uses standard BVHs to accelerate ray intersection tests.\n* **Height map:** generated with 2D Perlin noise, and raytraced with a simple, but error-prone, ray marching algorithm.\n* **Grass:** there are actually two ways grass is shown and simulated\n  * **Height map offset:** an additional, higher frequency layer of Perlin noise is added to the height map to emulate grass.\n  * **Bezier curves:** individual grass blades are parametrized by quadratic bezier curves, and rendered using a standard ray intersection test. By itself this is a very intensive task -- beware when trying for yourself! To improve performance a bit these blades are reduced to a simple line when they are far enough from the camera.\n* **Wind:** Also depends on a Perlin noise map. Random velocities are generated per time step, and the map is updated accordingly. The wind is then applied to the grass blades.\n* **Water:** Convincing water waves are generated by sliding independent normal textures across the water surface -- water is currently a flat place.\n* **Clouds:** Currently based on a 2D Perlin noise map. The clouds are rendered by splatting them onto a rectangle in the sky (I know, not very realistic). The clouds cast shadows onto the ground, and move according to the wind velocities.\n* **Sun:** moves in a circle around the scene, and casts shadows on the terrain. Though simple, it adds a lot of realism to the scene.\n\nA major inspiration for this project is t3ssel8r's [YouTube channel](https://www.youtube.com/c/t3ssel8r). I highly recommend checking it out.\n\n# References\n\nThese are somewhat arbitrary, but interesting nonetheless.\n\n* http://manao.inria.fr/perso/~ihrke/Publications/i3d08_lowres.pdf\n* https://gfx.cs.princeton.edu/pubs/Gerstner_2012_PIA/Gerstner_2012_PIA_full.pdf","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiveevi%2Ftranquil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiveevi%2Ftranquil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiveevi%2Ftranquil/lists"}