Pranjal Bhattacharjee
Pranjal Bhattacharjee
  • 22
  • 51 203
UE5 C++ ThreadSafe MotionMatching | Part 2 | The AnimInstance
In this #unrealengine5 video we will learn how to write thread safe functions. We will write functions that we can bind to our #Choosertables and I will also show you how to write functions that you can bind to your #animnodes
มุมมอง: 67

วีดีโอ

UE5 C++ ThreadSafe MotionMatching | Part 1 | Project Setup
มุมมอง 52321 ชั่วโมงที่ผ่านมา
In this video I will setup our public dependency modules, and our AnimInstance Proxy so that we can access the necessary data from inside our thread safe functions. I will also setup our player character in this video
UE5 C++ MotionMatching Performance Test
มุมมอง 44328 วันที่ผ่านมา
In this video I perform some performance tests on my motion matching project to determine the frame time difference between C thread safe and blueprint non thread safe implementations of the animation blueprint.
UE5 C++ Thread Safe Motion Matching
มุมมอง 720หลายเดือนก่อน
I recreated the motion matching sample project in c and with thread safety. I will be uploading a tutorial on this soon and I will also perform some tests to see if I get better performance
Ue5 C++ Tutorial - Attach AI Perception to Head Bone
มุมมอง 3.5K2 ปีที่แล้ว
Attach the AI Perception Component to The Head Bone so that it follows the head and rotates along with animations. Download the project from : drive.google.com/drive/folders/15QTUOyvu2jph9fSEJCxhgvIkCZg1wL0u?usp=sharing This project is in ue5. You may not be able to open the project in a earlier version.
Ue4 C++ AI Behavior Essentials Part 5 | Coordinated Cover System
มุมมอง 4.4K2 ปีที่แล้ว
This a tutorial on an advanced AI cover system with tactical behaviors such as bounding over watch and retreating. This project is now 4.27 only. You will not be able to open it in an earlier version. Download the project from : drive.google.com/drive/folders/1T17f4wOq2x7fpQXHMdlOg9VV3wVzhTa3?usp=sharing Download the UE5 version from: github.com/JanakPRB/AITutorial5.0.git
Ue4 C++ AI Behavior Essentials - Combat Behavior Test 2 | Cover Combat
มุมมอง 4072 ปีที่แล้ว
Testing coordinated cover combat behavior for our bots
Ue4 C++ AI Behavior Essentials Part 4 - Strafing and Shooting
มุมมอง 3.1K2 ปีที่แล้ว
In this video we create our first combat behavior for our bots which is strafing and shooting. Download The Project From : drive.google.com/drive/folders/1T17f4wOq2x7fpQXHMdlOg9VV3wVzhTa3?usp=sharing
Who Says Game Development Isn't Fun | Ue4 C++ AI Combat Behavior Test 1
มุมมอง 3692 ปีที่แล้ว
Just having some fun playing around with some AI Combat Behavior Testing
Ue4 C++ AI Behavior Essentials Part 3 - AI Decision Making
มุมมอง 4.2K2 ปีที่แล้ว
This video deals with setting up our AI's decision making system, target selection using the eqs system and the beginnings of group behavior setup.
Ue4 C++ AI Behavior Essentials Part 2 - Smart Objects
มุมมอง 4.5K2 ปีที่แล้ว
#runbehaviordynamic This video is about using Smart Objects in Ue4 with C
Ue4 C++ AI Behavior Essentials Part 1 - Behavior Tree Setup
มุมมอง 9K2 ปีที่แล้ว
In this video we download our custom template project and setup the behavior tree to run at begin play. Download the Project From drive.google.com/drive/folders/1PdzbzqB-dJS6Ytq4YYtMtIXWFcpn38wB?usp=sharing Download the full project (UE5 Version) from github.com/JanakPRB/AITutorial5.0
Ue4 C++ AI Behavior Essentials Series Intro
มุมมอง 7502 ปีที่แล้ว
#Strafing #SmartObjects #CoverSystem #BoundingOverwatch These videos are about creating advanced AI behaviors in Unreal Engine using C and Behavior trees.
Ue4 C++ Multiplayer | Tutorial Coming Soon
มุมมอง 2812 ปีที่แล้ว
#Ue4Multiplayer #Ue4C #Ue4MultiplayerMantling #Ue4ReplicatedMovement This is a multiplayer project I am working on and will be making tutorials for you very soon. This project will contain modular clothing assets, multiple animation states, network authoritative movement (no rubberbanding even at very high network latency), Mantling, Vehicles and much more.
Mixamo To Ue4/Ue5 In One Click For Free Tutorial
มุมมอง 2.6K2 ปีที่แล้ว
Bring in animations from Mixamo to Unreal Engine with Root motion with just One Click using a completely free Converter Tool called Mixamo Converter. Download the tool from terribilisstudio.fr/
Detection By Affiliation - Ue4 C++ Tutorial
มุมมอง 6K3 ปีที่แล้ว
Detection By Affiliation - Ue4 C Tutorial
C++ AI Perception | Make AI Look At Any Bone | AI Perception to Custom Sockets - UE4 C++ Tutorial
มุมมอง 3.9K3 ปีที่แล้ว
C AI Perception | Make AI Look At Any Bone | AI Perception to Custom Sockets - UE4 C Tutorial
Easiest UE5/UE4 C++ Multiplayer Turn In Place Without RPCs
มุมมอง 2.4K3 ปีที่แล้ว
Easiest UE5/UE4 C Multiplayer Turn In Place Without RPCs
Ue4 C++ AI WIP : (zigzagging and maintaining distance)
มุมมอง 5103 ปีที่แล้ว
Ue4 C AI WIP : (zigzagging and maintaining distance)
Ue4 WIP: C++ AI vs AI (Strafing Behavior With EQS)
มุมมอง 2.3K4 ปีที่แล้ว
Ue4 WIP: C AI vs AI (Strafing Behavior With EQS)
Ue4 WIP: C++ Coordinated AI Cover to Cover Movement (Bounding Overwatch)
มุมมอง 9304 ปีที่แล้ว
Ue4 WIP: C Coordinated AI Cover to Cover Movement (Bounding Overwatch)
Ue4 WIP : C++ AI vs AI (Flanking Behavior)
มุมมอง 9174 ปีที่แล้ว
Ue4 WIP : C AI vs AI (Flanking Behavior)

