Yes! And no! Let me explain...Has anyone tried doing all of these suggested performance improvements and running 5-10 AI simultaneously for an Android app, specifically for Oculus Quest? My planned AI behavior tree is fairly simple, just Seek a destination, and play walk/death animations.
Cool. Do you still use GPU Instancer and GPU Instancer - Crowd Animations for the one in YouTube?I wanted to give a quick update on my old post.
As I have progressed in my development I have switch over to a new AI Agent and locomotion system and I wanted to include this as another option for those who are looking for a solution for using the Character Controller with their own AI agents.
First I started from scratch and created my own AI implementation and used the Ultimate character controller's API to connect my AI to the Character Controller. See link for a guide on how to do this: https://opsive.com/support/documentation/ultimate-character-controller/artificial-intelligence/
(Note: If you look in the documentation the controller is structured so it can work with your AI implementations. Also I believe that making your own AI and then integrating it with both Behavoir Designer and the Character Controller is the intended use case from the developers. Please correct me if I'm wrong).
Next I replaced my old animation system with Motion Matching which is an alternative animation system to mecanim that enables fluid and responsive animation without the need of a state machine. If you haven't looked into Motion matching I'd recommend you check it out. Its super cool and best of all it is implemented with Unity's new job system and burst compiler so its supper fast and looks amazing!
Currently there are two options: Kinematica which is a free experimental package from unity and Motion Matching for Unity which is a paid plugin. I ended up using Motion Matching for Unity because its production ready (this may change when Kinematica is fully released).
Motion Matching for Unity: https://assetstore.unity.com/packages/tools/animation/motion-matching-for-unity-145624
Kinematica: https://docs.unity3d.com/Manual/com.unity.kinematica.html
Here is a video that shows my current results from using my own AI agent integrated with Behavior Designer / Character Controller and Motion matching. I have over 100 simply implemented AI units with an average frame rate of 50 to 60 ( The video shows 40 to 50 fps but that's due to my screen recording software )
I feel that this approach is probably the best option if you are looking for both quality and large quantity of AI agents.
Next I replaced my old animation system with Motion Matching which is an alternative animation system to mecanim that enables fluid and responsive animation without the need of a state machine.
I am considering purchasing MxM myself and was wondering if you needed to subclass UltimateCharacterLocomotion to get it working with Kenneth Claassen's package. Can you give a bit more detail into how you integrated the package with UCC? I am worried that abilities that change Slot0ItemStateIndex (and other animator controller parameters) on UltimateCharacterLocomotion will have a hard time getting into MxM.
Thanks
Cool. Do you still use GPU Instancer and GPU Instancer - Crowd Animations for the one in YouTube?
Thank you for sharing the great experience.I wanted to give a quick update on my old post.
As I have progressed in my development I have switch over to a new AI Agent and locomotion system and I wanted to include this as another option for those who are looking for a solution for using the Character Controller with their own AI agents.
First I started from scratch and created my own AI implementation and used the Ultimate character controller's API to connect my AI to the Character Controller. See link for a guide on how to do this: https://opsive.com/support/documentation/ultimate-character-controller/artificial-intelligence/
(Note: If you look in the documentation the controller is structured so it can work with your AI implementations. Also I believe that making your own AI and then integrating it with both Behavoir Designer and the Character Controller is the intended use case from the developers. Please correct me if I'm wrong).
Next I replaced my old animation system with Motion Matching which is an alternative animation system to mecanim that enables fluid and responsive animation without the need of a state machine. If you haven't looked into Motion matching I'd recommend you check it out. Its super cool and best of all it is implemented with Unity's new job system and burst compiler so its supper fast and looks amazing!
Currently there are two options: Kinematica which is a free experimental package from unity and Motion Matching for Unity which is a paid plugin. I ended up using Motion Matching for Unity because its production ready (this may change when Kinematica is fully released).
Motion Matching for Unity: https://assetstore.unity.com/packages/tools/animation/motion-matching-for-unity-145624
Kinematica: https://docs.unity3d.com/Manual/com.unity.kinematica.html
Here is a video that shows my current results from using my own AI agent integrated with Behavior Designer / Character Controller and Motion matching. I have over 100 simply implemented AI units with an average frame rate of 50 to 60 ( The video shows 40 to 50 fps but that's due to my screen recording software )
I feel that this approach is probably the best option if you are looking for both quality and large quantity of AI agents.
@Ace Thanks for sharing your approach. Would you mind describing your final complete solution in a little more detail. I am not sure what components from UCC, if any, you were still using on your NPC's?The example I showed in my YouTube video does not use GPU Instancer or GPU Instancer - Crowd Animations. By just using MxM (Motion Matching for unity) and some simple occlusion culling I was able to get the result I wanted.
For me personally I only optimize when needed and at the moment my current implementation is running just fine but In the future I plan on building more intensive scenes and I may look into using GPU Instancer to help optimize my game. If I do I will make sure to post my results.
Also I should note that GPU Instancer - Crowd Animations is not compatible with MxM at the moment. It is still a good option if your using Mecanim but I’m not using mecanim so I’m no longer using it.
I would also be interested knowing how you approached thisThe example I showed in my YouTube video does not use GPU Instancer or GPU Instancer - Crowd Animations. By just using MxM (Motion Matching for unity) and some simple occlusion culling I was able to get the result I wanted.
For me personally I only optimize when needed and at the moment my current implementation is running just fine but In the future I plan on building more intensive scenes and I may look into using GPU Instancer to help optimize my game. If I do I will make sure to post my results.
Also I should note that GPU Instancer - Crowd Animations is not compatible with MxM at the moment. It is still a good option if your using Mecanim but I’m not using mecanim so I’m no longer using it.