Top Banner
Présentation du projet NanoVoxel Pierre Planeau Anatole Duprat
40

Présentation du projet NanoVoxel

Feb 26, 2016

Download

Documents

bowie

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 Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Présentation du projet  NanoVoxel

Présentation du projet NanoVoxelPierre PlaneauAnatole Duprat

Page 2: Présentation du projet  NanoVoxel

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

I. Introduction1. Le projet2. Pourquoi ?

Page 4: Présentation du projet  NanoVoxel

Le projet•Jeu 3D basé sur les voxels

Page 5: Présentation du projet  NanoVoxel

Le projet•Inspiré par Minecraft et Cube World

Minecraft

Cube World

Page 6: Présentation du projet  NanoVoxel

Pourquoi ?•Entrainement et plaisir personnel•Créer une alternative à Minecraft•Dépasser Minecraft et Cube World

Page 7: Présentation du projet  NanoVoxel

II. Démonstration

Page 8: Présentation du projet  NanoVoxel

III. Comment ?1. Les Voxels2. Spécifications3. Algorithmes4. La lumière5. Le ciel6. L’eau

Page 9: Présentation du projet  NanoVoxel

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

Structure

Un Chunk contient des Voxels.

Une Map contient des Chunks.

Map

Chunk

Voxel

Page 11: Présentation du projet  NanoVoxel

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

Algorithmes•Bruit de Perlin•Terrain•Affichage des faces•Ambient Occlusion

Premier « vrai » rendu

Page 13: Présentation du projet  NanoVoxel

AlgorithmesLe bruit de Perlin

2 4

168

Page 14: Présentation du projet  NanoVoxel

AlgorithmesLe bruit de Perlin

+ + +

=

Page 15: Présentation du projet  NanoVoxel

AlgorithmesLe bruit de Perlin

Page 16: Présentation du projet  NanoVoxel

AlgorithmesTerrain

D = y

Page 17: Présentation du projet  NanoVoxel

AlgorithmesTerrain

D = y + cos(x)

Page 18: Présentation du projet  NanoVoxel

AlgorithmesTerrain

D = y + cos( longueur( x, y, z ) )

Page 19: Présentation du projet  NanoVoxel

AlgorithmesTerrain

D = bruitPerlin(x, y, z)

Page 20: Présentation du projet  NanoVoxel

AlgorithmesTerrain

D = y + bruitPerlin(x, y, z)

Page 21: Présentation du projet  NanoVoxel

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

AlgorithmesAmbient Occlusion

Page 23: Présentation du projet  NanoVoxel

AlgorithmesAmbient Occlusion

Page 24: Présentation du projet  NanoVoxel

AlgorithmesAmbient Occlusion

Page 25: Présentation du projet  NanoVoxel

AlgorithmesAmbient Occlusion

× =

Page 26: Présentation du projet  NanoVoxel

La lumièreProduit scalaire

-110

0.5

Page 27: Présentation du projet  NanoVoxel

La lumière

×

Page 28: Présentation du projet  NanoVoxel

Le cielCiel = couleur( 0.5, 0.7, 1.0 )

Page 29: Présentation du projet  NanoVoxel

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

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

L’eau

Page 32: Présentation du projet  NanoVoxel

L’eau

Page 33: Présentation du projet  NanoVoxel

L’eau

Page 34: Présentation du projet  NanoVoxel

IV. NanoVoxel1. Début2. Actuellement3. Prochainement

Page 35: Présentation du projet  NanoVoxel

Début•Tout à commencé avec un voxel

Page 36: Présentation du projet  NanoVoxel

Des bugs… épileptiques !

Page 37: Présentation du projet  NanoVoxel

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

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

V. Questions

Page 40: Présentation du projet  NanoVoxel

Merci de votre attention !