ความคิดเห็น

  • @FunWithSmexy
    @FunWithSmexy 2 วันที่ผ่านมา

    you should do a comparison video once your finish to see the performance difference

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 2 วันที่ผ่านมา

      I already did. Here is the link th-cam.com/video/5NGTvlIPrQs/w-d-xo.html

    • @FunWithSmexy
      @FunWithSmexy 2 วันที่ผ่านมา

      @@pranjalbhattacharjee5601 o awesome :)

    • @shannenmr
      @shannenmr วันที่ผ่านมา

      I moved 90% of these functions JUST to the BlueprintThreadSafeUpdateAnimation override function on the AnimBP which reduced the AnimGameThreadTime function time by more than 1/2, moving the remaining functions let alone moving it to C++ would probably git a 90+% increase. With only 1 Character using Motion Matching the improvement is negligible but when you start using it for AI or say PVP/Co-Op it lets you potentially get an easy 2 to 3 times more Characters then the OOTB setup (depending on what ultimately your Bottleneck is).

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 วันที่ผ่านมา

      Yes it would let us have more active characters on screen.

  • @ri96379
    @ri96379 2 วันที่ผ่านมา

    will you release the project for download ?

  • @hesamsadat4288
    @hesamsadat4288 2 วันที่ผ่านมา

    Of course when it adds up, the more Optimization which is excruciating, but shall stand out!

  • @hesamsadat4288
    @hesamsadat4288 2 วันที่ผ่านมา

    Perfect. You really are a life-savor. THNX❤❤

  • @ri96379
    @ri96379 2 วันที่ผ่านมา

    Waiting for the next part 😊

  • @the_extraordinary_journe
    @the_extraordinary_journe 5 วันที่ผ่านมา

    bro hindi me c++ for unreal ka course la do yar

  • @gstreetgames2530
    @gstreetgames2530 7 วันที่ผ่านมา

    Have you considered using ALS-Refactored as the C++ base instead of making the character core from scratch? This way it would have replication from the start and a lot of the threadsafe work is also already done, IIRC. Using a custom from-scratch anim BP on their base is also possible. I'm just curious if it was even on your radar prior to deciding on this path?

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 7 วันที่ผ่านมา

      @@gstreetgames2530 I like using my own stuff atleast when it comes to code.....that way I know the ins and outs of the system and don't have to spend time learning the system.....I don't like how als uses the tick function on the player so even if I used that project I would have to go in and modify the player class anyway and replication isn't a priority right now but I might add replication later

    • @gstreetgames2530
      @gstreetgames2530 7 วันที่ผ่านมา

      @@pranjalbhattacharjee5601 ah, shame. Good open source projects always need creative help, but nobody working on animation these days seems to like replication. Truth be told, I don't blame any of ya. It's an added difficulty layer that is rarely appreciated by the end users anyway. I think you may have what I asked about confused with classic ALS though, that abuses tick way too much for sure.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 7 วันที่ผ่านมา

      @@gstreetgames2530 Replicating traversal would be the difficult part for this project

  • @skeefab5590
    @skeefab5590 8 วันที่ผ่านมา

    little info , when player jump , please the camera don't follow the movement , its make headache

  • @chaosduck608
    @chaosduck608 8 วันที่ผ่านมา

    I'm pretty sure you don't need an anim instance proxy anymore, UE5 (and maybe 4.27) added the NativeThreadSafeUpdate in anim instance for you to use in c++. If you want to access the anim instance from another anim instance during the updates, you can still call GetProxyAnyThread and access the anim instance, so you don't have to bother setting up a separate proxy

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 8 วันที่ผ่านมา

      I did override the NativeThreadsafeUpdate function later in the video. We do need the proxy I will show you in the next video

  • @todddurholt2666
    @todddurholt2666 8 วันที่ผ่านมา

    hopefully not a dumb question but what is the variable type in the CharacterBase_Bp> blueprint variables in the Animation category for the gait settings i know its a type of array? pls help

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 8 วันที่ผ่านมา

      @@todddurholt2666 It's a TMap. It uses the EGaits enum as the key and the FGaitSettings as the value

    • @todddurholt2666
      @todddurholt2666 8 วันที่ผ่านมา

      so yes I got the TMap but where is the FGaitSettings for the value? just found it thank you so much

  • @shannenmr
    @shannenmr 9 วันที่ผ่านมา

    Nice I was just going through this myself as I finally had a minute and someone on reddit posted their C++ conversion project of the base character / classes but none of the multithread AnimBP improvements

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 9 วันที่ผ่านมา

      In this series I will rewrite a thread safe version of the entire anim bp from game animation sample. Hope people find it useful

    • @shannenmr
      @shannenmr 9 วันที่ผ่านมา

      @@pranjalbhattacharjee5601 Yeah I had only got through moving everything to use Property Access enabling thread-safe on the functions I could along with moving the main 3 functions into the BP Threadsafe function and I was able to quickly reduce AnimGameThread to 85 micro seconds down from like 200+ with another easy 25+ gain potential after I changed the logic which needs to read a curve or check if a slot is in use which appears to not be threadsafe / run on foreground thread.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 8 วันที่ผ่านมา

      Were you able to make all three functions thread safe ??......I thought the selected pose search data base variable in blueprints was a non thread safe variable and so you shouldn't have been able to get the current database tags 😕

    • @shannenmr
      @shannenmr 8 วันที่ผ่านมา

      @@pranjalbhattacharjee5601 Hmm what happened to my other comment, anyways I didn't have any issues using Property Access to read Current Selected Database.Tags but I did need to bypass "Handle Trajectory World Collision" for now because its not marked as BP Threadsafe no.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 8 วันที่ผ่านมา

      @@shannenmr Ok 🤔

  • @hesamsadat4288
    @hesamsadat4288 9 วันที่ผ่านมา

    You are a Life-Savor thanks man. waiting for more specially Performative Replicated GASP

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 9 วันที่ผ่านมา

      @@hesamsadat4288 The plan is to first recreate (mostly) the sample project and then I can look into replication. I also want to do the layering system devops is doing.

  • @burakucpnar4965
    @burakucpnar4965 14 วันที่ผ่านมา

    Hi Pranjal.I downloaded the project UE 5.0 but I could not open it.Gives me " AITutorial could not be compiled.Try rebuilding from source manually " mistake.I looked for from Internet and tried many ways but did not work.Please could you help me to continue your aı tutorial series?Thank you

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 14 วันที่ผ่านมา

      @@burakucpnar4965 which unreal engine version are you using ?

    • @burakucpnar4965
      @burakucpnar4965 14 วันที่ผ่านมา

      @@pranjalbhattacharjee5601 UE 5.0

    • @burakucpnar4965
      @burakucpnar4965 13 วันที่ผ่านมา

      @@pranjalbhattacharjee5601 I'm using 5.0.3 version and tried to open it in 5.1 but did not open again.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 13 วันที่ผ่านมา

      @@burakucpnar4965 Ok I will update it to the latest version but it will take a little time I am working on the motion matching tutorial

    • @burakucpnar4965
      @burakucpnar4965 13 วันที่ผ่านมา

      @@pranjalbhattacharjee5601 Thanks a lot for your help by the way it opened in 5.0 version after a few try somehow

  • @superkalio
    @superkalio 22 วันที่ผ่านมา

    Thanks man for the share! 🔥🔥🔥 #UnrealEngine #Tutorial #AI #AIPerception #C++ #GameDevelopment #GameDev #Gaming #Trending #Viral

  • @unrealdevop
    @unrealdevop 24 วันที่ผ่านมา

    Yeah good comparison there, makes sense though considering that most of the hit from the testing of animation system's I've seen come directly from the Logic itself.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 24 วันที่ผ่านมา

      @@unrealdevop You are doing a great job with your motion matching project thanks for releasing it

    • @unrealdevop
      @unrealdevop 24 วันที่ผ่านมา

      @@pranjalbhattacharjee5601 Yeah no problem. Just trying to help people understand the Layering Technique.

  • @shannenmr
    @shannenmr 26 วันที่ผ่านมา

    Remember all that "ms to FPS" doesn't scale linearly so that gained ms can actually be a lot depending on your performance target when you know that you need 16.67ms or lower for 60FPS or 33.333ms or lower for 30 FPS (90 FPS needs 11.11 ms or lower). From your test 17ms is like 58 FPS where as 23 ms is like 43 FPS so that difference is going to be noticeable unless you're a AAA pushing the "30 FPS Cinematic" line. (Yes Packaged it should run somewhat faster but you would need to validate)

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 26 วันที่ผ่านมา

      Yes.....I was trying to figure out if it makes any difference and like you said I think the difference would be noticeable

    • @shannenmr
      @shannenmr 26 วันที่ผ่านมา

      @@pranjalbhattacharjee5601 Also that's with zero other game code running in your example, would be interesting to see the Unreal Insights capture for what specifically was still being processed on the game thread for the AnimBP.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 26 วันที่ผ่านมา

      It probably wasn't zero game code because the virtual input actor is running some blueprint and the player is also running some blueprint (inputs) on the game thread.....but yeah insight would paint a clearer picture.

  • @burakucpnar4965
    @burakucpnar4965 27 วันที่ผ่านมา

    Glad to see you again and with all my appreciate to you for share AI Shooter tutorials especially as C++.Thank you again.

  • @davider1877
    @davider1877 29 วันที่ผ่านมา

    What do you use the Anim Proxy for?? if you cache your references and data on the NativeUpdateAnimation then it should be safe to do the computation in the NativeThreadSafeUpdateAnimation

  • @shannenmr
    @shannenmr หลายเดือนก่อน

    Since the announcement of the Motion Matching sample I have asked them to make sure they atleast used the "Blueprint Thread Safe Update" function along with Property Access and fully FastPath and didn't get any response until recently LongmireLocomotion replied with "Oh we definitely considered it! In the end, we opted for how it is currently for a number of reasons. Mainly we wanted it to be instantly understandable to new users (something Lyra struggled with), and there were tool limitations that prevented us from fully fast path stuff anyway. However, we aren't finished with the sample and will be making performance passes in the future! So your feedback is definitely taken to heart!". Something I did notice in some of the brief performance testing I did some of the new Anim nodes like the Chooser appear to have considerably more performance impact then it has any right to require.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 หลายเดือนก่อน

      Yes I will do some performance tests and see if making it thread safe actually makes a difference. I have also noticed choosers to be heavy on performance.....I could be wrong and I definitely haven't gone through the source code but it feels like a nested "if else" block to me

    • @shannenmr
      @shannenmr หลายเดือนก่อน

      @@pranjalbhattacharjee5601 I just don't believe Fortnite uses this per the sample, I feel like Fortnite has some custom fully threaded setup and this is some initial productisation that's been handed off

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 หลายเดือนก่อน

      @@shannenmr Maybe more changes to this system are coming and choosers are thread safe as far as I can tell because only thread safe functions are available for binding

  • @hydrawq
    @hydrawq หลายเดือนก่อน

    i hope u will do tutorial, or atleast paid udemy course

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 หลายเดือนก่อน

      Yes I will post tutorials on this. Sorry for not uploading more often

  • @NapoleonLouverture
    @NapoleonLouverture 2 หลายเดือนก่อน

    This was the first c++ class I added to my project and it worked flawlessly. Thanks for making my AI more dangerous.

  • @Waffle-ish
    @Waffle-ish 2 หลายเดือนก่อน

    you should check out eleven labs :D

  • @dookee9626
    @dookee9626 2 หลายเดือนก่อน

    Can you make a tutorial on how to make ai look at any bone for UE5?

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 2 หลายเดือนก่อน

      I already have a tutorial for that on my channel but ok I will make an updated one. It might take a week or so

  • @EdGameplayer
    @EdGameplayer 3 หลายเดือนก่อน

    please, share the source file of the project

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 3 หลายเดือนก่อน

      github.com/JanakPRB/AITutorial5.0.git

    • @EdGameplayer
      @EdGameplayer 3 หลายเดือนก่อน

      @@pranjalbhattacharjee5601 Do you have the source files of the UE4.27 version?

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 3 หลายเดือนก่อน

      @@EdGameplayer Unfortunately I don't have it anymore

  • @trumpstuck5830
    @trumpstuck5830 3 หลายเดือนก่อน

    Not working.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 3 หลายเดือนก่อน

      It will....follow all the steps. You might have missed something....make sure you have added the HeadSocket to the mesh aswell

    • @trumpstuck5830
      @trumpstuck5830 3 หลายเดือนก่อน

      ​@@pranjalbhattacharjee5601 I take back, its working now. Show you my nana.

  • @greengamerguy623
    @greengamerguy623 4 หลายเดือนก่อน

    I'm having a big problem with the Client not working the perception socket/bone can be changed but it doesn't attach please need help using 5.3

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 4 หลายเดือนก่อน

      I am not sure I understand what you are saying but for the "can be seen from" function to work, all he characters need to inherit from the same base class

  • @user-sv6ei4do4q
    @user-sv6ei4do4q 4 หลายเดือนก่อน

    Thank You Very Much!!!!

  • @D.Mario03
    @D.Mario03 4 หลายเดือนก่อน

    Can you make it so that it will look at different bones by itself and not at runtime from the player input ?

  • @mise6969
    @mise6969 5 หลายเดือนก่อน

    Hey man, really cool project, it seems like the drive link is outdated since it gives me a error 404. Would you be able to update it? Thanks!

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 5 หลายเดือนก่อน

      Here is the github link for the completed project unfortunately I no longer have the starter project github.com/JanakPRB/AITutorial5.0.git

    • @mise6969
      @mise6969 5 หลายเดือนก่อน

      Alright thanks

  • @CloporteIsBack
    @CloporteIsBack 8 หลายเดือนก่อน

    Isn't it a bit redundant to create a BlackboardComponent ? We already got one in AIController.h (same with UBehvaiorTreeComponent which is the BrainComponent in AIController.h).

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 8 หลายเดือนก่อน

      Just like there is a default player controller that possesses the player even if we don't create one......but if we need custom logic then we need to create a player controller of our own.....this blackboard component is our custom one.....and the brain component is not the behaviour tree component

    • @CloporteIsBack
      @CloporteIsBack 8 หลายเดือนก่อน

      @@pranjalbhattacharjee5601 I suppose I'll see with the next tutorials, but the AAIController::RunBehaviorTree function still creates a UBehaviorTreeComponent and assigns it to the BrainComponent.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 8 หลายเดือนก่อน

      @@CloporteIsBack Ok I will check it out.... thanks for the information

  • @youssh4975
    @youssh4975 8 หลายเดือนก่อน

    To anyone following this in 2023 and having trouble with the following line: - EnemyKeyId = BBC->GetKeyID("TargetActor"); Just declare your "EnemyKeyId" as uint16 instead of uint8. It appears they've changed the default size of blackboard keys id's to be 16.

  • @lincdesync
    @lincdesync 8 หลายเดือนก่อน

    Thank you very much for these tutorials. Both documentation and resources on C++ side of AI controls for UE is just not enough. And your take on the topic with this much detail is really helpful. Cheers.

  • @farhantanvir8077
    @farhantanvir8077 8 หลายเดือนก่อน

    HEy why dont u make Udemy cource about fps advanced ai please make it u er r only gives better than paid udemy "Advanced AI in c++" actually that is misleading tittle made me wonder after finish that course i feel empty i dont have any progress to make decent fps game then i found your channel i have learn so much from you please consider yourself start making Udemy Course about advance ai i will be the first one buy your course Unreal engine 5 community needs you

  • @GAMEDEV_PRO
    @GAMEDEV_PRO 9 หลายเดือนก่อน

    can you please reupload the ue4.27 version the link is broken

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 9 หลายเดือนก่อน

      Sorry I don't have the 4.27 project anymore.....the difference between the versions is just the "can be seen from function"..... everything else is the same

  • @hydrawq
    @hydrawq 9 หลายเดือนก่อน

    do u have any udemy course for multiplayer? done by you any plans of doing it? i see u have stopped uploading video too

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 9 หลายเดือนก่อน

      There are plans but I am busy with client projects.....I will upload more videos on this channel soon.....sorry for the delays

  • @lonesomehermit2414
    @lonesomehermit2414 9 หลายเดือนก่อน

    For anyone caught on GetKeyID for the blackboard component, the new default size for the int is 16 so at uint8 EnemyKeyID change that to uint16 EnemyKeyID

  • @pineapploudofficial
    @pineapploudofficial 10 หลายเดือนก่อน

    if i already have a full programmed character in bp is it possible to add the c++ or edit the character class ?

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 9 หลายเดือนก่อน

      Yes.....create the c++ character and set it as the parent class for the blueprint character

  • @evilspoon6833
    @evilspoon6833 ปีที่แล้ว

    Pr0 coder spotted, utorrent best code editor :)

  • @dominikwerner6608
    @dominikwerner6608 ปีที่แล้ว

    Using this as a base, I have implemented a struct to create groups within in the faction, so the defenders of a faction are not limited to engage only at one location on the map. This uses simple proximity based clustering (clusters can also be dissolved or some agents absorbed by other clusters). I found that this approach makes the AI look much more proactive, especially since agents that enter a cluster get the target of this cluster, even if it is not detected by their perception. Also, I have added an additional actor that is just a collider, that allows me to designate any part of a level as cover. This makes level design much easier in my case since I do not have to create many different cover blueprints.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      That sounds great..... good job

    • @dominikwerner6608
      @dominikwerner6608 ปีที่แล้ว

      @@pranjalbhattacharjee5601 I really have to thank you again. Your series helped me to really get into UE AI from a C++ perspective

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      @@dominikwerner6608 Happy to help 😊

  • @tuatec
    @tuatec ปีที่แล้ว

    Changing the teamId at runtime needs to notify the AI system of Unreal. Sadly I forgot what method needs to be called.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      I figured it out just didn't get the time to update the video....there is a set team id function in the interface

  • @MrVladiebaddie
    @MrVladiebaddie ปีที่แล้ว

    Kind of wish there was more C++ stuff for UE 5.0+. Thanks for the video it helped me out a ton even if it's a bit dated at this point.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      Let me know if you need the updated code for ue5

    • @MrVladiebaddie
      @MrVladiebaddie ปีที่แล้ว

      @pranjalbhattacharjee5601 I'm good. I have it updated and running with no issues. It might break once I try to hook it up to a behavior tree.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      @@MrVladiebaddie It should also work correctly with behavior trees.

  • @salimf6041
    @salimf6041 ปีที่แล้ว

    god bless you ,thanks man🌺🥀

  • @DavidRicardo97
    @DavidRicardo97 ปีที่แล้ว

    This looks a great tutorial but Perception is not running here. Perhaps i did some mistake or the content is outdated. Thank you anyway for sharing!

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      Use this for ue5.1 // Custom View Target For AIPerception Component bool ACharacterBase::CanBeSeenFrom(const FVector& ObserverLocation, FVector& OutSeenLocation, int32& NumberOfLoSChecksPerformed, float& OutSightStrength, const AActor* IgnoreActor, const bool* bWasVisible, int32* UserData) const { static const FName NAME_AILineOfSight = FName(TEXT("TestPawnLineOfSight")); FHitResult HitResult; FVector SocketLocation = GetMesh()->GetSocketLocation(PerceptionTarget); const bool bHitSocket = GetWorld()->LineTraceSingleByObjectType(HitResult, ObserverLocation, SocketLocation, FCollisionObjectQueryParams(ECC_TO_BITFIELD (ECC_WorldStatic) | ECC_TO_BITFIELD(ECC_WorldDynamic)), FCollisionQueryParams(NAME_AILineOfSight, true, IgnoreActor)); NumberOfLoSChecksPerformed++; if (bHitSocket == false || (HitResult.GetActor() && HitResult.GetActor()->IsOwnedBy(this))) { OutSeenLocation = SocketLocation; OutSightStrength = 1; return true; } const bool bHit = GetWorld()->LineTraceSingleByObjectType(HitResult, ObserverLocation, GetActorLocation(), FCollisionObjectQueryParams(ECC_TO_BITFIELD(ECC_WorldStatic) | ECC_TO_BITFIELD(ECC_WorldDynamic)), FCollisionQueryParams (NAME_AILineOfSight, true, IgnoreActor)); NumberOfLoSChecksPerformed++; if (bHit == false || (HitResult.GetActor() && HitResult.GetActor()->IsOwnedBy(this))) { OutSeenLocation = GetActorLocation(); OutSightStrength = 1; return true; } OutSightStrength = 0; return false; }

    • @DavidRicardo97
      @DavidRicardo97 ปีที่แล้ว

      @@pranjalbhattacharjee5601 I'm using 4.27. My AIControllerBase is running BeginPlay but isn't running OnPossess Event, for some reason.

    • @DavidRicardo97
      @DavidRicardo97 ปีที่แล้ว

      Ok, I've found the bug and it's working. Thank you!

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      @@DavidRicardo97 do you have a blueprint version of the on possess event....??....if so call the parent function first before the blueprint logic

  • @ashwinj9879
    @ashwinj9879 ปีที่แล้ว

    Does this work on ue5.1?

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      Use this for ue5.1 // Custom View Target For AIPerception Component bool ACharacterBase::CanBeSeenFrom(const FVector& ObserverLocation, FVector& OutSeenLocation, int32& NumberOfLoSChecksPerformed, float& OutSightStrength, const AActor* IgnoreActor, const bool* bWasVisible, int32* UserData) const { static const FName NAME_AILineOfSight = FName(TEXT("TestPawnLineOfSight")); FHitResult HitResult; FVector SocketLocation = GetMesh()->GetSocketLocation(PerceptionTarget); const bool bHitSocket = GetWorld()->LineTraceSingleByObjectType(HitResult, ObserverLocation, SocketLocation, FCollisionObjectQueryParams(ECC_TO_BITFIELD (ECC_WorldStatic) | ECC_TO_BITFIELD(ECC_WorldDynamic)), FCollisionQueryParams(NAME_AILineOfSight, true, IgnoreActor)); NumberOfLoSChecksPerformed++; if (bHitSocket == false || (HitResult.GetActor() && HitResult.GetActor()->IsOwnedBy(this))) { OutSeenLocation = SocketLocation; OutSightStrength = 1; return true; } const bool bHit = GetWorld()->LineTraceSingleByObjectType(HitResult, ObserverLocation, GetActorLocation(), FCollisionObjectQueryParams(ECC_TO_BITFIELD(ECC_WorldStatic) | ECC_TO_BITFIELD(ECC_WorldDynamic)), FCollisionQueryParams (NAME_AILineOfSight, true, IgnoreActor)); NumberOfLoSChecksPerformed++; if (bHit == false || (HitResult.GetActor() && HitResult.GetActor()->IsOwnedBy(this))) { OutSeenLocation = GetActorLocation(); OutSightStrength = 1; return true; } OutSightStrength = 0; return false; }

  • @ShadowClaw_Dev
    @ShadowClaw_Dev ปีที่แล้ว

    Can you tell me, how does the algorithm work? I am also working on a AI system, right the AI knows cover. Just need an explanation.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      Well it's just a nav filter

    • @ShadowClaw_Dev
      @ShadowClaw_Dev ปีที่แล้ว

      @@pranjalbhattacharjee5601 Sorry I meant cover not flanking in when I was saying "AI knows flanking"

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      @@ShadowClaw_Dev There is no algorithm nothing behind this version of flanking you see in the video.....you could do influence mapping or things like that.....but I am just using a nav filter attached to the target bot and using it to define a "threat vector" so that the bots know to avoid spaces inside the threat vector for navigation queries

    • @ShadowClaw_Dev
      @ShadowClaw_Dev ปีที่แล้ว

      @@pranjalbhattacharjee5601 Oh thanks for helping me understand.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      @@ShadowClaw_Dev Happy to help 😊

  • @viper341
    @viper341 ปีที่แล้ว

    I want to add that there is a way to do this completely in blueprints. Create a new blueprint of the class Actor and give that actor an AI Perception component. Then in the character's blueprint, add that actor with the AI perception as a child actor component and attach it to the character's head.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      Well.....it can be done that way maybe but it's not going to be good for performance.....you are supposed to do it in c++

    • @farhantanvir8077
      @farhantanvir8077 8 หลายเดือนก่อน

      I am tired of seeing everything in blueprint its fresh environment to see c++ used in here tbh if u want to make and perform good u must need to learn c++

    • @viper341
      @viper341 8 หลายเดือนก่อน

      @@farhantanvir8077 Blueprint only becomes an issue when it is a performance bottleneck. in the vast majority of games using blueprint, the game thread will not be the bottleneck but rather the graphics so there is no need to try to gain performance using c++ because the only way to speed the game up is by addressing the graphics bottleneck. unless you prefer to work in c++ because you like it better (as far as workability I think blueprint has many advantages over c++). we have an entire networked multiplayer shooter as sophisticated as counterstrike or call of duty done entirely in blueprint. The only place I plan on converting some functions to c++ is in the AI logic in services that run multiple times a second. In performance testing on a variety of machines the bottleneck for us is not the game thread it's the graphics thread by a pretty large margin. So the only way to speed up the game is to further optimize graphics. Our graphics are low poly with very simple materials so for a game with sophisticated expensive graphics blueprint would be even less of a bottleneck. For 99% of the code in most games blueprint works great.

  • @desendev4176
    @desendev4176 ปีที่แล้ว

    What happens with blackboards? Are you forced to have the same blackboard in all behaviour trees? Does not break that the modularity?

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      A blackboard is just a list of variables and you can only have one blackboard active at any given time for a given behavior tree.......you can have multiple blackboards but it serves no purpose other than making things messy

    • @desendev4176
      @desendev4176 ปีที่แล้ว

      @@pranjalbhattacharjee5601 so if I want to have dynamic modular subtrees I have to make sure that all other main behaviour trees that consume it share the same blackboard?

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      @@desendev4176 Well.....you don't have to but yes it would be simpler if they all used the same blackboard

  • @spike3627
    @spike3627 ปีที่แล้ว

    Great work!!!

  • @spike3627
    @spike3627 ปีที่แล้ว

    Thanks

  • @dominikwerner6608
    @dominikwerner6608 ปีที่แล้ว

    I think the formula for AngleToTarget could be simplified a bit: const FVector coverSpotForwardDir = CoverSpotMarker->GetComponentRotation().Vector(); const FVector coverLookAtTargetDir = (Target->GetActorLocation() - CoverSpotMarker->GetComponentLocation()).GetSafeNormal(); AngleToTarget = FMath::RadiansToDegrees(FMath::Acos(FVector::DotProduct(coverSpotForwardDir, coverLookAtTargetDir))); This way you do not need the KismethMathLibrary and it is probably a bit more performant than to calculate the look at rotation only for retrieving the vector (of course it probably does not really matter that much). Anyway, I really love your tutorials and hope there are more to come <3

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601 ปีที่แล้ว

      I may be wrong, but I find both formulae to be more or less the same but, if possible, do some performance testing and let me know.......and more tutorials are coming but it will take some time because I am currently very busy with client projects,

    • @dominikwerner6608
      @dominikwerner6608 ปีที่แล้ว

      @@pranjalbhattacharjee5601 It is my assumption that it doesn't matter too much (I worked a lot on optimizations hence why I jump on things like this ^^). Don't feel pressured to create new tutorials, after all this is free content ☺