OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username:
Password:
CapsLock is on.
Remember me (for 1 year)
Log in
Home
Tutorials
Tutorials Home
Basic Tutorials
Intermediate Tutorials
Mad Marx Tutorials
In Depth Tutorials
Older Tutorials
External Tutorials
Cookbook
Cookbook Home
CodeBank
Snippets
Experiences
Ogre Articles
Libraries
Libraries Home
Alternative Languages
Assembling A Toolset
Development Tools
OGRE Libraries
List of Libraries
Tools
Tools Home
DCC Tools
DCC Tutorials
DCC Articles
DCC Resources
Assembling a production pipeline
Development
Development Home
Roadmap
Building Ogre
Installing the Ogre SDK
Setting Up An Application
Ogre Wiki Tutorial Framework
Frequently Asked Questions
Google Summer Of Code
Help Requested
Ogre Core Articles
Community
Community Home
Projects Using Ogre
Recommended Reading
Contractors
Wiki
Immediate Wiki Tasklist
Wiki Ideas
Wiki Guidelines
Article Writing Guidelines
Wiki Styles
Wiki Page Tracker
Ogre Wiki Help
Ogre Wiki Help Overview
Help - Basic Syntax
Help - Images
Help - Pages and Structures
Help - Wiki Plugins
Toolbox
Freetags
Categories
List Pages
Structures
Trackers
Statistics
Rankings
List Galleries
Ogre Lexicon
Comments
History: Optimisation checklist
View page
Source of version: 9
(current)
{maketoc} !!Optimisation checklist * Some things to check if your application is running slow * Also before you release an Ogre app to the public !!!Speeding up startup * If you have many resources that are stored as separate files they can be loaded faster by putting them into a ZIP archive. !!!C++ Optimization Strategies and Techniques * No document can beat this one by its simplicity, clarity and proven basis : [http://www.tantalon.com/pete/cppopt/main.htm|here] (be sure to read at least C++ Optimizations You Can Do "As You Go" ) !!!Debug / Release Mode * Make sure you test speed using Release mode. Debug mode introduce many, many slowdowns for debugging efficiently and therefore do not reflect final speed (expect from 2x to 10x difference). If you're compiling your app for first time in release mode since a long time, then, you might have interest in this document [http://www.flounder.com/debug_release.htm|Surviving the Release Version]. !!!Memory Handling * Minimize Memory creation/deletion during frames. * Use Memory pools for frequently deleted/created objects. (as ogre does with billboards..) It helps speeding application and reduce memory fragmentation that leads to big slowdown on long running applications. !!!Objects/Nodes * setVisible(false) doesn't remove object from all calculations. Detach node instead. see [http://www.ogre3d.org/forums/viewtopic.php?t=13068&highlight=setvisible|forum topic] * lots of objects - use 'staticGeometry'. Can't be individually controlled. Good for trees etc. Uses memory. * draw distance - use 'setRenderingDistance' to cull far away objects. Set far clipping plane and fog also. !!!Shadows * Texture - fast, blocky, no self shadowing * Stencil (Modulative) - medium speed * Stencil (Additive) - slow speed, but "correct" for multiple/coloured lights !!!Materials QA with Sinbad (taken from this post [http://www.ogre3d.org/forums/viewtopic.php?t=19702]) __1. Does it differ in rendering speed whether 50 objects all have the same material, or all have a different material but with exactly the same settings and textures. __ ____ * Yes, because you save the rendering state changes. It's even more efficient though if you batch those 50 objects into a single render call, which you can only do if they are not moving relative to one another (ie can use the same world matrix) __2. If materials and/or texture-names are swapped dynamically quite often during gameplay, does this give worse performance than when all materials stay the same? I am assuming here that I have already loaded all necessary textures and materials on start-up. __ ____ * Yes, texture swaps are relativelly expensive as a state change. Note however that OGRE will order your passes by common texture usage in the same texture units to minimise texture state changes so if there is a case whre unit 0 uses the same texture across 3 material passes but texture 1 is different, it will place those together in the ordering so unit 0 stays constant. Only for solids though (transparency needs depth sorting) __3. I have 9 textures in different colours. I know that if I make a texture-atlas with all off them in it and use that for all objects, this will be faster than 9 seperate textures. However, is this still true if each texture has a different scale and scroll in the texture-unit? Or will much of the performance be lost because these settings have to be re-set? How much will I win anyway if I use texture-atlasses that bring me from 9 tot 1 texture? Should I think around 1% or even 10%, or will it hardly be noticeable? __ ____ * Mostly. It will require state changes to alter the scroll etc but these are cheaper than switching textures. !!!Shader caching Optimize shader loading by caching them, to prevent having to recompile them everytime. For more details see the forum: http://www.ogre3d.org/forums/viewtopic.php?f=4&t=61004 !!!LOD * (on by default?) !!!Particles * Allocate particles at the beginning. Avoid creating particle system at runtime. * Try achieving the desired effect minimizing the particle count. That can easily leads to huge slowdown. !!!Profile * Use profilers to find where the application does hang the CPU. Here's a ((Development Tools|#CPU Profiler)). * Use profilers to find where the application does hang the GPU. Here's a ((Development Tools|#GPU Profiler)) !!!Releasing an Ogre app * Test material fallback for older cards (material script supports this) * delete all unused DLL's * compile as release build! * [http://www.ogre3d.org/forums/viewtopic.php?t=13172&highlight=exampleapplication|A few more pointers]
Search by Tags
Search Wiki by Freetags
Latest Changes
One Function Ogre
IDE Eclipse
FMOD SoundManager
HDRlib
Building Ogre V2 with CMake
Ogre 2.1 FAQ
Minimal Ogre Collision
Artifex Terra
OpenMB
Advanced Mogre Framework
...more
Search
Find
Advanced
Search Help
Online Users
178 online users