RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.03k stars 178 forks source link

Smoke/Water Particles Cause Huge Framerate Drops When Rendered #1085

Open adriansnetlis opened 8 years ago

adriansnetlis commented 8 years ago

The current particle system seems to be very, very performance heavy. I've got a powerful gaming laptop with GeForce GTX 960M. It can run many modern games with very advanced rendering settings(and even runs Unreal Engine 4 editor on Linux smoothly). However, once a particle appears on my screen in Rigs of Rods, my computer suddenly tells that it is something expensive to render and just slows down to ~5-15 FPS. And it happens whenever I drive over puddles, brake heavily or slide across a dirt road. Those particles come in screen and game performance drops. It seems that it is lack of optimization in the alpha blending, because scenes with more trees are also slow(I'm wondering why those trees don't use alpha clipping - it has much better performance and also hasn't got some depth errors). I hope that this can be fixed up until 0.4.6. Maybe newer OGRE implementation will have better optimized render engine?

WillyB1337 commented 8 years ago

I have the same GPU as you and this issue is happening to me also,

What you could try for now is to download a particles mod from the repo archive, like these :

Since I don't have pictures of them on the repo, you should take a further look at the file to see.

Hiradur commented 8 years ago

This may be an issue with your system configuration, on Linux with a GTX 760 and the proprietary drivers the FPS drop caused by particles is noticeable but not nearly as bad as you describe. The FPS drop by 5-20% with particles on the screen for me.

adriansnetlis commented 8 years ago

It depends on particle amount. For me the particles gives huge FPS drop. The game starts to run slower and, appearantly, the physics is synced with graphics because the game seems to be slow-mo when FPS drops.

Hiradur commented 8 years ago

appearantly, the physics is synced with graphics because the game seems to be slow-mo when FPS drops.

When the FPS drop below 20 the physics engine begins to run slower.

Anyway, I don't think this issue is worth investigating right now. It may be hardware/driver specific but more importantly with the upcoming upgrade to OGRE 2.1 chances are that large parts of the graphics related code will be rewritten anyway.

adriansnetlis commented 8 years ago

That sounds promising. By the way - will it support custom shaders? Because I've got a nice Disney BRDF based shader in one of my .blend files. Basicly it's full PBS, but has no reflections setup. It has great GGX shading, clearcoat and anisotropy support. I may try to put it in the RoR once it's at OGRE 2.1 if it will support custom shaders.

Hiradur commented 8 years ago

will it support custom shaders?

see https://gitter.im/RigsOfRods/rigs-of-rods?at=578f60cc16487c5e5161746c

adriansnetlis commented 8 years ago

That's some nice explanations to many things. But the mysterious integration - I must investigate:D