Announcement

Collapse
No announcement yet.

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

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

  • replied
    so did this die?

    Leave a comment:


  • replied
    Yeah, that would be perfect if you can share or sell your system, Rama

    Leave a comment:


  • replied
    great work~
    but, where is the code or built plugin?...

    Leave a comment:


  • replied
    Originally posted by Rama View Post
    Hee hee! Very nice to hear from you StarSeeker!



    Rama
    Thanks Rama

    Leave a comment:


  • replied
    Originally posted by starseeker View Post
    Ramas the man as always.
    Hee hee! Very nice to hear from you StarSeeker!



    Rama

    Leave a comment:


  • replied
    Would be nice to see some code, though. Or pseudocode.

    I'm working with root-motion based locomotion at the moment, and snippets would help.
    Last edited by NegInfinity; 11-18-2015, 01:29 PM.

    Leave a comment:


  • replied
    Ramas the man as always.

    Leave a comment:


  • replied
    Originally posted by SaviorNT View Post
    Was looking over the thread, and this could possibly be pretty useful to me, as I am always in search of the next optimization. In regards to the cow mesh + animation, are your cows able to do this:?
    I loved the backflip at the very end

    Also the sub-dividing cows were great

    Rama

    Leave a comment:


  • replied
    Was looking over the thread, and this could possibly be pretty useful to me, as I am always in search of the next optimization. In regards to the cow mesh + animation, are your cows able to do this:?

    Leave a comment:


  • replied
    Very awesome AI pathing projects Rama, thanks for sharing.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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..

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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.

    Leave a comment:

Working...
X