Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/SabianF/rust_wgpu_3D_vision

A program to simulate stereoscopic 4D vision
https://github.com/SabianF/rust_wgpu_3D_vision

Last synced: about 1 month ago
JSON representation

A program to simulate stereoscopic 4D vision

Awesome Lists containing this project

README

        

# rust_wgpu_3D_vision
A 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.

Main Hypothesis

If 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.

**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.

Essentially, this is using time (via [flicker fusion](https://en.wikipedia.org/wiki/Flicker_fusion_threshold)) to extend our 2-dimensional vision into 3D.

If 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 & depth.

Since this is my very first Rust project, the major steps to accomplishing this are

## Phase 1: Core functionality
- [x] Creating a functional window
- [x] Rendering a colour
- [x] Rendering a 2D surface (~~square~~ triangle)
- [x] Rendering a voxel (cube)
- [x] Rendering a 3D volume containing multiple voxels
- [x] Flickering the voxels at 1 plane of voxels per frame

### Phase 1 Results
- Expectation: Rendering will cause flicker fusion and brain to perceive true 3D volume
- Measurement: Refresh rate of 60FPS insufficient for flicker fusion; voxels disappear from screen, flickering like old fluorescent lights
- Evaluation:
- May need better hardware *(240Hz monitor, better GPU, better CPU)* to make progress on main hypothesis
- Will progress to phase 2, in the meantime

## Phase 2: 3D angle-viewing
- [x] Adding the ability to rotate the 3D volume in 3-space
- [ ] Ensuring all displayed voxels are fully visible at all times (voxels never obscure any part of any other voxels)

## Phase 3: 4D angle-viewing
- [ ] TBD

## Phase 4: 4D objects
- [ ] TBD

# Updates

## From previous repo

1. Started following the incredibly difficult-to-understand Dr. Xu's guide up to video 3
1. 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/))
1. 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)
1. 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)

## From this repo
1. **done**: Created resizeable window ([commit](https://github.com/SabianF/rust_wgpu_3D_vision/commit/094a5c9e4df79707d4df8df3e0bc1d2aa69d64f7))
1. **done**: rendering colour ([commit](https://github.com/SabianF/rust_wgpu_3D_vision/commit/93f3ad42ea52b5713723b7eed49beac66c95aa25))
-
1. **done**: rendering 2D surface ([commit](https://github.com/SabianF/rust_wgpu_3D_vision/commit/ad066599d1c539dd1ce8ff6e829685ac643bc246))
-
- Bonus: added temporary colour switching functionality (didn't commit)
-
1. **done**: rendering 3D object
- rust_cube_rotating
1. **done**: ~~optimizing camera controls~~ rendering multiple instances of cubes
- rust_cubes_rotating
1. **done**: rendering cubes on y-axis
- volume_of_cubes_rotating
1. **done**: render voxels layer-by-layer
- volume_of_cubes_refreshing note: GIF does not represent framerate correctly
1. **done**: optimizing camera controls; used [FrankenApps wgpu cube code](https://github.com/FrankenApps/wgpu_cube) as reference
- note: GIF still does not represent framerate correctly

1. todo: iterating through all visible voxels instead of plane-by-plane