Announcement

Collapse
No announcement yet.

Augmented Reality for UE4

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

  • Store if the marker is visible in a bool variable, also store it's position as a vector if it's not 0,0,0. It will be the markers last valid location.
    Check the marker's visibility in EventTick, and if it disappears (turns from true to false) apply it's last know position.




    Originally posted by Denis View Post
    Hi @AdamHorvath, hi everyone !

    How do I make my 3D Model stay at his last known position when the marker is lost, and start tracking again when the marker comes back into view?
    I've followed these steps :

    1. Open the level blueprint and locate the "set hidden in game node"
    2. Disconnect the new hidden pin and set it to false
    3. It won't disappear if the marker is not visible.

    But the 3d Model seems to get back to 0,0,0 and not the last know position when it last had seen the tracker.

    How can I fix that?

    Thanks in advance,

    Denis
    AR plugin for UE4
    AR Virtual Mirror plugin for UE4
    Red Alert 2 VR remake
    Armed Island VR RTS

    Comment


    • How to integrate this plugin with your custom project?
      1.convert your project to a C++ project.
      2.Put the file in the sampleproject into your own project. Note: don't put Config folder.
      3.Generating visual studio project files and choose rebuild ARToolkitPlugin.dll.
      4.Use the node of the plugin in your project and Enjoy it!

      Comment


      • has anyone had any issues with trying to run this on android? when i start the program on android, the app stops working, and just displays a message saying 'Unfortunately, [APPNAME] has stopped working". Logs don't even include any info about that crash. the app just shuts down right after it loads the NFT markers successfully (according to the last log line). have tested normal app deployments and everything works fine, but anything with the ARtoolkit base actor in it will not load and shut down the app.

        Testing on a Note 4 and S4, both running Android 4.4.4. I realize these are slightly older OS's, but should still be compatible from what i've read.

        Testing on computer with web cam works fine.

        [EDIT] finally got it working, but not sure why it works this time. may have been an issue with the device rather than the plugin.
        Last edited by paradoc; 02-20-2017, 04:01 PM.
        http://earthborninteractive.com

        Comment


        • Originally posted by AdamHorvath View Post
          Sent you a mail with download instructions!
          402630999@qq.com
          http://www.unreal4ar.com/?download_f...f56bfb2d192928

          Comment


          • Hello,


            I tried to use plugin in our C++ project but there's a problem that I couldn't include ARToolkitComponent.h in our files,

            I added this line to MyProject.Build.cs
            PublicDependencyModuleNames.AddRange(new string[] { "ARToolkitPlugin", "ARToolkit" });

            and also I include ARToolkitComponent.h in our pawn class but when i trying compile in editor I've these errors in editor:

            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C3646: 'matrix': unknown override specifier
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C2143: syntax error: missing ',' before '['
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C2143: syntax error: missing ')' before ';'
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C2238: unexpected token(s) preceding ';'
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C2143: syntax error: missing ';' before '*'
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C2238: unexpected token(s) preceding ';'
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(66) : error C3646: 'filterCutoffFrequency': unknown override specifier
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(67) : error C3646: 'filterSampleRate': unknown override specifier
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(67) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C3646: 'matrix': unknown override specifier
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C2143: syntax error: missing ',' before '['
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C2143: syntax error: missing ')' before ';'
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C2238: unexpected token(s) preceding ';'
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C2143: syntax error: missing ';' before '*'
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C2238: unexpected token(s) preceding ';'
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(66) : error C3646: 'filterCutoffFrequency': unknown override specifier
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(67) : error C3646: 'filterSampleRate': unknown override specifier
            plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(67) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

            Please let me know, how to fix the above errors and use this plugin in my project.

            Regards,
            Balpreet

            Comment


            • Yes, it does but you need the source code version to make it work.

              Originally posted by jrse View Post
              Hi,

              does the plugin still work with unreal 4.15? Currently i'm trying to get the demo running but i'm not lucky ;-/ i would love to use it and buy the comercial licence if it works.

              thx and best regards

              jan
              AR plugin for UE4
              AR Virtual Mirror plugin for UE4
              Red Alert 2 VR remake
              Armed Island VR RTS

              Comment


              • Please send me an email to info@unreal4ar.com with your order number, and I'll send you a new link.

                AR plugin for UE4
                AR Virtual Mirror plugin for UE4
                Red Alert 2 VR remake
                Armed Island VR RTS

                Comment


                • Hey guys, so i've played around with it so far and i'm loving it! First things first though, how do i make a mesh per marker?

                  For instance i want hiro marker to be the bike, and then another marker to show the chair?

                  Thanks so much

                  Comment


                  • Thx Adam for the fast answer.
                    Just bought the commercial licence and i will check it out :-)
                    best regards
                    jan

                    => It works! ;-)
                    Last edited by jrse; 02-24-2017, 11:39 AM.

                    Comment


                    • Is there anyone, who has tried using this Plugin in C++ ?

                      My project is not using much of Blueprints.

                      Originally posted by balpreet View Post
                      Hello,


                      I tried to use plugin in our C++ project but there's a problem that I couldn't include ARToolkitComponent.h in our files,

                      I added this line to MyProject.Build.cs
                      PublicDependencyModuleNames.AddRange(new string[] { "ARToolkitPlugin", "ARToolkit" });

                      and also I include ARToolkitComponent.h in our pawn class but when i trying compile in editor I've these errors in editor:

                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C3646: 'matrix': unknown override specifier
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C2143: syntax error: missing ',' before '['
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C2143: syntax error: missing ')' before ';'
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C2238: unexpected token(s) preceding ';'
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C2143: syntax error: missing ';' before '*'
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C2238: unexpected token(s) preceding ';'
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(66) : error C3646: 'filterCutoffFrequency': unknown override specifier
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(67) : error C3646: 'filterSampleRate': unknown override specifier
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(67) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C3646: 'matrix': unknown override specifier
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C2143: syntax error: missing ',' before '['
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C2143: syntax error: missing ')' before ';'
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(60) : error C2238: unexpected token(s) preceding ';'
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C2143: syntax error: missing ';' before '*'
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C2238: unexpected token(s) preceding ';'
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(66) : error C3646: 'filterCutoffFrequency': unknown override specifier
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(67) : error C3646: 'filterSampleRate': unknown override specifier
                      plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(67) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

                      Please let me know, how to fix the above errors and use this plugin in my project.

                      Regards,
                      Balpreet

                      Comment


                      • You can check the visibility property of each markers from the GetMarker node and show / hide your meshes accordingly.

                        Originally posted by PiEdawg View Post
                        Hey guys, so i've played around with it so far and i'm loving it! First things first though, how do i make a mesh per marker?

                        For instance i want hiro marker to be the bike, and then another marker to show the chair?

                        Thanks so much
                        AR plugin for UE4
                        AR Virtual Mirror plugin for UE4
                        Red Alert 2 VR remake
                        Armed Island VR RTS

                        Comment


                        • Hey Adam, im trying to set multiplayer play by having each player use one "AdvancedARToolkit", basically having two ARToolkits actor, each with a different auto activate for player 1 to 4, but duplicating the actor crashes the engine. Is there absolutly no possibility of doing multiplayer with this plugin?

                          MachineId7F25AE844430CA7C7D83A951B754FA4
                          EpicAccountId:c723a2549396451db4fe0c31db03f387

                          C++ EH exception - code e06d7363 (first/second chance not available)

                          KERNELBASE
                          VCRUNTIME140
                          UE4Editor_ARToolkitPlugin!vision::VisualDatabase<vision::FREAKExtractor,vision::BinaryFeatureStore,vision::BinaryFeatureMatcher<96> >::addKeyframe()
                          UE4Editor_ARToolkitPlugin!vision::VisualDatabaseFacade::addFreakFeaturesAndDescriptors()
                          UE4Editor_ARToolkitPlugin!kpmSetRefDataSet()
                          UE4Editor_ARToolkitPlugin!FARToolkitDevice::LoadMarkersNFT() [f:\advancedblueorchi\advancedblueorchid\plugins\artoolkitplugin\source\artoolkitplugin\private\artoolkitdevice.cpp:1131]
                          UE4Editor_ARToolkitPlugin!UARToolkitComponent::LoadMarkersNFT() [f:\advancedblueorchi\advancedblueorchid\plugins\artoolkitplugin\source\artoolkitplugin\private\artoolkitcomponent.cpp:184]
                          UE4Editor_ARToolkitPlugin!UARToolkitComponent::execLoadMarkersNFT() [f:\advancedblueorchi\advancedblueorchid\plugins\artoolkitplugin\source\artoolkitplugin\public\artoolkitcomponent.h:14]
                          UE4Editor_CoreUObject
                          UE4Editor_CoreUObject
                          UE4Editor_CoreUObject
                          UE4Editor_CoreUObject
                          UE4Editor_CoreUObject
                          UE4Editor_CoreUObject
                          UE4Editor_CoreUObject
                          UE4Editor_CoreUObject
                          UE4Editor_CoreUObject
                          UE4Editor_CoreUObject
                          UE4Editor_Engine
                          UE4Editor_Engine
                          UE4Editor_Engine
                          UE4Editor_Engine
                          UE4Editor_Engine
                          UE4Editor_Engine
                          UE4Editor_Engine
                          UE4Editor_Engine
                          UE4Editor_UnrealEd
                          UE4Editor_UnrealEd
                          UE4Editor_UnrealEd
                          UE4Editor_UnrealEd
                          UE4Editor_UnrealEd
                          UE4Editor
                          UE4Editor
                          UE4Editor
                          UE4Editor
                          UE4Editor
                          kernel32
                          ntdll

                          Comment


                          • Update :

                            Taking off the Load NFT Markers load now doesnt crash the engine anymore, but webcam wont init... I placed first ARToolkit at player 1 and second at player 2, but none will initiate from webcam.
                            Any solution?

                            Comment


                            • Originally posted by AdamHorvath View Post
                              You can check the visibility property of each markers from the GetMarker node and show / hide your meshes accordingly.
                              Thanks Adam!

                              Ok So i've tried this, I opened the ARtoolkitsimple and modified the blue print map level.

                              I duplicated the node "transform hiro" Node box and just changed the mesh to another mesh and changed the marker to the Kanji Marker

                              But when i try it out on my android the Hiro marker is the only 1 that works.

                              Below are some images
                              Click image for larger version

