You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
I'm developing an RTS game, and there can be hundreds of units. My current implementation is very naive and causes a lot of overhead because of large amount of nodes.
To test I created different amounts of nodes, each a textureless model consisting of 2000-3000 polygons. After creating 500 nodes CPU core gets 90% loaded and fps drops to 15.
Also I found that even if I move camera away, performance stays the same.
So, what is the best way to handle that this with Irrlicht?
This is not an Irrlicht problem as such. Maybe look into level-of-detail? Models at a certain distance from the camera should be swapped out in favour of low-poly models (though I guess these would need to be combined). You may also be able to cull (remove) models that can't be seen because of the modles between them and the camera.
mongoose7 wrote:You may also be able to cull (remove) models that can't be seen because of the modles between them and the camera.
Hmm... I thought that Irrlicht would do that automatically. I guess I need a custom scene node for this, right?
hendu wrote:3k polys is a lot for a RTS unit, usually covering an area like 50x50 pixels.
mongoose7 wrote:This is not an Irrlicht problem as such. Maybe look into level-of-detail? Models at a certain distance from the camera should be swapped out in favour of low-poly models (though I guess these would need to be combined).
reducing poly count to reduce load on the cpu... let's not talk about it this is not where the issue lies.
I'm quite sure the issue comes from the amount of draw calls one way to optimize it would be instancing but atm irrlicht does not support it so you could use shader instancing