{"id":14992301,"url":"https://github.com/SabianF/rust_wgpu_3D_vision","last_synced_at":"2025-09-25T14:31:09.428Z","repository":{"id":89203152,"uuid":"604945164","full_name":"SabianF/rust_wgpu_3D_vision","owner":"SabianF","description":"A program to simulate stereoscopic 4D vision","archived":false,"fork":false,"pushed_at":"2023-04-09T07:37:49.000Z","size":145,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-24T16:10:04.893Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/SabianF.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":"2023-02-22T05:27:37.000Z","updated_at":"2023-04-02T15:16:14.000Z","dependencies_parsed_at":"2023-06-14T10:15:29.418Z","dependency_job_id":null,"html_url":"https://github.com/SabianF/rust_wgpu_3D_vision","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/SabianF%2Frust_wgpu_3D_vision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SabianF%2Frust_wgpu_3D_vision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SabianF%2Frust_wgpu_3D_vision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SabianF%2Frust_wgpu_3D_vision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SabianF","download_url":"https://codeload.github.com/SabianF/rust_wgpu_3D_vision/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234200177,"owners_count":18795139,"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":[],"created_at":"2024-09-24T15:00:56.100Z","updated_at":"2025-09-25T14:31:03.938Z","avatar_url":"https://github.com/SabianF.png","language":"Rust","funding_links":[],"categories":["Graphics Library"],"sub_categories":[],"readme":"# rust_wgpu_3D_vision\nA program to simulate stereoscopic 4D vision, using a virtual 3D retina which is created by rapidly displaying all voxels at varying depths of a 3D volume.\n\n\u003cdetails\u003e\n\u003csummary\u003eMain Hypothesis\u003c/summary\u003e\n\nIf we display a 3D object on a 2D screen by rendering multiple layers (or voxels) of its outer and internal textures (like an MRI) fast enough to refresh all voxels composing the object 10-20 times per second (aka VPS or volumes-per-second), then our brains may interpret and process this 3D voxel space as true 3D vision.\n\n**Reasoning:** The voxels would simulate 4D photons hitting a 3D retina, and the brain should process this the same as it's already doing for the 3D photons hitting your 2D retinas as you're reading this.\n  \nEssentially, this is using time (via [flicker fusion](https://en.wikipedia.org/wiki/Flicker_fusion_threshold)) to extend our 2-dimensional vision into 3D.\n\nIf this works, then not only will the brain perceive true 3D volume vision, but also we can create two virtual 3D screens which display from two different 4D angles (simulating two 3D retinas, or two 4D eyes), which the brain may process into 4D binocular vision, letting us perceive 4D parallax \u0026 depth.\n\u003c/details\u003e\n\nSince this is my very first Rust project, the major steps to accomplishing this are\n\n## Phase 1: Core functionality\n- [x] Creating a functional window\n- [x] Rendering a colour\n- [x] Rendering a 2D surface (~~square~~ triangle)\n- [x] Rendering a voxel (cube)\n- [x] Rendering a 3D volume containing multiple voxels\n- [x] Flickering the voxels at 1 plane of voxels per frame\n\n### Phase 1 Results\n- Expectation: Rendering will cause flicker fusion and brain to perceive true 3D volume\n- Measurement: Refresh rate of 60FPS insufficient for flicker fusion; voxels disappear from screen, flickering like old fluorescent lights\n- Evaluation:\n   - May need better hardware *(240Hz monitor, better GPU, better CPU)* to make progress on main hypothesis\n   - Will progress to phase 2, in the meantime\n\n## Phase 2: 3D angle-viewing\n- [x] Adding the ability to rotate the 3D volume in 3-space\n- [ ] Ensuring all displayed voxels are fully visible at all times (voxels never obscure any part of any other voxels)\n\n## Phase 3: 4D angle-viewing\n- [ ] TBD\n\n## Phase 4: 4D objects\n- [ ] TBD\n\n# Updates\n\n## From previous repo\n\n1. Started following the incredibly difficult-to-understand Dr. Xu's guide up to video 3\n1. Encountered errors ([eg1](https://stackoverflow.com/questions/18004993/how-to-determine-cause-of-directx-11-driver-hang), [eg2](https://www.gamedev.net/forums/topic/703795-dxr-and-device-hung-error/))\n1. I have no clue what the error (or help thread comments) mean, so I'm trying [a different tutorial](https://github.com/peerhenry/rust_hello_triangle)\n1. I've reverted back to launching a functional empty window, and am now following the [official WGPU tutorial](https://sotrh.github.io/learn-wgpu/beginner/tutorial1-window/#the-code)\n\n## From this repo\n1. **done**: Created resizeable window ([commit](https://github.com/SabianF/rust_wgpu_3D_vision/commit/094a5c9e4df79707d4df8df3e0bc1d2aa69d64f7))\n1. **done**: rendering colour ([commit](https://github.com/SabianF/rust_wgpu_3D_vision/commit/93f3ad42ea52b5713723b7eed49beac66c95aa25))\n   - \u003cimg src=\"https://user-images.githubusercontent.com/58588133/221382461-0ab01c86-9603-4a15-aa18-92feb14675d9.png\" width=\"256\" /\u003e\n1. **done**: rendering 2D surface ([commit](https://github.com/SabianF/rust_wgpu_3D_vision/commit/ad066599d1c539dd1ce8ff6e829685ac643bc246))\n   - \u003cimg src=\"https://user-images.githubusercontent.com/58588133/221392828-99132655-2af0-4dca-bf61-5c1958d327b7.png\" width=\"256\" /\u003e\n   - Bonus: added temporary colour switching functionality (didn't commit)\n      - \u003cimg src=\"https://user-images.githubusercontent.com/58588133/221487748-ec90ceaa-b4f1-4fe6-8f0f-eeb0a1112a4b.png\" width=\"256\" /\u003e\n1. **done**: rendering 3D object\n   - \u003cimg src=\"https://user-images.githubusercontent.com/58588133/221772063-2e042702-97d3-44c8-8037-69c75213bb1e.gif\" width=\"256\" alt=\"rust_cube_rotating\" /\u003e\n1. **done**: ~~optimizing camera controls~~ rendering multiple instances of cubes\n   - \u003cimg src=\"https://user-images.githubusercontent.com/58588133/222606065-34011ff6-2b57-482e-a42f-a08f6f93c0b9.gif\" width=\"256\" alt=\"rust_cubes_rotating\" /\u003e\n1. **done**: rendering cubes on y-axis\n   - \u003cimg src=\"https://user-images.githubusercontent.com/58588133/222637320-b5eb0d8c-1d07-441c-8985-70948e58d15a.gif\" width=\"256\" alt=\"volume_of_cubes_rotating\" /\u003e\n1. **done**: render voxels layer-by-layer\n   - \u003cimg src=\"https://user-images.githubusercontent.com/58588133/222941633-0cb2f719-7e9e-4f4b-806b-17e22698331b.gif\" width=\"256\" alt=\"volume_of_cubes_refreshing\" /\u003e note: GIF does not represent framerate correctly\n1. **done**: optimizing camera controls; used [FrankenApps wgpu cube code](https://github.com/FrankenApps/wgpu_cube) as reference\n   - \u003cimg src=\"https://user-images.githubusercontent.com/58588133/229334603-1520ec0b-a4b1-4882-abc0-e9ba2605e733.gif\" /\u003e note: GIF still does not represent framerate correctly\n\n1. todo: iterating through all visible voxels instead of plane-by-plane\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSabianF%2Frust_wgpu_3D_vision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSabianF%2Frust_wgpu_3D_vision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSabianF%2Frust_wgpu_3D_vision/lists"}