OGRE: 3d temps réel open source Présentation
Description de scène
Matériaux
Compositors
Extensions
Futur Object-Oriented Graphics Rendering Engine Paul Cheyrou-Lagrèze – Pop 3D
Présentation Moteur 3D Temps réel Open Source 2001 - 2009 Multi-platforme: Linux, OS X, Windows, BSD Recherche, Visualisation, Jeux, Etudiants, Réalité augmentée, etc. C++, OO, Motifs Conceptions Accéléré par le matériel  Leader : Steve Streeting Torus Knot software
Librairie Ogre est un composant Ne doit pas être  le  centre de l'application Doit s'insérer dans une application Fait par des développeurs pour les développeurs
Spécialisé et indépendan Moteur 3D accéléré seulement Tout est fait pour l'intégration d'Ogre et non l'inverse Longévité & stabilité  Modélisation en premier, Code facile à maintenir, Commentaire, Documentation,  Branche Stable et Développement  Éviter la « prédestination » Pas de spécificité / type de rendu  Composant réutilisable et extensible Les Règles d'Or
Moteur 3D != Moteur de JEU Renderer  Animation, Particules Shading/Lighting Détection de Collisions  Scripts Son/Vidéo Réseau Physique Intelligence Artificielle Éditeur (Niveaux, Terrain, shaders, modèles)
Description Interface déclarative, de description de scène:  Tel modèle à tel endroit vu par tel camera avec telle lumière
Action/Rendu Toutes les utilisations communes en 3D simplifiées: Gestion des matériaux, des particules, des niveau de détail, des ressources, de la visibilité, des ombres, des animations, des illuminations
Chaque gestionnaire a une interface paramétrable,  extensible/modulable par greffons
DirectX9/10, OpenGL 1&2, GLES 1.1 : système de rendu sont des greffons
Vue d'ensemble
Scène: les bases SceneManager : le gestionnaire adapté au type de scène rendu (intérieur, extérieur, statique, multi-zones)
SceneNode : le SceneNode contient les informations au sujet de l'emplacement et de l'orientation des entités.
Entity : une entité est un objet 3D  SceneMgr = mRoot->createSceneManager (ST_GENERIC); Entity *ent1 = SceneMgr->createEntity( "Robot", "robot.mesh" );  SceneNode *node1 = SceneMgr->getRootSceneNode()->createChildSceneNode( "RobotNode" );  node1->attachObject( ent1 );
Caméra ! Camera
ViewPort mCamera = SceneMgr->createCamera("PlayerCam"); mCamera->setPosition(Vector3(0,10,500)); mCamera->lookAt(Vector3(0,0,0)); Viewport* vp = mWindow->addViewport(mCamera);
Lumière Lumières Point
Spot
Direction light = mSceneMgr->createLight("Light1"); light->setType(Light::LT_SPOTLIGHT); light->setDirection(-1, -1, 0); light->setPosition(Vector3(300, 300, 0)); light->setDiffuseColour(1.0, 0.0, 0.0); light->setSpecularColour(1.0, 0.0, 0.0);

