{"id":16130117,"url":"https://github.com/aromanro/raytracer","last_synced_at":"2025-04-11T22:21:34.720Z","repository":{"id":41243506,"uuid":"153175573","full_name":"aromanro/RayTracer","owner":"aromanro","description":"A ray tracing program","archived":false,"fork":false,"pushed_at":"2024-06-22T13:39:51.000Z","size":27363,"stargazers_count":133,"open_issues_count":4,"forks_count":17,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-25T18:16:41.277Z","etag":null,"topics":["3d","3d-graphics","3d-models","optics","ray-tracer","ray-tracing","raytracer","raytracing","raytracing-one-weekend","raytracing-render","wxwidgets","wxwidgets-applications"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aromanro.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}},"created_at":"2018-10-15T20:14:28.000Z","updated_at":"2025-03-17T11:47:49.000Z","dependencies_parsed_at":"2024-02-07T10:39:57.437Z","dependency_job_id":null,"html_url":"https://github.com/aromanro/RayTracer","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/aromanro%2FRayTracer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aromanro%2FRayTracer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aromanro%2FRayTracer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aromanro%2FRayTracer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aromanro","download_url":"https://codeload.github.com/aromanro/RayTracer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487664,"owners_count":21112191,"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":["3d","3d-graphics","3d-models","optics","ray-tracer","ray-tracing","raytracer","raytracing","raytracing-one-weekend","raytracing-render","wxwidgets","wxwidgets-applications"],"created_at":"2024-10-09T22:14:34.171Z","updated_at":"2025-04-11T22:21:34.682Z","avatar_url":"https://github.com/aromanro.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RayTracer\nA ray tracing program\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/6239998adab74af4b4fd41f3de9f2439)](https://app.codacy.com/gh/aromanro/RayTracer?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=aromanro/RayTracer\u0026utm_campaign=Badge_Grade_Settings)\n[![CodeFactor](https://www.codefactor.io/repository/github/aromanro/raytracer/badge)](https://www.codefactor.io/repository/github/aromanro/raytracer)\n\nMainly based on 'Ray Tracing' books from Peter Shirley: http://in1weekend.blogspot.com/2016/01/ray-tracing-in-one-weekend.html\nI skipped the boring (for me) texture generation part and also the motion bluring, I preffered to go further enhancing the materials and loading obj files.\n\nSome more info is on Computational Physics Blog: https://compphys.go.ro/ray-tracing/\n\nSome papers that were used:\n\n'An Anisotropic Phong BRDF Model' by Michael Ashikhmin and Peter Shirley\nhttps://www.cs.utah.edu/~shirley/papers/jgtbrdf.pdf\n\nOsada et All, 'Shape Distributions'\nhttp://www.cs.princeton.edu/~funk/tog02.pdf\n\n'Fast, minimum storage ray-triangle intersection'\nTomas Möller and Ben Trumbore. \nJournal of Graphics Tools, 2(1):21--28, 1997. \nhttp://www.graphics.cornell.edu/pubs/1997/MT97.pdf\n\nThe project has some known issues, for example loading an object from an obj file does not split correctly concave polygons, they must be convex (unless you are lucky). See the code for how that could be fixed.\nAlso importance sampling with composite objects has some issues. I know why they occur and how it could be solved, but I don't have enough patience for those changes right now :)\n\nObj loader is very basic, it seems to work for some cases.\n\nAn animation generated with the program:\n\n[![Program video](https://img.youtube.com/vi/3Q8dKi9WyLM/0.jpg)](https://youtu.be/3Q8dKi9WyLM)\n\nSome images obtained while implementing it:\n\nFirst, with more recent code, an obj that has specular mapping and a normal/bump map:\n\n![Screenshot](img/bump.png)\n\nAfter the first book, 'Ray Tracing in one weekend':\n\n![Screenshot](img/RayTracing4000spp.png)\n\nWith local illumination, depth of field and textures:\n\n![Screenshot](img/LocalIllumination.png)\n\nThe Cornell box (during the 'next week' book):\n\n![Screenshot](img/CornellBox.png)\n\nAdding triangles, already beyond the 'rest of your life' book:\n\n![Screenshot](img/triangle.png)\n\nAdding Beer-Lambert law for transparent objects:\n\n![Screenshot](img/BeerLambert.png)\n\nThe first obj file loaded in the Cornell box:\n\n![Screenshot](img/monkey.png)\n\nMaking it transparent:\n\n![Screenshot](img/transparentmonkey.png)\n\nTrying some other obj models:\n\n![Screenshot](img/car.png)\n\nNow together with colors/textures:\n\n![Screenshot](img/indian.png)\n\nImplementing the Phong model:\n\n![Screenshot](img/Phong.png)\n\nTrying it on a model, exponents are too high:\n\n![Screenshot](img/IndianPhong.png)\n\nMore testing:\n\n![Screenshot](img/carphong.png)\n\nAnd some new model for testing the features:\n\n![Screenshot](img/newcarphong.png)\n\nImages generated while fixing some bugs in models loaded from obj files:\n\n![Screenshot](img/metallic_angel.png)\n\n![Screenshot](img/glass_angel.png)\n\nAnd one after some later changes, when I also added procedural textures:\n\n![Screenshot](img/marble.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faromanro%2Fraytracer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faromanro%2Fraytracer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faromanro%2Fraytracer/lists"}