Maintaining Speed

Problems building or running the engine, queries about how to use features etc.
User avatar
Mr_Ridd
Goblin
Posts: 297
Joined: Fri Jun 04, 2004 10:01 pm
Location: South Africa
x 1

Maintaining Speed

Post by Mr_Ridd »

Hey

I have a slight issue and I'm not sure if it's OGRE or if I'm doing something wrong. I made a model of a picket fence ( a section ) which is about 200 polys. If I add about 10 to 15 of these fences I get a big lag. If you do the math it's only about 3000 polys plus the heightmap. How do games like Half-Life 2 and Medal Of Honour Pacific Assault maintain their framerate, bearing in mind they have effects and all different things going on at the same time?

Thanks
The ability to succeed is the ability to adapt
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67

Post by sinbad »

Well, aside from the whole 'batching' discussion which has been had many times already on this forum, are you sure it's even Ogre? I have a test case here which renders lots of entities at once:
Image

That's 400 Ogre heads in the scene (not all visible at once), each one is 4500 polys at full detail, LOD to a minimum of about 1000 at very far distance - that shot has a total of over 100,000 polys. Each one is 4 render operations too. Still I get 150-200fps.

So I can't understand why you're saying you get such big lags. Are you sure you're not doing something whic is causing it?
User avatar
Mr_Ridd
Goblin
Posts: 297
Joined: Fri Jun 04, 2004 10:01 pm
Location: South Africa
x 1

Post by Mr_Ridd »

I really don't know how you do that. If I add like 5 ninjas it lags. Perhaps because I have a terrain and I'm keeping all objects above the terrain with ray casting collision. But that shouldn't make it lag. Even other demos I've seen, like the racing one, they have quite a lot of things in the scene and I presume they get a decent frame rate.
The ability to succeed is the ability to adapt
stodge
Goblin
Posts: 217
Joined: Thu Oct 24, 2002 4:12 am
x 1

Post by stodge »

Do you have any profiling tools you can run on your code?
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2

Post by Kencho »

Maybe the problem is performing ray collision for every object...
Also, I've had serious lag problems caused by writing to disk with logging. Another possibility is that you're runinng on debug mode...
Image
User avatar
epopov
Halfling
Posts: 85
Joined: Tue Jun 10, 2003 2:57 pm

Post by epopov »

Also, maybe your fences use textures with alpha and are displayed big on screen ?