Ogre 3D : une introduction

  • 1.
    OGRE: 3d tempsréel open source Présentation
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
    Futur Object-Oriented GraphicsRendering Engine Paul Cheyrou-Lagrèze – Pop 3D
  • 7.
    Présentation Moteur 3DTemps réel Open Source 2001 - 2009 Multi-platforme: Linux, OS X, Windows, BSD Recherche, Visualisation, Jeux, Etudiants, Réalité augmentée, etc. C++, OO, Motifs Conceptions Accéléré par le matériel Leader : Steve Streeting Torus Knot software
  • 8.
    Librairie Ogre estun composant Ne doit pas être le centre de l'application Doit s'insérer dans une application Fait par des développeurs pour les développeurs
  • 9.
    Spécialisé et indépendanMoteur 3D accéléré seulement Tout est fait pour l'intégration d'Ogre et non l'inverse Longévité & stabilité Modélisation en premier, Code facile à maintenir, Commentaire, Documentation, Branche Stable et Développement Éviter la « prédestination » Pas de spécificité / type de rendu Composant réutilisable et extensible Les Règles d'Or
  • 10.
    Moteur 3D !=Moteur de JEU Renderer Animation, Particules Shading/Lighting Détection de Collisions Scripts Son/Vidéo Réseau Physique Intelligence Artificielle Éditeur (Niveaux, Terrain, shaders, modèles)
  • 11.
    Description Interface déclarative,de description de scène: Tel modèle à tel endroit vu par tel camera avec telle lumière
  • 12.
    Action/Rendu Toutes lesutilisations communes en 3D simplifiées: Gestion des matériaux, des particules, des niveau de détail, des ressources, de la visibilité, des ombres, des animations, des illuminations
  • 13.
    Chaque gestionnaire aune interface paramétrable, extensible/modulable par greffons
  • 14.
    DirectX9/10, OpenGL 1&2,GLES 1.1 : système de rendu sont des greffons
  • 15.
  • 16.
    Scène: les basesSceneManager : le gestionnaire adapté au type de scène rendu (intérieur, extérieur, statique, multi-zones)
  • 17.
    SceneNode : leSceneNode contient les informations au sujet de l'emplacement et de l'orientation des entités.
  • 18.
    Entity : uneentité est un objet 3D SceneMgr = mRoot->createSceneManager (ST_GENERIC); Entity *ent1 = SceneMgr->createEntity( "Robot", "robot.mesh" ); SceneNode *node1 = SceneMgr->getRootSceneNode()->createChildSceneNode( "RobotNode" ); node1->attachObject( ent1 );
  • 19.
  • 20.
    ViewPort mCamera =SceneMgr->createCamera("PlayerCam"); mCamera->setPosition(Vector3(0,10,500)); mCamera->lookAt(Vector3(0,0,0)); Viewport* vp = mWindow->addViewport(mCamera);
  • 21.
  • 22.
  • 23.
    Direction light =mSceneMgr->createLight("Light1"); light->setType(Light::LT_SPOTLIGHT); light->setDirection(-1, -1, 0); light->setPosition(Vector3(300, 300, 0)); light->setDiffuseColour(1.0, 0.0, 0.0); light->setSpecularColour(1.0, 0.0, 0.0);

Notes de l'éditeur

  • #9 SceneManager Basics Everything that appears on the screen is managed by the SceneManager (fancy that). When you place objects in the scene, the SceneManager is the class which keeps track of their locations. When you create Cameras to view the scene (which we will cover in a later tutorial) the SceneManager keeps track of them. When you create planes, billboards, lights...and so on, the SceneManager keeps track of them. There are multiple types of SceneManagers. There are SceneManagers that render terrain, there is a SceneManager for rendering BSP maps, and so on. You can see the various types of SceneManagers listed here. We will cover more about other SceneManagers as we progress through the tutorials. Entity Basics An Entity is one of the types of object that you can render on a scene. You can think of an Entity as being anything that's represented by a 3D mesh. A robot would be an entity, a fish would be an entity, the terrain your characters walk on would be a very large entity. Things such as Lights, Billboards, Particles, Cameras, etc would not be entities. One thing to note about Ogre is that it separates renderable objects from their location and orientation. This means that you cannot directly place an Entity in a scene. Instead you must attach the Entity to a SceneNode object, and this SceneNode contains the information about location and orientation. SceneNode Basics As already mentioned, SceneNodes keep track of location and orientation for all of the objects attached to it. When you create an Entity, it is not rendered in the scene until you attach it to a SceneNode. In addition a SceneNode is not an object that is displayed on the screen. Only when you create a SceneNode and attach an Entity (or other object) to it is something actually displayed on the screen. SceneNodes can have any number of objects attached to them. Let's say you have a character walking around on the screen and you want to have him generate a light around him. The way you do this would be to first create a SceneNode, then create an Entity for the character and attach it to the SceneNode. Then you would create a Light object and attach it to the SceneNode. SceneNodes may also be attached to other SceneNodes which allows you to create entire hierarchies of nodes. We will cover more advanced uses of SceneNode attachment in a later tutorial. One major concept to note about SceneNodes is that a SceneNode's position is always relative to its parent SceneNode, and each SceneManager contains a root node to which all other SceneNodes are attached.