Basic performance question

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
miroslav_karpis
Posts: 12
Joined: Tue Jan 13, 2009 7:12 am

Basic performance question

Post by miroslav_karpis »

Hi,
I would like to ask that what is the 'best performance way/method' for multiple objects? - Or in other words how you would make this?

1 - Main panel
  • - one '.obj' model (loaded as ISceneNode) with texture (8 vertices + speed 2080 fps)
2 - Panel screws
  • - one '.obj' model of one screw (loaded as IAnimatedMesh because of real-time shadows) and the multiplied 4 times (1500 vertices + speed 600 fps) If I have one screw that has 300 vertices and I use it 4 times it means that I'm working with4x300 vertices, right?
- As I read than automatic culling is enabled by default.
- Between Debug and Release it does not make big difference.
- How can I improve that? (I know that less vertices + better textures) but from the 'Irrlicht programming point of view'

a small image example:

Image
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

You'd probably get better performance if you just rendered it all as one model. That would take up slightly more memory as you'd have the screws 4x in the model so lots more vertices etc but doing it all in one draw call instead of 5 would be better (though i don't know how much of a performance boost you'd see).

I'm wondering what the app is? As that's a heck of a lot of polys for something which could be much simpler so I'm wondering if your app has some special focus on that model and not much else?
Image Image Image
miroslav_karpis
Posts: 12
Joined: Tue Jan 13, 2009 7:12 am

Post by miroslav_karpis »

JP wrote:You'd probably get better performance if you just rendered it all as one model. That would take up slightly more memory as you'd have the screws 4x in the model so lots more vertices etc but doing it all in one draw call instead of 5 would be better (though i don't know how much of a performance boost you'd see).
Yes I can do that, but what for example would do the Buttons? I need them as a separate nodes, because of each will have a separete logic... :shock:
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

Its because of the shadows. The stencilshadows are really slow. You would get better results and maybe even more fps when using some shadowmapping like with XEffects.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
miroslav_karpis
Posts: 12
Joined: Tue Jan 13, 2009 7:12 am

Post by miroslav_karpis »

Sudi wrote:Its because of the shadows. The stencilshadows are really slow. You would get better results and maybe even more fps when using some shadowmapping like with XEffects.
shadowmaps - If I'm right than the shadows would be static (would not change with the light source) - am I pls. right?
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

No, shadowmaps are dynamic, but require shaders. Lightmaps are static and generated in advance.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

First of all, it's useless comparing framerates over 200 fps. You are rendering frames below 5ms now, so the difference between the time taken to render frames between different framerates is incredibly small. To render a frame at 2000 fps would be like 0.5ms, most timers aren't nearly that accurate. Also to render at 500 fps would take 2ms. That means the difference between the time taken to render at 2000 fps and 500 fps is a measely 1.5ms! But we can't be sure, it is probably even smaller due to timing inaccuracies.

Second, shadowmaps are less geometry dependant than stencil shadows (For directional/spot lights atleast), which means you can have a high vertex count and maintain a steady framerate. At 1500 vertices however, I doubt you will see an improvement over stencil shadows, and with the latest release of XEffects (XEffectsR), it is a 3 pass technique (To get material independancy!) so it can be quite slow. If you are keen to try shadowmaps you might get better performance with the older wrapper. There is an "Orthogonal Shadow Maps" tutorial in the FAQs forum that includes the older wrapper (With the included zip example + source) and explains how to use a directional light as in your case, so I suggest you look that one up.

Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply