Announcement

Collapse
No announcement yet.

DoN's 3D-Pathfinding / Flying-AI system (with full source!)

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

  • replied
    [MENTION=33512]RJM[/MENTION]
    Hey, it's a known issue that the latest download (v1.2) doesn't work with 4.11 out-of-the-box. But the fix is available in the posts above (start from this post). The PaperSprite CDO issues should almost certainly be unrelated to the plugin.

    It's high time I uploaded a patch for v1.2 but I've been so busy of late just haven't had the time for it.

    Leave a comment:


  • replied
    plugin looks awesome and thank you for releasing it to the community.
    sadly it doesn't work on 4.11.2.
    i'll use it in 4.10.4

    i moved the content in DonAINavigitonUE4_v1.2 to my games' Plugins folder.
    i start my project and i get this

    Click image for larger version

Name:	dons_ai_nav_01.PNG
Views:	1
Size:	5.5 KB
ID:	1106549

    i select no and get this

    Click image for larger version

Name:	dons_ai_nav_02.PNG
Views:	1
Size:	15.8 KB
ID:	1106550

    then hit ok and get this

    Click image for larger version

Name:	dons_ai_nav_03.PNG
Views:	1
Size:	5.4 KB
ID:	1106551

    which crashes the project.
    hope this helps. i haven't looked through the source.
    i might check that at some point but just wanted to give you heads up.
    Last edited by RJM; 05-17-2016, 07:32 PM.

    Leave a comment:


  • replied
    Originally posted by VSZ View Post
    All, I didn't see the new replies on this thread until now. Somehow the VBulletin thread subscription mail just doesn't seem to work reliably for me. Sometimes it sends an email when there's a new post, more often than not it doesn't!

    [MENTION=87223]rsfx[/MENTION] - Thanks for sharing that. I think that's the multi-waypoint setup that [MENTION=32265]lunyBunny[/MENTION] was looking for too. Btw FPS on the video looks really low, is it the recording software or just the way it is? :P I'm a bit surprised to see the bot bumping into obstacles so often, that is not the intended level of accuracy at all! Did you try playing around with the VoxelSize setting to see if that helps? Not sure if you ran into a bug in the system or a fundamental limitation of the overall setup.

    [MENTION=1519]amigo[/MENTION] - thanks for bringing that to my attention! I haven't migrated to 4.11 yet so I haven't had a chance to test. When I get some time I'll migrate the sample project over to 4.11.1 and see what happens. Expect it to take a week or so though, it's crunch time for my project ATM and if I start looking at this I know I won't stop :P

    Plugin news:

    I've made some critical bugfixes and usability improvements that I haven't checked in or uploaded yet. One of them is a serious bug in the dynamic collision task scheduler where unrelated tasks were getting mixed up! That fix should improve accuracy of dynamic collisions dramatically although I don't think that will help with general collision issues like the one [MENTION=87223]rsfx[/MENTION] posted in that video.

    I'll try to bundle up these bugfixes and 4.11 testing together into one update.
    Sorry for the late answer. The video is a ****, I´m guilty of this, the piece of s(oftware) I used was not such a good choice. As a matter of fact it has been sentenced to uninstallation! And the bot part, well I was changing some code into your solution trying to implement various paths calculation that will not overlap while pointing to the same goal. As I am under a heavy load right now I left it on pause but I have some more ideas that I could implement into the bot class.

    Once again I thank you for this tool.

    Leave a comment:


  • replied
    [MENTION=14603]VSZ[/MENTION]

    Awesome, thank you - it purrs like a kitten.

    Changes made in lines 1238 and 1313.


    For everyone else, if you wish to compile this plugin code without Engine GitHub source, without a creating a C++ project, but instead in the DonNavigationSamples project folder, try the following command line (make a .bat file for ease of use)

    Path_to_UnrealEngine_folder/4.11/Engine/Build/BatchFiles/RunUAT.bat BuildPlugin -Plugin=Path_to_Projects_Folder\DonNavigationSamples\Plugins\DonAINavigation\DonAINavigation.uplugin" -package="Path_to_Projects_Folder\DonNavigationSamples\Plugins\DonAINavigation" -Rocket -TargetPlatforms=Win64

    Leave a comment:


  • replied
    The uint32 fiddling has me puzzled too! From Github what I gathered is that the engine calls GetUniqueID() on a primitive component whenever it is added and uses this unique integer for internal management instead of dealing with the primitive component itself. So no easy way to extract the primitive component back from a collision query, you only deal in the uint32 ids it extracted earlier it seems.

    Fortunately there's a simple workaround, we shouldn't have to bother with IgnoreComponents at all.

    Try changing this: (DonNavigationManager.cpp - 1238)

    Code:
    collisionParams.IgnoreComponents = VoxelCollisionQueryParams.IgnoreComponents;
    to

    Code:
    collisionParams.AddIgnoredActors(ActorsToIgnoreForCollision); // ActorsToIgnoreForCollision is the same member variable that VoxelCollisionQueryParams also uses, so this should be equivalent.

    Leave a comment:


  • replied
    Originally posted by VSZ View Post
    Are you able to work around those issues yourself until I get there? (assuming AddIgnoredComponent only needs to be added in a few places).
    N00b here, so I'd appreciate a little guidance...I already tried using AddIgnoredComponent but it requires UPrimitiveComponent, and GetIgnoredComponents returns TArray of uint32s - I'm not sure what those uint32s are.

    Thanks!

    Leave a comment:


  • replied
    Alright, that's what I get for not testing 4.11 directly and assuming "it would work"

    I need some time to get 4.11 setup. I'm low on download bandwidth, disk space on SSD (and low on time too!), I'll need to take time away from today's project work if I'm to focus on this...

    Are you able to work around those issues yourself until I get there? (assuming AddIgnoredComponent only needs to be added in a few places).

    Leave a comment:


  • replied
    [MENTION=14603]VSZ[/MENTION]

    Thanks for the update - unfortunately I don't have good news here...

    Module.DonAINavigation.cpp
    M:\Unreal Projects\PluginCompiler\Plugins\DonAINavigation\Source\DonAINavigation\Private\BehaviorTree\BTTask_FlyTo.cpp(45): warning C4996: 'FBlackboardKeySelector::CacheSelectedKey': CacheSelectedKey is deprecated. Please use ResolveSelectedKey instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
    c:\unrealengine\4.11\engine\source\runtime\aimodule\classes\behaviortree\BehaviorTreeTypes.h(515): note: see declaration of 'FBlackboardKeySelector::CacheSelectedKey'
    M:\Unreal Projects\PluginCompiler\Plugins\DonAINavigation\Source\DonAINavigation\Private\DonNavigationManager.cpp(1238): error C2248: 'FCollisionQueryParams::IgnoreComponents': cannot access private member declared in class 'FCollisionQueryParams'
    c:\unrealengine\4.11\engine\source\runtime\engine\public\CollisionQueryParams.h(53): note: see declaration of 'FCollisionQueryParams::IgnoreComponents'
    C:\UnrealEngine\4.11\Engine\Source\Runtime\Engine\Classes\GameFramework/MovementComponent.h(12): note: see declaration of 'FCollisionQueryParams'
    M:\Unreal Projects\PluginCompiler\Plugins\DonAINavigation\Source\DonAINavigation\Private\DonNavigationManager.cpp(1312): error C2248: 'FCollisionQueryParams::IgnoreComponents': cannot access private member declared in class 'FCollisionQueryParams'
    c:\unrealengine\4.11\engine\source\runtime\engine\public\CollisionQueryParams.h(53): note: see declaration of 'FCollisionQueryParams::IgnoreComponents'
    C:\UnrealEngine\4.11\Engine\Source\Runtime\Engine\Classes\GameFramework/MovementComponent.h(12): note: see declaration of 'FCollisionQueryParams'
    -------- End Detailed Actions Stats -----------------------------------------------------------
    ERROR: UBT ERROR: Failed to produce item: M:\Unreal Projects\PluginCompiler\Plugins\DonAINavigation\Binaries\Win64\UE4Editor-DonAINavigation.dll

    And, per the 4.11 release notes:

    FCollisionQueryParams::IgnoreComponents is now private, use AddIgnoredComponent() and GetIgnoredComponents() instead.
    This enabled an optimization to make the components list unique only once on-demand in GetIgnoredComponents(), rather each time a component is added.

    Leave a comment:


  • replied
    v1.2 released

    Latest plugin and sample project are available both in the OP and in this link:
    http://www.drunkonnectar.com/3d-pathfinding-ue4/

    There's a ton of tweaks and bugfixes in this (git commit). Changes include, but are not limited to:

    * Major bugfix: Hash comparison in dynamic task scheduler is fixed to account for unrelated meshes using a common cache key. Unrelated tasks were previously getting mixed up because of this bug!
    With this fix, the moving glass panels example in the sample project should now be "near perfect". The rocket dodging example is still rough around the edges (so there's still further scope for improving dynamic collision handling)

    * Major usability feature: Automatically teleport pawn to a nearby "good" location for cases where the pawn is starting pathfinding from a spot where initial collisions are indeterminate. Goal vector will also be automatically tweaked if it happens to be in a "bad spot". This should help new users in getting their initial testing going with fewer hitches. You can disable this behavior under query params by setting "FlexibleOriginGoal" to false. Some of the older rules still apply - if your pathfinding goal or origin is very near the floor then your queries will either fail or time-out.

    * 4.11 should be working fine now (I haven't tested this myself, so please let me know if it still doesn't work for you!)

    * Improved logging: Prevent log spam by memorizing known "bad queries", other general improvements to logging

    * API signature change to "ScheduleDynamicCollisionUpdate" to allow users to disable caching altogether. This change is not backward compatible I'm afraid. C++ users should update existing calls to this function accordingly.

    * Stability v/s Performance compromise in favor of stability: several VolumeAtUnsafe lookups have been replaced with VolumeAtSafe. Plugin users now need to worry less about triggering certain edge conditions which may lead to crashes, at the cost of a small amount of performance.

    * Animation states for your pawn can be easily updated now using new callbacks: Locomotion Start/End/Next/Abort. Implement these as part of the IDonNavigator interface.

    * Navigator interface now exported properly as part of DONAINAVIGATION_API

    * You can now disable cache usage completely for dynamic collisions by passing DisableCacheUsage as true to the scheduler. This is important for some situations where you cannot reliably use the mesh component (or a cache identifier) as a unique key for your mesh and you'd rather not bother with caching at all.

    ==

    Just so you know, I'm not actively working on new features for the plugin. However whenever I find things that my own game needs in the plugin then I try to improve or fix what I can at that time.

    Let me know if any links aren't working! All this bumping of versions, uploading stuff and testing links is more finicky than I could have ever imagined before
    Last edited by VSZ; 04-22-2016, 08:38 AM.

    Leave a comment:


  • replied
    [MENTION=46184]Liine[/MENTION], thanks a lot for that, you've saved me some time there

    There should be no side-effects whatsoever with that change. The class in question is deprecated and not used by the plugin. I left the whole "Legacy" subfolder in there just as an example of the "space filling volumes" solution that I previously used, it's not used by the current system.

    I still need to update the plugin with a whole clutch of bugfixes that I've made over the past month or so though.

    Leave a comment:


  • replied
    Originally posted by VSZ View Post
    All, I didn't see the new replies on this thread until now. Somehow the VBulletin thread subscription mail just doesn't seem to work reliably for me. Sometimes it sends an email when there's a new post, more often than not it doesn't!

    [MENTION=87223]rsfx[/MENTION] - Thanks for sharing that. I think that's the multi-waypoint setup that [MENTION=32265]lunyBunny[/MENTION] was looking for too. Btw FPS on the video looks really low, is it the recording software or just the way it is? :P I'm a bit surprised to see the bot bumping into obstacles so often, that is not the intended level of accuracy at all! Did you try playing around with the VoxelSize setting to see if that helps? Not sure if you ran into a bug in the system or a fundamental limitation of the overall setup.

    [MENTION=1519]amigo[/MENTION] - thanks for bringing that to my attention! I haven't migrated to 4.11 yet so I haven't had a chance to test. When I get some time I'll migrate the sample project over to 4.11.1 and see what happens. Expect it to take a week or so though, it's crunch time for my project ATM and if I start looking at this I know I won't stop :P

    Plugin news:

    I've made some critical bugfixes and usability improvements that I haven't checked in or uploaded yet. One of them is a serious bug in the dynamic collision task scheduler where unrelated tasks were getting mixed up! That fix should improve accuracy of dynamic collisions dramatically although I don't think that will help with general collision issues like the one [MENTION=87223]rsfx[/MENTION] posted in that video.

    I'll try to bundle up these bugfixes and 4.11 testing together into one update.
    Just to provide some more context for the error reported by amigo, project compiles fine, then trows the error amigo mentioned when you try and open it. Heres a snippet from my log that is relevant for the error. UE4 version 4.11.1

    Code:
    [2016.04.15-07.41.09:467][  0]LogWindows:Error: === Critical error: ===
    Fatal error: [File:C:\UE4_Engine\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 2824] 
    NewObject with empty name can't be used to create default subobjects (inside of UObject derived class constructor) as it produces inconsistent object names. Use ObjectInitializer.CreateDefaultSuobject<> instead.
    
    
    KERNELBASE.dll
    UE4Editor-Core.dll!FOutputDeviceWindowsError::Serialize() [c:\ue4_engine\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
    UE4Editor-Core.dll!FOutputDevice::Logf__VA() [c:\ue4_engine\engine\source\runtime\core\private\misc\outputdevice.cpp:149]
    UE4Editor-Core.dll!FDebug::AssertFailed() [c:\ue4_engine\engine\source\runtime\core\private\misc\outputdevice.cpp:430]
    UE4Editor-CoreUObject.dll!FObjectInitializer::AssertIfInConstructor() [c:\ue4_engine\engine\source\runtime\coreuobject\private\uobject\uobjectglobals.cpp:2825]
    UE4Editor-Engine.dll!NewObject<UBodySetup>() [c:\ue4_engine\engine\source\runtime\coreuobject\public\uobject\uobjectglobals.h:1173]
    UE4Editor-Engine.dll!UBoxComponent::UpdateBodySetup() [c:\ue4_engine\engine\source\runtime\engine\private\components\boxcomponent.cpp:40]
    UE4Editor-Engine.dll!UBoxComponent::SetBoxExtent() [c:\ue4_engine\engine\source\runtime\engine\private\components\boxcomponent.cpp:24]
    UE4Editor-DonAINavigation.dll
    UE4Editor-CoreUObject.dll!UClass::CreateDefaultObject() [c:\ue4_engine\engine\source\runtime\coreuobject\private\uobject\class.cpp:2763]
    UE4Editor-CoreUObject.dll!UObjectLoadAllCompiledInDefaultProperties() [c:\ue4_engine\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:724]
    UE4Editor-CoreUObject.dll!ProcessNewlyLoadedUObjects() [c:\e4_engine\engine\source\runtime\coreuobject\private\uobject\uobjectbase.cpp:818]
    UE4Editor-CoreUObject.dll!TBaseStaticDelegateInstance<void __cdecl(void)>::ExecuteIfSafe() [c:\ue4_engine\engine\source\runtime\core\public\delegates\delegateinstancesimpl_variadics.inl:1021]
    UE4Editor-Core.dll!TBaseMulticastDelegate<void>::Broadcast() [c:\ue4_engine\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:921]
    UE4Editor-Core.dll!FModuleManager::LoadModuleWithFailureReason() [c:\ue4_engine\engine\source\runtime\core\private\modules\modulemanager.cpp:427]
    UE4Editor-Projects.dll!FModuleDescriptor::LoadModulesForPhase() [c:\ue4_engine\engine\source\runtime\projects\private\moduledescriptor.cpp:398]
    UE4Editor-Projects.dll!FPluginManager::LoadModulesForEnabledPlugins() [c:\ue4_engine\engine\source\runtime\projects\private\pluginmanager.cpp:539]
    UE4Editor.exe!FEngineLoop::LoadStartupModules() [c:\ue4_engine\engine\source\runtime\launch\private\launchengineloop.cpp:2080]
    UE4Editor.exe!FEngineLoop::PreInit() [c:\ue4_engine\engine\source\runtime\launch\private\launchengineloop.cpp:1544]
    UE4Editor.exe!GuardedMain() [c:\perforce\ue4_engine\engine\source\runtime\launch\private\launch.cpp:110]
    UE4Editor.exe!GuardedMainWrapper() [c:\ue4_engine\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
    UE4Editor.exe!WinMain() [c:\ue4_engine\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
    UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
    KERNEL32.DLL
    ntdll.dll
    ntdll.dll
    EDIT:

    after fiddling around a bit I've found that if I edit theUDoNNavigationVolumeComponent constructor to not have the SetBoxExtent call the error disappears:

    as such

    Code:
    UDoNNavigationVolumeComponent::UDoNNavigationVolumeComponent(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
    {
    	BoxExtent = FVector(50.0f, 50.0f, 50.0f);
    
    	static FName CollisionProfileName(TEXT("DoNNavigationVolume"));
    	SetCollisionProfileName(CollisionProfileName);	
    }
    Now I don't know what unwanted side effects this might lead to if any, but it seems to be working alright for me
    Last edited by Liine; 04-15-2016, 04:24 AM.

    Leave a comment:


  • replied
    I have no idea honestly I'm not using any OS specific features so assuming your map is small things _might_ just work.

    I've no experience with mobile development though so I don't know what kind of issues to expect.

    Try it out and let us know what happens!
    Last edited by VSZ; 04-15-2016, 06:22 PM.

    Leave a comment:


  • replied
    Wonderful plugin!

    Is Android supported out of the box?

    Does it perform well on mobile ?

    Would it work along with Dungeon Architect ?

    Leave a comment:


  • replied
    All, I didn't see the new replies on this thread until now. Somehow the VBulletin thread subscription mail just doesn't seem to work reliably for me. Sometimes it sends an email when there's a new post, more often than not it doesn't!

    [MENTION=87223]rsfx[/MENTION] - Thanks for sharing that. I think that's the multi-waypoint setup that [MENTION=32265]lunyBunny[/MENTION] was looking for too. Btw FPS on the video looks really low, is it the recording software or just the way it is? :P I'm a bit surprised to see the bot bumping into obstacles so often, that is not the intended level of accuracy at all! Did you try playing around with the VoxelSize setting to see if that helps? Not sure if you ran into a bug in the system or a fundamental limitation of the overall setup.

    [MENTION=1519]amigo[/MENTION] - thanks for bringing that to my attention! I haven't migrated to 4.11 yet so I haven't had a chance to test. When I get some time I'll migrate the sample project over to 4.11.1 and see what happens. Expect it to take a week or so though, it's crunch time for my project ATM and if I start looking at this I know I won't stop :P

    Plugin news:

    I've made some critical bugfixes and usability improvements that I haven't checked in or uploaded yet. One of them is a serious bug in the dynamic collision task scheduler where unrelated tasks were getting mixed up! That fix should improve accuracy of dynamic collisions dramatically although I don't think that will help with general collision issues like the one [MENTION=87223]rsfx[/MENTION] posted in that video.

    I'll try to bundle up these bugfixes and 4.11 testing together into one update.
    Last edited by VSZ; 04-14-2016, 10:22 AM.

    Leave a comment:


  • replied
    VSZ,

    Thank you for releasing this as a free plugin, and especially for releasing the source code along. I wish everyone would follow your example...

    I've been trying to get the plugin to work with 4.11.1 (latest release) but I'm not having much luck. It compiles without errors but when I start a project, it crashes during loading. The log shows this as the only clue

    Code:
    Fatal error: [File:D:\BuildFarm\buildmachine_++UE4+Release-4.11\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 2824]
    NewObject with empty name can't be used to create default subobjects (inside of UObject derived class constructor) as it produces inconsistent object names. Use ObjectInitializer.CreateDefaultSuobject<> instead.
    It doesn't tell me much since it's not even in the plugin code, so I'm not sure if this is a UE4 bug or a plugin one.

    Any ideas?

    Leave a comment:

Working...
X