Why the poor performance?


12-03-2008 14:01:13

So, I have embedded a Mogre window in a C# Form and started playing with the a ETM terrain. I am a bit concerned about the framerate though. Running without the terrain, calling RenderOneFrame as often as possible, I get ~600ish FPS.

Using the sample code, and creating a terrain with 512x512 height values, the framerate drops to 15-20 (when viewing the whole terrain, or towards the horizon) =/ With a size of 256x256, the framerate lands on ~30.
Doesn't seem to matter how much I scale the terrain in width and height, the fps stays at about the same. LoD settings are as in the sample code.

Using 128x128 it's runs at ~180 FPS, which is pretty good, but I had actually expected better.

Feels like I'm missing something here, perhaps some one can point it out for me.


12-03-2008 16:02:30

You didn't state it, but from the framerates I'll assume that you have a graphics card somewhere in the range of Geforce4/5 or similar ATI cards. Concerning terrain rendering, it's the splatting which really hurts performance. The demo code and material splats 6 textures and does another pass on the terrain to show the lightmap, and this will get older cards in trouble. Nothing to do with ETM, if you were doing splatting with Ogre's terrain scene manager, you'd get similar results :)

You'll have to consider using fewer splatting textures, maybe 3-4, which you can get from a single splatting map, and you'll still have a texture unit to include a lightmap. This should help quite a bit.


12-03-2008 18:05:59

Ok, I'll try playing with the nr of textur units. But I have a Gforce 8800 GTS, that's what worries me =/


12-03-2008 18:36:48

Ok, that's definitely not acceptable, then. Can you try compiling and running the native C++ ETM demo as comparison?


12-03-2008 18:42:14

Mm yeah, will try that as well.


13-03-2008 12:10:54

Ok, this is pretty embarrassing, but I only tried it in Debug and ... well yeah, let's just say Release-mode solved my problems :P

Losing ~50 fps in the embedded mogre ETM compared to the native c++ ETM, but I can live with that now that my FPS is up to 250ish with 512*512 height field.


13-03-2008 16:49:59

Alright, glad that issue resolved itself, practically :)