wip readme presentation

This commit is contained in:
asus
2024-01-20 22:48:23 +01:00
parent 89d3e079f4
commit 1c64bf93e9
22 changed files with 18 additions and 32 deletions

View File

@@ -61,46 +61,32 @@ This technic has the hability to not show hidden area by design, which is a grea
How it works :
1. first you determine the position and orientation of the viewer in the map, and the distance and width of the screen
-> png map with eye and screen
![map with viewer position](assets/raycast_1.png)
2. then you will scan this fictif screen with rays, each ray will correspond to a column in the 3D view
-> gif rays scanning, then columns simutanously appear on both side
![animation of rays scanning the map and creating columns in 3D view](assets/raycast_2.gif)
3. when a ray reaches a wall, it draw it in the 3D view
-> png one ray on close box
![example of one ray drawing one column with portion of wall](assets/raycast_3.png)
4. the height of the wall is inversely proportional to the length of the ray : the shorter the ray, the higher the wall
-> png two rays, one for each box
![example of two rays drawing two columns with portion of different height walls](assets/raycast_4.png)
5. so a full scan gives the illusion of perspective
-> gif scan of the rays with fish eye
![animation of rays scanning the whole map and creating a 3D with fish eye deformation](assets/raycast_5.gif)
6. but this gives rounded walls, like a fish eye effect, because rays change length while scanning the wall, so we must apply a correction according to the angle
-> gif scan with strait walls
---
1. first you determine the position and orientation of the viewer in a plan,
![animation of rays scanning the whole map and creating a 3D with fish eye correction](assets/raycast_6.gif)
![](assets/raycast_step1.png)
7. another step by step example to show how drawing gains in precision with more rays :
2. then you cast a ray until it reaches a wall
![](assets/raycast_step2.png)
3. you can now trace the vertical line on the 3D view
![](assets/raycast_step3.png)
4. the height of the wall is inversely proportional to the length of the ray : the closer the wall, the heigher it is
![](assets/raycast_step4.png)
5. finally, if the rays scan the whole picture, you see the perspective appears
![](assets/raycast_steps_round.gif)
6. but you can also see that walls are rounded, like a fish eye effect. It's because rays change length while scanning the wall, so we must apply a correction according to the angle
![](assets/raycast_steps.gif)
7. a more realistic step by step example looks like this :
![](assets/raycast_explanation.gif)
![animation of raytracing with increasing number of rays](assets/raycast_7.gif)
example of raycasting with errors in action while construction of the project :

BIN
assets/raycast_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

BIN
assets/raycast_2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

BIN
assets/raycast_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
assets/raycast_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
assets/raycast_5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

BIN
assets/raycast_6.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

View File

Before

Width:  |  Height:  |  Size: 165 KiB

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.