{"id":24088120,"url":"https://github.com/time4tea/raytrace-in-a-weekend-kotlin","last_synced_at":"2026-03-13T19:06:02.401Z","repository":{"id":145031280,"uuid":"164259748","full_name":"time4tea/raytrace-in-a-weekend-kotlin","owner":"time4tea","description":"A copy of the code from  https://github.com/petershirley/raytracinginoneweekend made in kotlin","archived":false,"fork":false,"pushed_at":"2021-01-03T19:18:56.000Z","size":6314,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T21:46:09.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/time4tea.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,"zenodo":null}},"created_at":"2019-01-05T23:32:57.000Z","updated_at":"2023-06-01T04:33:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"887a5301-0519-448b-8de4-23d5df253d20","html_url":"https://github.com/time4tea/raytrace-in-a-weekend-kotlin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/time4tea/raytrace-in-a-weekend-kotlin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/time4tea%2Fraytrace-in-a-weekend-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/time4tea%2Fraytrace-in-a-weekend-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/time4tea%2Fraytrace-in-a-weekend-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/time4tea%2Fraytrace-in-a-weekend-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/time4tea","download_url":"https://codeload.github.com/time4tea/raytrace-in-a-weekend-kotlin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/time4tea%2Fraytrace-in-a-weekend-kotlin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30472989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T17:15:31.527Z","status":"ssl_error","status_checked_at":"2026-03-13T17:15:22.394Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2025-01-10T03:58:22.359Z","updated_at":"2026-03-13T19:06:02.383Z","avatar_url":"https://github.com/time4tea.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raytrace In A Weekend\n\n## In Kotlin\n\nThis is a pretty direct translation of https://github.com/petershirley/raytracinginoneweekend into kotlin.\n\nAny bugs are my own.\n\nPlease feel free to copy / change / fork / raise issues as you see fit.\n\n## Intel Open Image Denoise\n\nThe program incorporates the Open Image Denoise library, so the \"denoised\" versions are real output from this renderer.\n\n## Example\n\n### Cornell Box\n\nRenders in 1.8 seconds, 20spp\n\nDenoised\n\n![Example](example-output/example-cornellbox-denoised.png)\n\nRaw renderer output\n\n![Example](example-output/example-cornellbox-rendered.png)\n\n### Weekend Final Image\n\nThe below example is rendered with 2 samples/pixel, then loaded into Intel Open Image Denoise,\nand renders in 0.3 seconds.\n\n![Example](example-output/example1.png)\n\nHere is the rendered output, before denoise\n\n![Example](example-output/example2.png)\n\n### Week Final Image\n\nThe  Final, with *20* samples per pixel, renders in 12s, and gives the following output:\n\nDenoised\n\n![Example](example-output/example-weekfinal-denoised.png)\n\nRaw render output\n\n![Example](example-output/example-weekfinal-rendered.png)\n\n\n\n### Notes about the code\n\n- Uses Intel Open Image Denoise (oidn) Library to improve quality of scenes (via https://github.com/time4tea/oidnjni)\n- Uses Kotlin Co-routines for rendering in parallel, seems fairly effective\n- Uses Kotlin-Scripting for allowing dynamically-reloading scenes that can be edited while the code is running\n- Has an interactive mode: use Cursor-Keys, `+`/`-` to move camera, and `1`/`2` to dec/inc number of samples, `s` to save image\n\n### Changes from \"Raytrace In a Weekend\"\n- Some stylistic changes for Kotlin (e.g. Hitable -\u003e Hit? )\n- Most things immutable, e.g. colours are the sum of the samples, not modified in place\n- Uses x,y,z rather than an array for `Vec3`\n- Added Triangle Primitive\n- Added `.obj` file loading (poorly)\n- Used BVH for Box\n\n### Main Programs\n\n- Raytrace.kt - render a scene\n- ControllableRaytrace.kt - render a scene and move around it\n- DynamicRaytrace.kt - render a scene, which can be modified while program is running\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftime4tea%2Fraytrace-in-a-weekend-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftime4tea%2Fraytrace-in-a-weekend-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftime4tea%2Fraytrace-in-a-weekend-kotlin/lists"}