How can I optimize a skeletalMesh? I’ve noticed that if I put 60 skeletalmeshes of a 3d model inside the map, The game runs slower; whereas if i put 60 3d models as staticmeshes, it doesn’t undergo speed variations.
Thanks all for the support!
This is where you make use of lods:
Hi Adeptus! Thanks for your answer! I’ve already created a LOD system, But it doesn’t seem to help anyway. I think the performance decrease doesn’t depend on the number of the rendered triangles
I have a question: I tried to put 5 levels lod for my character. My game played at 40 to 50 fps. By entering these 5 levels lod created simplygon, and by modifying the screen size for viewing, my game goes to 18-20 fps … how come? in addition to put the lod in the character, must do more? thanks a lot!
I also wanted to make a thread on this topic…
my corresponding question is:
does bone translation cost less performance than rotation?
in total war games they unitized only bone translations, you can check them with the help of modding tools. this is the source of my question, but maybe it is related to their instancing technique, and irrelevant in UE4…
until now I found a few ways to increase skeletal mesh rendering performance:
- to use animated billboards as a far LOD replacement, but not yet tried, I used this practice only with another engine (soon I can share my experiences).
- animate actors from C++, no anim blueprint, play only single animations without blending (in my RTS I don’t use pawns/characters because I have a custom pathfinder)
- decrease bone count (<30, e.g. by disabling fingers),
- decrease vertex count (<1000 is fine for an RTS),
- minimize materials count (1),
- lower materials complexity (especially for LOD characters)
Hi sivan! Thanks for your answer! I followed your instructions. Anyway when i create LODS, reducing the number of summits And faces with the simplygon software, performances get down instead of getting up And i don’t understand why. Can You help me? Thanks a lot
Make sure you don’t use physical assets (ragdolls) or at least make sure they are not colliding with anything in the world. Yes, the “ragdoll” can cause performance issue when it is not active. The bodies of the physical assets follows the joints of the character when animated and is evaluated in the physics engine.
You should be able to have hundreds of skeletal meshes without performance issues. Note that skeletal mesh performance is transformation matrix multiplied by the position by each vertex multiplied by the number of influences per vertex. It is the number of vertices that decides calculation costs, not polygons. (polygons are surfaces defined between vertices) Then you also have to take into consideration if the deformation is calculated on the GPU or CPU. In UE3 it was possible to decide which, I haven’t looked into the settings for UE4.
Hi Denny! Thanks for your answer! The physicalAsset is still there, so I’m going to remove it. Anyway i Can’t explain myself why after adding 4 LODS of my character (each of them has Less vertices than the original one), performances have felt down instead of improving. Can You tell me why?
This is my skeletalMesh settings
I removed the PhysicsAsset And performances have improved, But with the 5 LODS i put into the skeletalMesh ( which reduce the vertices number till 450) performances are definitely poorer ( 20 fps less) instead of having one single LOD of the original model ( which has 15 vertices). I really don’t understand why i have a drop on performances rather than an improvement. What am I getting wrong?
maybe lod switching is expensive in UE4? you can play with lod distances to test it…
do you mean screen size?
yeah it is given in that measure, which is indeed camera distance dependent…
I already tried to do it, but the outcome doesn’t change.
strange, it does have a positive effect here…
Are you removing both bones and lowering number of influences in your LOD’s? For example base can be high number but LOD1 should be 1-2 influences MAXIMUM. Every other LOD should have 1 influence per vertex. Otherwise you are missing out on performance gains.
Good point, in another engine I could limit number of bone influences in the bone animation shsder… and I found than switching LOD too often also has a negative effect on performance. Moreover, in these days I finished my flipbook far LOD system, and it has a little benefit too. Both skeletal mesh and flipbook components have a LOD tab at Details panel, where clipping distances can be easily set.
I was wondering how much success you’ve had doing this. How many skeletal meshes have you managed to get running without a massive performance drop? I’d like to get an idea of the upper limits of what is possible (with your performance enhancements) before attempting to do something similar myself.
Performance depends on a lot of things, but my laptop pc just over the minimum specs can deal with max 400 actors, each having one simple material, only 20 bones, using my own custom pathfinder, and a centralized movement system without actor ticking, and a simplified collision mode. FPS falls below 30, but over a distance when they switch to flip book, and shadows also switched off, it goes a bit higher, and my game thread becomes the bottleneck over my GPU. In case of only 200 similar actors there is no real FPS drop. As I remember when I tested navmesh pathfinding with pawns with the same model running a simple behaviour tree, only about 200 was the max acceptable, where sometimes many collision resulted in massive performance drop. I can put here later some screenshots of my testbed environment.