StaticGeometry and Transparencies Work-Around?

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:


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

Bekas

10-02-2009 18:53:03

Hi Dominik,

This is not specific to Mogre, you should post to the main forums.
The Ogre way is (mostly) the Mogre way :wink:

InikOfDoom

11-02-2009 09:04:31

Hi Bekas.

Thanks for the hint. I apologize. Good excuse: I'm new here... ;)

I'll post this to the Ogre forum.

Thanks,
Dominik