{"id":16250935,"url":"https://github.com/jingwood/raygen-renderer","last_synced_at":"2025-03-19T20:30:24.550Z","repository":{"id":153075718,"uuid":"228854037","full_name":"jingwood/raygen-renderer","owner":"jingwood","description":"A simple cross-platform ray tracing engine for 3D graphics rendering.","archived":false,"fork":false,"pushed_at":"2024-10-03T04:08:38.000Z","size":24415,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T10:21:27.597Z","etag":null,"topics":["3d","cpp","cross-platform","engine","graphics","path-tracing","ray","ray-tracing","raytracer","renderer","rendering","tracing"],"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/jingwood.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":"2019-12-18T14:11:38.000Z","updated_at":"2024-10-03T04:08:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"8bd4a521-1e7b-4a5a-bf25-15e9d091969a","html_url":"https://github.com/jingwood/raygen-renderer","commit_stats":{"total_commits":70,"total_committers":2,"mean_commits":35.0,"dds":"0.042857142857142816","last_synced_commit":"c800f2436621c04300d96bc466a30c9569264476"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jingwood%2Fraygen-renderer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jingwood%2Fraygen-renderer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jingwood%2Fraygen-renderer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jingwood%2Fraygen-renderer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jingwood","download_url":"https://codeload.github.com/jingwood/raygen-renderer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244501067,"owners_count":20462790,"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","cpp","cross-platform","engine","graphics","path-tracing","ray","ray-tracing","raytracer","renderer","rendering","tracing"],"created_at":"2024-10-10T15:07:51.918Z","updated_at":"2025-03-19T20:30:19.541Z","avatar_url":"https://github.com/jingwood.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RayGen Renderer\n\nA simple, cross-platform ray tracing engine for 3D graphics rendering.\n\n# Snapshots\n\n![cube room](resources/scenes/cubeRoom/sample.jpg)\u003cbr /\u003e\nCube Room\n\n![cube room](resources/scenes/cubeRoom/cubeRoom_reflection.jpg)\u003cbr /\u003e\nCube Room (Reflection Version)\n\n![sphere array](resources/scenes/sphereArray/sample.jpg)\u003cbr /\u003e\nSpheres \u0026 Materials\n\n![suzanne](resources/scenes/suzanne/Suzanne%20Texture.jpg)\u003cbr /\u003e\nSuzanne (Glass)\n\n![suzanne](resources/scenes/suzanne/Suzanne%20Jade.jpg)\u003cbr /\u003e\nSuzanne (Jade)\n\n![real life application](resources/images/live-office1.png)\u003cbr /\u003e\nA real-life application: Office Rendering\n\n![real life application top view](resources/images/live-office1-top.png)\u003cbr /\u003e\nA real-life application: Office Rendering (Top View)\n\n# Build \n\nThe following build scripts and projects are available in this repository:\n\n| Platform | Folder | Build tool |\n|---|---|---|\n| macOS (Intel) | build/mac-intel | GNU Make |\n| macOS (Apple Silicon) | build/mac-m | GNU Make |\n| macOS | projects/raygen.xcodeproj | Xcode |\n| Linux | build/linux | GNU Make |\n| Windows | projects/raygen-win32/raygen.sln | Visual Studio |\n\nExample of using GNU Make on Linux and macOS platforms:\n\n```shell\ncd build/\u003cplatform\u003e\nmake\n```\n\n# Usage\n\n```shell\n$ ./raygen \u003ccommand\u003e \u003csceneFile.json\u003e [output_image] [-options]\n```\ne.g.:\n```shell\n$ ./raygen render ../../resources/scenes/cubeRoom/cubeRoom.json -s 100 -enaa true\n```\n\n## Options\n\n| Option | Description |\n| --- | --- |\n| -r, --resolution | Specifies the resolution of the output image. |\n| -s, --samples | Number of samples (rays from the camera). |\n| -c, --cores, --threads | Number of threads used for parallel rendering. |\n| -ds, --dofs, --dof-samples | Number of samples for depth of field calculation. |\n| -enaa, --enable-antialias | Enables ray-sample-based anti-aliasing (default: on). |\n| -encs, --enable-color-sampling | Enables color sampling from textures (default: on). |\n| -enpp, --enable-postprocess | Enables post-processing effects like bloom and gamma correction. |\n| -d, --shader | Specifies the shading system (see below for options). |\n| --focus-obj | Automatically sets the camera to focus on a specified object (by name). |\n| --dump | Dumps the scene definition. |\n\nShading system: (specified by `-d` or `--shader` argument)\n\n| Value | Name | Description |\n|---|---|---|\n| 0 | Simple Shading | Basic shading using Lambertian reflectance (no lighting or texture sampling). |\n| 1 | Ambient Occlusion | Renders ambient occlusion only. | \n| 2 | Lambert Shading | Lambert shading with directional lighting and texture sampling. |\n| 3 | Lambert Shading + AO | Lambert shading with directional lighting, texture sampling, and ambient occlusion. |\n| 4 | (Reserved) | |\n| 5 | BSDF | BSDF Shading with global illumination (default shading system). |\n\nShading system comparison:\n\n| Value | Name | Directional Lighting | Indirect Lighting | Ambient Occlusion | Global Illumination | Transparency | Reflection/Refraction | \n|---|---|:---:|:---:|:---:|:---:|:---:|:---:|\n| 0 | Simple Shading | - | - | - | - | - | - |\n| 1 | Ambient Occlusion | - | - | Yes | - | - | - |\n| 2 | Lambert Shading | Yes | - | - | - | Yes | - |\n| 3 | Lambert Shading + AO | Yes | - | Yes | - | Yes | - |\n| 4 | (Reserved) | | | | | | |\n| 5 | BSDF | Yes | Yes | Yes | Yes | Yes | Yes |\n\n## Scene Format\n\nA RayGen scene is described using a JSON file structured as follows:\n\nscene.json:\n```js\n{\n  obj1: {\n    location: [x, y, z],\n    angle: [x, y, z],\n    scale: [x, y, z],\n    mesh: \"path/to/mesh.mesh\",\n    mat: {\n      color: [r, g, b] or \"#d0d0d0\",\n      tex: \"path/to/texture.png\",\n      glossy: 0.0 to 1.0,\n      roughness: 0.0 to 1.0,\n      transparency: 0.0 to 1.0,\n      refraction: 0.0 to 1.0,\n      ...,\n    }\n  },\n  obj2: {\n    ...\n  },\n  ...\n}\n```\n\nDescription:\n\n- `location`: Specifies the position of the object in 3D space.\n- `angle`: Rotation of the object along the x, y, and z axes.\n- `scale`: Scaling factors for the object along the x, y, and z axes.\n- `mesh`: Path to the object's mesh file.\n- `mat`: Material properties of the object:\n  - `color`: RGB color values or a hexadecimal color code (e.g., \"#d0d0d0\").\n  - `tex`: Path to the texture file.\n  - `glossy`: Glossiness level, ranging from 0 (no gloss) to 1 (fully glossy).\n  - `roughness`: Surface roughness, ranging from 0 (smooth) to 1 (rough).\n  - `transparency`: Transparency level, ranging from 0 (opaque) to 1 (fully transparent).\n  - `refraction`: Refraction index, ranging from 0 to 1.\n\n# Mesh File Formats\n\nRayGen supports the following mesh file formats:\n\n- **RayGen Original Binary Mesh Format**: This format includes the mesh's data such as vertices, normals, texture coordinates, and more.\n- **.obj File Format**: A widely-used 3D object file format. RayGen can read vertices, normals, faces, texture coordinates, and material information from .obj files.\n- **FBX File Format**: Currently not supported but under development.\n\n# Test Scenes\n\nSeveral sample scenes for rendering can be found inside the `resources/scenes` folder:\n\n- **Cube Room** - A well-known scene featuring two cubes, commonly used to benchmark ray-tracing engines.\n- **Sphere Array** - A scene with five spheres demonstrating various material types.\n- **suzanne** - The Suzanne model, used to showcase transparency and refraction materials.\n\n# Dependency modules\n\nThe following modules are required to build this software and can be found in the `/inc` folder as git submodules:\n\n- C++ Common Module (https://github.com/jingwood/cpp-common-class)\n- C++ Graphics Module (https://github.com/jingwood/cpp-graphics-module)\n\n# License\n\nReleased under the MIT License.\n\nCopyright © Jingwood, unvell Inc. All Rights Reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjingwood%2Fraygen-renderer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjingwood%2Fraygen-renderer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjingwood%2Fraygen-renderer/lists"}