I have a question for you: I’m trying to create a simple game for android device. I have a Sony Xperia Z2 Android device for test my game. I have a Skeletal Mesh of Zombie character that has 1.4k Triangles and has a simple material. I have trying to add 25 - 30 copies of this skeletal mesh in my map and my fps are 60… if I add 60-70 copies of this character in my map, my fps decrease to 20-30… How can I optimize the skeletal mesh so that it can continue to have 60 fps ? I noticed that if I reduce the polycount skeletal mesh , I can not increase the number of fps.
anyone can help me please?
-dont use too many bones and complex animations
-you could decrease the light quality
-how do you play the animation in your level? -> animbp?
Thanks fighter5347 for your answer!
How can i decrease light quality?
I use animbp
First, figure out what’s actually causing the slowdown. To do this, you need to profile.
For example, if you run the game at quarter resolution, and the FPS doesn’t change, then changing shaders, lighting, textures, or post processing won’t matter, because you’re not fill rate bound.
It’s quite likely that you are CPU bound animating the bones of the characters. If this is the case, you should reduce the number of bones in each character, and also try to create LOD versions. You can make a convincing animated person with only five bones, for using in the distance!
With a console command/scalability settings → the shadow console command: Scalability Reference | Unreal Engine Documentation
But yep, first of all check what is causing the fps drop (I think it’s due to the amount of moving objects – dynamic stuff)
Thanks for answer! I have modify my DefaultDeviceProfiles.ini like this:
I have all to low settings, but my fps hasn’t changed. I would try to reduce my zombie character’s number of bones. My character has been made by Mixamo Fuse but actually I don’t know how I can reduce bones number. Can you help me? Thanks all
I have try to use dwarf skeletal mesh that I found in the project “strategy game” of epic games. It has fewer bones than my model of zombies. During the test , the fps of the game have not changed , it remained at 20-30 . What I did notice is that the ai moving zombies in my map drop my fps from 50 to 30 … I have one AI Controller named “EnemyController” create in c++. This Controller, in method BeginPlay, run my BehaviorTree.
Task Wander is written in C++ :
EBTNodeResult::Type UWander::ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
AEnemyController* MyAI = Cast<AEnemyController>(OwnerComp.GetOwner());
if (MyAI && MyAI->GetPawn())
const FVector vector = MyAI->GetPawn()->GetActorLocation();
const FVector Loc = UNavigationSystem::GetRandomPointInNavigableRadius(MyAI, vector, range);
I have tried “stat Game” and open world tick is red with 4-5 ms…
What is the problem?
Thanks for the help!
Where does the profiler say you’re spending all your time?
Can’t see those files on filedropper. Use Dropbox or OneDrive or Google Drive that actually works for sharing.
Anyway, “stat window” isn’t particularly helpful. You need to get a profile for where you really spend your time in the program.
If removing AI makes the speed increase, then it’s likely you’re CPU bound. If so, you should adjust the AI to run slower, run fewer path/ray tests, etc.
If i remove AI speed increase, but AI have a simple move to destination… nothing complex…
Stop making assumptions, and start trusting the data! (Of course, you have to know what the data is actually saying, rather than what you assume it’s saying …)
Do you call MoveToDestination() each tick? If so, the engine is making pathfinding tests every tick. That will suck down the CPU cycles pretty hard.
Thanks jwatte for your answer! I have modified my Behavior tree and now I call MoveToDestination() once, but nothing has changed…
Is there a lod system also for the character’s movement? I noticed that if I move away from character , not enough to be more relevant , he continues to run the moveTo to ’ infinity … But I would like it to stop when it is no longer relevant