Load some mesh, fps drop hardly

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Dragonnblack
Posts: 5
Joined: Mon May 30, 2016 7:42 am

Load some mesh, fps drop hardly

Post by Dragonnblack »

Hello,

With a team we're coding a Lemmings like with Irrlicht,

But at the start we are at like 600fps, but when we load characters with md3 files at 40mo, the fps drop so hard

When we have 6 characters we have 15fps.

We must have 80 characters on the maps, a little joke bt I think that we're doing something wrong. But don't know what.

I'm looking for you to help up,

Thanks in advance.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Load some mesh, fps drop hardly

Post by hendu »

40mb mesh? That's way too big for a realtime game, especially if you want more than one. A lemming, a tiny character, should be a couple hundred polys max.
Dragonnblack
Posts: 5
Joined: Mon May 30, 2016 7:42 am

Re: Load some mesh, fps drop hardly

Post by Dragonnblack »

Humm ok but what did you mean by polys? polygone ? face?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Load some mesh, fps drop hardly

Post by CuteAlien »

Yeah, polygons. The exact numbers are always depending on many factors (light, textures, transparency and certainly the target platform).
For example with that many characters you might limit polygon numbers to 500 polygons per character. Unless you do crazy specific stuff (tons of lights) or target very slow mobile platforms you should be fine then.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: Load some mesh, fps drop hardly

Post by Cube_ »

a 40mb mesh is likely up in the hundreds of thousands of polygons.
For this you may at most need ~5-10k tris/character and that's still probably overkill for something like this.
"this is not the bottleneck you are looking for"
Dragonnblack
Posts: 5
Joined: Mon May 30, 2016 7:42 am

Re: Load some mesh, fps drop hardly

Post by Dragonnblack »

Ok,

My mates converted his md3 in b3d, now file is 2mb.

Fps drop lessly but still here, is it possible that mesh are again the cause?
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Load some mesh, fps drop hardly

Post by hendu »

Yes. A 2mb b3d can still have tens of thousands of polys.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Load some mesh, fps drop hardly

Post by CuteAlien »

Open the file in the meshviewer example- it shows the polygon numbers of the scene you look at (might call them primitives which is the same in this case). Or import it in blender - that shows the polygons of the selected object.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Dragonnblack
Posts: 5
Joined: Mon May 30, 2016 7:42 am

Re: Load some mesh, fps drop hardly

Post by Dragonnblack »

Humm yes there is like 17 000 polygons,

I'm on the way to down this number
Dragonnblack
Posts: 5
Joined: Mon May 30, 2016 7:42 am

Re: Load some mesh, fps drop hardly

Post by Dragonnblack »

Tested with 17 polys, when I got 30 characters my fps drop undo 10, I have some loop to apply gravity, it should come from this.

Thx guys
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Load some mesh, fps drop hardly

Post by CuteAlien »

Try with disabling animation if you have one. Could also come from there. Otherwise use a tool to check like "very sleepy" (http://www.codersnotes.com/sleepy/) (need to compile with debug-info for useful output from that one, but very easy to use).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply