{"id":22389463,"url":"https://github.com/adrien-ben/gltf-viewer-rs","last_synced_at":"2025-04-09T12:08:07.486Z","repository":{"id":37634358,"uuid":"173430454","full_name":"adrien-ben/gltf-viewer-rs","owner":"adrien-ben","description":"glTF 2.0 file viewer written in Rust using Vulkan","archived":false,"fork":false,"pushed_at":"2025-02-07T12:10:08.000Z","size":28772,"stargazers_count":80,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T11:01:40.982Z","etag":null,"topics":["gltf2","rust","vulkan"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/adrien-ben.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":"2019-03-02T09:48:07.000Z","updated_at":"2025-03-14T09:48:18.000Z","dependencies_parsed_at":"2024-05-09T14:48:22.323Z","dependency_job_id":"feac04aa-bddd-4be6-9518-1c8ed4db446a","html_url":"https://github.com/adrien-ben/gltf-viewer-rs","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/adrien-ben%2Fgltf-viewer-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrien-ben%2Fgltf-viewer-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrien-ben%2Fgltf-viewer-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrien-ben%2Fgltf-viewer-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrien-ben","download_url":"https://codeload.github.com/adrien-ben/gltf-viewer-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036067,"owners_count":21037092,"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":["gltf2","rust","vulkan"],"created_at":"2024-12-05T03:12:00.858Z","updated_at":"2025-04-09T12:08:07.464Z","avatar_url":"https://github.com/adrien-ben.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gltf-viewer-rs\n\nThis project is a [glTF 2.0][0] viewer written in Rust. Rendering is done using the [Vulkan API][1]\nusing [Ash][2]. It runs on Window, Linux and MacOS.\n\n![Screenshot](images/helmet_woods.png \"Screenshot\")\n\n## Features\n\n- [x] Mesh vertices, normals, colors and two uv channels\n- [x] Tangents generation\n- [x] Material\n  - [x] Base color factor and texture\n  - [x] Metallic/Roughness factors and textures\n  - [x] Emissive factor and texture\n  - [x] Ambient occlusion\n  - [x] Normal maps\n  - [x] Alpha\n    - [x] Opaque\n    - [x] Mask\n    - [x] Blend\n  - [x] Double sided surfaces\n- [x] IBL\n- [x] Animations\n  - [x] Node animation\n  - [x] Skinning\n  - [x] Interpolation\n    - [x] Step\n    - [x] Linear\n    - [x] Cubicspline\n- [ ] Extensions\n  - [x] KHR_lights_punctual\n  - [x] KHR_materials_unlit\n  - [x] KHR_materials_pbrSpecularGlossiness\n  - [x] KHR_materials_emissive_strength\n  - [x] KHR_materials_clearcoat\n  - [x] KHR_texture_transform\n  - [x] KHR_materials_ior\n  - [ ] KHR_draco_mesh_compression\n- [x] Camera controls\n  - [x] Orbital\n  - [x] First Person\n- [x] Drag and drop\n- [x] Background loading\n- [ ] Post processing\n  - [x] Gamma correction\n  - [x] Tone mapping\n  - [x] Ambient occlusion\n  - [x] Bloom\n  - [ ] Depth of field\n- [x] egui integration\n  - [x] Model description\n  - [x] Animation controller\n  - [x] Camera details\n  - [x] Renderer settings\n- [x] HDR display\n  - [x] Allow enabling HDR (if supported by the device)\n  - [x] Add HDR specific tonemapping\n\n## Requirements\n\n- Vulkan 1.0\n- VK_KHR_dynamic_rendering\n\n\u003e You can check your Vulkan feature set using Sascha Willems' [Vulkan Caps Viewer][6]\n\n## Controls\n\n- 'H' to toggle UI\n\nOrbital camera:\n- Left click and move to rotate camera around origin\n- Right click and move to move camera\n- Mouse wheel to un/zoom\n\nFPS camera:\n- WASD to move\n- Left Ctrl to go down\n- Space to go up\n- Left click to rotate\n\n## Build it\n\n```sh\ncargo build\n```\n\nBy default, building the project will trigger shader compilation for all shaders in `./assets/shaders`.\nYou can either skip this step altogether by setting the environnement variable `SKIP_SHADER_COMPILATION`\nto `true`, or you can change the default by setting `SHADERS_DIR`. Compiled shaders will be generated at\nthe same location as the shader source, with the same name suffixed by `.spv`.\n\n\u003e To compile the shaders you'll need to have `glslangValidator` on your PATH.\n\n## Run it\n\nJust type the following command and drag and drop and gltf/glb file in the window.\n\n```sh\nRUST_LOG=gltf_viewer_rs=warn cargo run\n```\n\nYou can provide a yaml configuration file with `--config` (or `-c`). Check [this example file](./config.yml). And you can specify a file to load at startup\nwith `--file` (or `-f`)\n\n```sh\nRUST_LOG=gltf_viewer_rs=warn,vulkan=warn cargo run -- --config config.yml --file C:\\\\dev\\\\assets\\\\glTF-Sample-Models\\\\2.0\\\\Triangle\\\\glTF\\\\Triangle.gltf\n```\n\n### Validation layers\n\nYou can set up validation layers by running the following commands.\n\n```sh\nexport VK_LAYER_PATH=$VULKAN_SDK/Bin\nexport VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation\n\n# Then running the app with the --debug (-d) flag.\nRUST_LOG=gltf_viewer_rs=warn cargo run -- --debug\n```\n\n\u003e You can also use the run.sh and debug.sh scripts\n\n## Known issues\n\nOn linux, enabling v-sync causes the system to freeze with some hardware configuration (tested on a laptop running Pop_os 19.04, with a GTX 1050Ti). It seems to be an issue related with PRIME sync.\n\n## Credits\n\nMost of the shader code for BRDF lookup and pre-filtered map generation come from the excellent [Sasha Willems' vulkan samples repository][3].\n\nCubemap faces have been generated using [matheowis' HDRi to cubemap tool][4].\n\nHDRi textures have been downloaded from [hdriheaven][5].\n\nSSAO tutorial from John Chapman's [blog][7].\n\nBloom tutorial on [Learn OpenGL][8]\n\n[0]: https://github.com/KhronosGroup/glTF\n[1]: https://www.khronos.org/vulkan/\n[2]: https://github.com/MaikKlein/ash\n[3]: https://github.com/SaschaWillems/Vulkan\n[4]: https://github.com/matheowis/HDRI-to-CubeMap\n[5]: https://hdrihaven.com/\n[6]: https://vulkan.gpuinfo.org/download.php\n[7]: http://john-chapman-graphics.blogspot.com/2013/01/ssao-tutorial.html\n[8]: https://learnopengl.com/Guest-Articles/2022/Phys.-Based-Bloom\n\n## Screenshots\n\n![Cesium](images/cesium.gif \"Cesium\")\n\n|![Woods](images/helmet_woods.png \"Woods\")|![Sand](images/helmet_sand.png \"Sand\")|![Night](images/helmet_night.png \"Night\")|\n|---|---|---|\n|![Indoor](images/helmet_indoor.png \"Indoor\")|![Env](images/env.png \"Env\")|![Corset](images/corset.png \"Corset\")|\n|![MG08](images/mg08.png \"MG08\")|![Flight](images/flight_helmet.png \"Flight Helmet\")|![Junkrat](images/junkrat.png \"Junkrat\")|\n|![Wicker](images/clearcoat_wicker.png \"Wicker\")|||\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrien-ben%2Fgltf-viewer-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrien-ben%2Fgltf-viewer-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrien-ben%2Fgltf-viewer-rs/lists"}