Name:	Event Tick.jpg
Views:	1
Size:	466.7 KB
ID:	1123764
                              Click image for larger version

Name:	hiro.jpg
Views:	1
Size:	573.2 KB
ID:	1123765
                              Click image for larger version

Name:	KAnji.jpg
Views:	1
Size:	567.5 KB
ID:	1123766

                              Edit, I fixed it. I was exporting as ECT1 which didnt support the pbr materials(Gold, Shiny Black. ect) Ill leave this here for people to see how your blueprints should look to have different mesh for different markers
                              Last edited by PiEdawg; 02-22-2017, 09:28 AM.

                              Comment


                              • New version of the plugin is available for download!

                                AR Plugin V1.7 - 2017-02-23

                                - Updated for Unreal Engine v4.15
                                - Fixed project name for Android
                                - Fixed camera permission for iOS - NSCameraUsageDescription added to AdditionalPlistData
                                - Minor bugfixes

                                Note: Make sure to update your CodeWorks for Android to version 1R5

                                Android DEMO is available on google play:
                                https://play.google.com/store/apps/d...unreal4ar.demo
                                AR plugin for UE4
                                AR Virtual Mirror plugin for UE4
                                Red Alert 2 VR remake
                                Armed Island VR RTS

                                Comment

                                Working...
                                X