InikOfDoom
10-02-2009 14:29:11
Hi everybody.
We're currently working on a game where the player has to run along a long path. The scenes are mostly static and built with repeating segments that are concatenated.
After having the first noticable performance drops, I now generate a StaticGeometry using the following lines:
Obviously, that makes a big difference. The framerate is far better now. But now I got a new problem: Transparency sorting. We got lots of trees that have transparent textures, but unfortuantely, StaticGeometry doesn't do any depth sorting (as far as I can see and as far as I can read: http://www.ogre3d.org/forums/viewtopic. ... 96&start=0).
So, the question is: What shall I do?
I thought about traversing the scene graph, pulling out all nodes with transparent materials and put them in a new branch before building the static geometry - do you think this is reasonable? What's the Ogre way of solving problems like that?
In case that makes any difference: I'm using Mogre V1.4.8 on Windows XP.
Thanks,
Dominik
We're currently working on a game where the player has to run along a long path. The scenes are mostly static and built with repeating segments that are concatenated.
After having the first noticable performance drops, I now generate a StaticGeometry using the following lines:
StaticGeometry sGeo = Renderer.Instance.SceneManager.CreateStaticGeometry("level");
sGeo.AddSceneNode(staticLevelNode);
sGeo.CastShadows = true;
sGeo.Build();
Obviously, that makes a big difference. The framerate is far better now. But now I got a new problem: Transparency sorting. We got lots of trees that have transparent textures, but unfortuantely, StaticGeometry doesn't do any depth sorting (as far as I can see and as far as I can read: http://www.ogre3d.org/forums/viewtopic. ... 96&start=0).
So, the question is: What shall I do?
I thought about traversing the scene graph, pulling out all nodes with transparent materials and put them in a new branch before building the static geometry - do you think this is reasonable? What's the Ogre way of solving problems like that?
In case that makes any difference: I'm using Mogre V1.4.8 on Windows XP.
Thanks,
Dominik