présentation du projet nanovoxel
DESCRIPTION
Présentation du projet NanoVoxel. Pierre Planeau Anatole Duprat. Sommaire. I.Introduction Le projet Pourquoi ? II. Démonstration III .Comment ? Les Voxels Spécifications Algorithmes La lumière Le ciel L’eau IV. NanoVoxel Début Actuellement Prochainement V .Questions. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/1.jpg)
Présentation du projet NanoVoxelPierre PlaneauAnatole Duprat
![Page 2: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/2.jpg)
Sommaire• I. Introduction
▫ Le projet▫ Pourquoi ?
• II. Démonstration• III. Comment ?
▫ Les Voxels▫ Spécifications▫ Algorithmes▫ La lumière▫ Le ciel▫ L’eau
• IV. NanoVoxel▫ Début▫ Actuellement▫ Prochainement
• V. Questions
![Page 3: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/3.jpg)
I. Introduction1. Le projet2. Pourquoi ?
![Page 4: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/4.jpg)
Le projet•Jeu 3D basé sur les voxels
![Page 5: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/5.jpg)
Le projet•Inspiré par Minecraft et Cube World
Minecraft
Cube World
![Page 6: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/6.jpg)
Pourquoi ?•Entrainement et plaisir personnel•Créer une alternative à Minecraft•Dépasser Minecraft et Cube World
![Page 7: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/7.jpg)
II. Démonstration
![Page 8: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/8.jpg)
III. Comment ?1. Les Voxels2. Spécifications3. Algorithmes4. La lumière5. Le ciel6. L’eau
![Page 9: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/9.jpg)
Les Voxels•Un voxel est un pixel dans l’espace•Les voxels sont simples à manipuler et
contiennent de l’information utile en une simple valeur
Un voxelPlusieurs voxels
![Page 10: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/10.jpg)
Structure
Un Chunk contient des Voxels.
Une Map contient des Chunks.
Map
Chunk
Voxel
![Page 11: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/11.jpg)
Spécifications•Le C++ pour sa rapidité, sa portabilité, sa
stabilité et sa large communauté•Le contexte SFML pour sa simplicité et sa
compatibilité native avec l’OpenGL•L’OpenGL pour sa portabilité et sa
simplicité
![Page 12: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/12.jpg)
Algorithmes•Bruit de Perlin•Terrain•Affichage des faces•Ambient Occlusion
Premier « vrai » rendu
![Page 13: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/13.jpg)
AlgorithmesLe bruit de Perlin
2 4
168
![Page 14: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/14.jpg)
AlgorithmesLe bruit de Perlin
+ + +
=
![Page 15: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/15.jpg)
AlgorithmesLe bruit de Perlin
![Page 16: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/16.jpg)
AlgorithmesTerrain
D = y
![Page 17: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/17.jpg)
AlgorithmesTerrain
D = y + cos(x)
![Page 18: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/18.jpg)
AlgorithmesTerrain
D = y + cos( longueur( x, y, z ) )
![Page 19: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/19.jpg)
AlgorithmesTerrain
D = bruitPerlin(x, y, z)
![Page 20: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/20.jpg)
AlgorithmesTerrain
D = y + bruitPerlin(x, y, z)
![Page 21: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/21.jpg)
AlgorithmesAffichage des faces
Répéter pour tous les voxels Si ( voxel actuel = non vide ) alors Si ( voxel suivant = vide ) alors Il faut afficher une face Sinon Pas de face à afficher Fin Si Sinon Pas de face à afficher Fin SiFin Répéter pour
Sens de parcours
Affiche
![Page 22: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/22.jpg)
AlgorithmesAmbient Occlusion
![Page 23: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/23.jpg)
AlgorithmesAmbient Occlusion
![Page 24: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/24.jpg)
AlgorithmesAmbient Occlusion
![Page 25: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/25.jpg)
AlgorithmesAmbient Occlusion
× =
![Page 26: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/26.jpg)
La lumièreProduit scalaire
-110
0.5
![Page 27: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/27.jpg)
La lumière
×
=×
![Page 28: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/28.jpg)
Le cielCiel = couleur( 0.5, 0.7, 1.0 )
![Page 29: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/29.jpg)
Le cielCiel = mix( couleur( 0.5, 0.7, 1.0 ), couleur( 1.0, 1.0, 1.0 ), y²)
![Page 30: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/30.jpg)
Le cielCiel = mix( couleur( 0.5, 0.7, 1.0 ), couleur( 1.0, 1.0, 1.0 ), y²)
Soleil = couleur( 1.0, 0.5, 0.1 ) / ( 1.0 + distance( point actuel, position soleil ) )10
Soleil + Ciel
y
x
![Page 31: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/31.jpg)
L’eau
![Page 32: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/32.jpg)
L’eau
![Page 33: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/33.jpg)
L’eau
![Page 34: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/34.jpg)
IV. NanoVoxel1. Début2. Actuellement3. Prochainement
![Page 35: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/35.jpg)
Début•Tout à commencé avec un voxel
![Page 36: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/36.jpg)
Des bugs… épileptiques !
![Page 37: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/37.jpg)
Actuellement•Le jeu charge 1 404 928 voxels et est
très fluide•Le projet tient sur 6010 lignes de code•Cela représente environ 3 mois de travail
![Page 38: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/38.jpg)
Prochainement•Restructuration du code•Physique•Génération de villes•Différents types de paysages•Un univers (monstres, PNJ, quêtes, etc.)•Ombres dynamiques•Un mode multi-joueurs•etc
![Page 39: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/39.jpg)
V. Questions
![Page 40: Présentation du projet NanoVoxel](https://reader034.vdocuments.site/reader034/viewer/2022042608/56816976550346895de15c6e/html5/thumbnails/40.jpg)
Merci de votre attention !