Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ogre Overview Lecture 3.

Similar presentations


Presentation on theme: "Ogre Overview Lecture 3."— Presentation transcript:

1 Ogre Overview Lecture 3

2 What is it? Object-Oriented Graphics Rendering Engine
Not a game engine – we'll add that! Implements much of what your learned about in ETGG280x Shadows Hierarchical Transformations (with culling and material optimization) Optimized scene managers (tileable-terrain, BSP, etc). Billboards / overlays Shader support Skeletal (forward kinematics) animation particle systems C++ oriented It's large, but well-designed. Cross-platform using DirectX / OpenGL Easy to integrate other libraries Python (scripting) Bullet (physics) irrklang (3d sound) SDL (windowing, input) MIT license

3 Is it perfect? NO!!! Large and complex Documentation is good, but…
…scattered …much changes between minor versions Not a game engine Ogre 2.1 is very modern Vulkan, Metal, iOS, Android, AZDO …but 1.9 is DirectX-9 quality

4 Major ogre objects These are the first you’ll interact with: The root
The RenderWindow The SceneManager Viewports and Cameras Resources Entities SceneNodes

5 The Root The root contains all of the top-level managers Plugins.cfg
TextureManager, GPUProgramManager, … The render window (if any) The scene manager (if any) So…this is technically the only Ogre variable you need to store. Although, saving some convenience programs is usually desirable. Plugins.cfg [Look at it and describe it] Rendering (do a traversal of the scene graph) mRoot->renderOneFrame();

6 Render Window A…window.
In our apps, we'll have two window objects (but only one window) Ogre Window: an actual window SDL Window: attached to the ogre window (detects input)

7 The Scene Manager The scene manager organizes / optimizes all the renderables Lights, camera, meshes (entities) [including the materials attached], particle emitters, etc. Hierarchical Each (scene) node must be a child of the scene manager's root node You can also have children nodes of those scene nodes as well. If you transform one node, everything below it is transformed [Example scene] Optimizes GL/DX calls: material swaps, rendering, occlusion-culling, etc. Several different types: Octree, BSP, Terrain, etc.

8 Viewports and Cameras They are separate objects, but closely related
A rectangular portion of the window (with a z-value for layering) Created through the render window Camera: A 3d object created by the scene manager Must be attached to a viewport to render to it.

9 II.e Resources (e.g. Materials)
Some important resources: [Each has its own manager] .material file. Contains settings and links to textures shader programs .mesh file. A binary (optimized for reading quickly) mesh file. Has a link to a .material file.

10 Entities and Meshes Ogre has a generic class called Moveable. A number of classes are derived from it: Camera, Entity, Light, ParticleEmitter, … You create pointers to each of these through the scene manager (and then attach to a scene node) Ogre is managing the memory. You can either call a method (of the scene manager) to destroy it or wait until shutdown. Every Moveable object must have a unique name (across that type or globally?) An Entity is an instance of a mesh. The actual mesh data is loaded once (into a vertex/index buffer) It can be referenced with multiple entities, each with their own material (optional) Each Entity also can have independent "activations" of skeletal animations.

11 (Scene) Nodes The scene manager has a single root scene node.
Only things attached to a scene node which is a child of the root will be rendered. Each scene node has a transformation matrix (3x4) that contains: rotation scale translation You can modify the matrix directly, or more commonly through a helper function: setPosition setOrientation(Quaternion q); setScale You can attached any instance of a class derived from Moveable using the attachObject method.

12 Where to start My thrilling OgreIntro document… …and the Lab specs
We’ll explore more Ogre on an as-needed basis.


Download ppt "Ogre Overview Lecture 3."

Similar presentations


Ads by Google