Announcement

Collapse
No announcement yet.

Rama's Multi-Threaded Dynamic Pathing System, Full Physics Support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Click image for larger version

Name:	22703_10153233938521289_2614689692469660010_n.jpg
Views:	3
Size:	9.0 KB
ID:	1071505




    Great endeavor here.
    ArtStation

    General Development Blog

    Comment


      PhysX Simulating Characters Pathing Over Dynamically Generated Ledges!



      In this video you get to watch as I construct a section of level using my in-game level editor tools!

      Then my physX-simulating ball characters are able to path over the ledges using the ledge-path AI I developed and demo in a prior video!

      ~~~

      In-Game Editor Tools

      Again this video is a fun demonstration of my in-game editor tools that are used to build levels while the UE4 Editor is closed!

      Watch my AI units easily path over and through these runtime user-generated sections of level!

      ~~~

      UE4 Nav Mesh Rebuild At Runtime

      This video shows off how good UE4 rebuild at runtime is, as you watch the AI find my player unit amongst dynamically generated pieces of level that you watch me build during the video!


      As I say in my conclusion to the video:

      Yay for UE4 Navigation Rebuild-At-Runtime!



      Rama
      Last edited by Rama; 03-30-2015, 07:36 AM.
      UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

      ♥ Rama

      Comment


        Rama's In-Game Level Editor

        (bump of above video)


        Enjoy!



        Rama
        UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

        ♥ Rama

        Comment


          Nice new stuff !
          Check out my game OldSchool Nightmare : http://www.indiedb.com/games/oldschool-nightmare

          Comment




            UE4 AI Pathing With Skeletal Meshes!

            Full description



            Rama
            UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

            ♥ Rama

            Comment


              Pretty darn nice.

              Comment


                This is awesome RAMA!

                Keep up the awesome work

                Comment


                  Originally posted by Ariegos View Post
                  Pretty darn nice.
                  Hee hee! * Blushes *

                  Originally posted by HeadClot View Post
                  This is awesome RAMA!

                  Keep up the awesome work
                  Thanks! Great to hear from you!



                  Rama
                  UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                  ♥ Rama

                  Comment


                    Any chance you could share some of the code for the jumping? ( I haven't seen whether you have already or not )

                    Comment


                      Hey Rama,

                      Awesome work! I can't tell you enough how many times your posts and answers scattered throughout the Unreal World, have helped steer me in the right direction on multiple occasions.

                      I have been trying to do a similar path finding jump as your videos above, but am getting stuck on one part, On your #140 comment , the video shows some dynamic path finding and jumps being made by the AI to get to the player. I have been looking at the Recast Nav mesh and am able to find the nearest poly and the get all polys methods you posted but the find nearest seems to only return a poly on the same area and the find all polys returns everything it seems. Is there a find nearest poly between two areas? I cant seem to find a query function that finds where the AI should start its path at, given the player being a couple jumps away. In your example video, I see you have two poly areas being highlighted the yellow ones that signal where the AI should move to and the green ones that signal where to jump to. Is it possible to shed some light on how to get those polys? I don't care about sharing code as much as just an explanation of the idea you used, as I still want to learn for myself, just cant seem to figure out a way to accomplish that part.

                      Thanks Rama!

                      Comment


                        Originally posted by yesNinja View Post
                        Hey Rama,

                        Awesome work! I can't tell you enough how many times your posts and answers scattered throughout the Unreal World, have helped steer me in the right direction on multiple occasions.
                        Yaay! I'm glad to have helped out!

                        Originally posted by yesNinja View Post
                        Is it possible to shed some light on how to get those polys? I don't care about sharing code as much as just an explanation of the idea you used, as I still want to learn for myself, just cant seem to figure out a way to accomplish that part.

                        Thanks Rama!
                        That was actually the most complex part, I did a bunch of geometric tests to identify the proper points using FBox and line tests.

                        After obtaining the FBox that represents each poly, I then did a bunch of tests to see which one was the best for the unit to use

                        Here's the function I created in my custom PathFollowingComponent to initiate my geometric tests:

                        Code:
                        //Verts
                        bool NavPoly_GetVerts(const NavNodeRef& PolyID, TArray<FVector>& OutVerts);
                        
                        //Bounds
                        FBox NavPoly_GetBounds(const NavNodeRef& PolyID);
                        
                        //Choose Which Nav Data To Use
                        FORCEINLINE const ANavigationData* JoyGetNavData() const
                        {
                        	const FNavAgentProperties& AgentProperties = MovementComp->GetNavAgentPropertiesRef() ;
                        	const ANavigationData* NavData = GetNavDataForProps(AgentProperties) ;
                        	if (NavData == NULL)
                        	{
                        		NavData = GetMainNavData();
                        	}
                        	   
                        	return NavData;
                        }
                        
                        //~~~
                        bool UJoyPathFollowCompHighest::NavPoly_GetVerts(const NavNodeRef& PolyID, TArray<FVector>& OutVerts) 
                        {
                        	//Get Nav Data
                        	const ANavigationData* NavData = JoyGetNavData();
                        	 
                        	const ARecastNavMesh* NavMesh = Cast<ARecastNavMesh>(NavData);
                        	if(!NavMesh)
                        	{
                        		return false;
                        	}
                        	
                        	return NavMesh->GetPolyVerts(PolyID,OutVerts);
                        }
                        
                        //Get Box of individual poly from verts
                        FBox UJoyPathFollowCompHighest::NavPoly_GetBounds(const NavNodeRef& PolyID)
                        {
                        	TArray<FVector> Verts;
                        	NavPoly_GetVerts(PolyID,Verts);
                        	
                        	FBox Bounds(0);
                        	for(const FVector& Each : Verts)
                        	{
                        		Bounds+=Verts;
                        	}
                        	
                        	return Bounds;
                        }
                        ~~~

                        Geometric Analysis Using FBox

                        I had to do all the geometric analysis myself!

                        I recommend you check out all the convenience functions in:

                        UnrealMathUtility.h

                        and

                        Box.h

                        These are the basic tools you can use to do the analysis yourself to find the best spot!

                        ~~~

                        Essential Function

                        I especially recommend checking out a fast trace you can do using a Line Box intersection:

                        UnrealMathUtility.h

                        Code:
                        /** Determines whether a line intersects a box. */
                        static bool LineBoxIntersection( const FBox& Box, const FVector& Start, const FVector& End, const FVector& Direction );
                        
                        /** Determines whether a line intersects a box. This overload avoids the need to do the reciprocal every time. */
                        static bool LineBoxIntersection( const FBox& Box, const FVector& Start, const FVector& End, const FVector& Direction, const FVector& OneOverDirection );
                        
                        /* Swept-Box vs Box test */
                        static CORE_API bool LineExtentBoxIntersection(const FBox& inBox, const FVector& Start, const FVector& End, const FVector& Extent, FVector& HitLocation, FVector& HitNormal, float& HitTime);
                        ~~~

                        Multi-Threading

                        I multi-threaded my final solution to result in best performance.

                        ~~~

                        Good Luck!

                        I look forward to hearing about your chosen implementation!



                        Rama
                        Last edited by Rama; 08-04-2015, 10:36 AM.
                        UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                        ♥ Rama

                        Comment


                          AI Dodge Wiki

                          Dear Community,

                          I've just posted a C++ wiki on implementing an AI Dodge mechanic!

                          In just a few lines of code I show you how you can tell an AI unit to dodge left or right, and how far, and also ensure the UE4 Navigation System will find the calculated dodge point using Nav Mesh Projection!

                          AI Dodge Wiki
                          https://forums.unrealengine.com/show...l=1#post348246

                          Enjoy!

                          Rama
                          UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                          ♥ Rama

                          Comment


                            Hi Rama,
                            Just want to know, you remake navigation system or add extra validation on unreal path finding system?
                            this is can be implementable to big landscape like open world game? because you got all polys..

                            Comment


                              Originally posted by n0sam3 View Post
                              Hi Rama,
                              Just want to know, you remake navigation system or add extra validation on unreal path finding system?
                              this is can be implementable to big landscape like open world game? because you got all polys..

                              I am using UE4 navigation system for my more recent jump pathing videos, I've also created my own navigation systems / nav mesh / AI path following, from scratch!

                              Epic has a nice way to stream in nav meshes, and also nav meshes can be separated, so that the lookup of all polys is local to the units nearest nav mesh, meaning I am not looking up all polys in the entire open world



                              Rama
                              UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                              ♥ Rama

                              Comment


                                Rama's Physics Character Pathing System

                                One of my favorite AI Victories!

                                I overrode and rewrote large portions of Epic's Character AI Pathing system to work with physics simulating characters!

                                There's no native support for this, but using some of my own functions that I've been writing for my physics multiplayer game, I was able to do it!

                                Epic very nicely exposed as virtual all the functions I needed to override, thank you Epic!


                                Here is the result!



                                ~~~

                                PhysX Creature That Can Navigate the UE4 World ~ Evolution

                                I then evolved this system into my own game here:



                                ~~~

                                PhysX Creature Navigating In Dynamically Generated World

                                This core C++ coding research then enabled me to do what you see in this video with my in-game level editor and some physx-simulating ball creatures!





                                Rama
                                Last edited by Rama; 11-09-2015, 06:43 AM.
                                UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                                ♥ Rama

                                Comment

                                Working...
                                X