Announcement

Collapse
No announcement yet.

Augmented Reality for UE4

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

    Originally posted by AdamHorvath View Post
    Hello,

    I am glad it's working now!
    Can you please share what to modify ? I did not experience this problem during my tests.
    Right now I'm only worried about iOS so I didn't worry about messing up anything else with my changes. Basically all I did was change the few places where it was creating paths with upper case characters and used lower case instead. My gut tells me the real problem has something to do with iPhoneLaunched not being set correctly, seems there are 2 code paths based on it being set.. One that uses caps and one that doesn't. I'm not sure what the reason for that is based on my brief time looking at the code though. For it to work correctly on iOS iPhoneLaunched should be true. Rather than figuring out why it was not getting set to true I just modified the "else".

    I believe the changes I made were to the following lines
    124
    679
    971

    I'm not using NFT but you'd probably have to change 1056 as well.
    Last edited by digitald82; 04-06-2017, 07:15 PM.

    Comment


      Originally posted by AdamHorvath View Post
      Plugin available on the link below:
      http://www.unreal4ar.com

      [UPDATE]
      AR version of the Matinee fight scene demo.:


      Interaction DEMO video:




      Hi everyone,

      After working on this for quite some time, I wanted to show my first results.
      I am developing a C++ code plugin that adds AR capabilities to Unreal Engine 4.

      The videos below are featuring simple marker tracking examples based on the open source ARToolkit library. The DEMO can detect and track 2 markers at the same time.
      Currently it is just a "proof of concept" running on Windows and Android, but I hope to release it as a plugin soon!

      Inside UE4 editor on Windows:




      Running on Samsung S4 mini:



      Hope you like it!
      hi AdamHorvath,
      Thanks for sharing.Love your AR plugin...But may i know is there any step by step tutorials to follow?i have download the demo version.But seriously i dont know how to implement it,especially when i want to make my own model to AR.Please help me..Thanks

      Comment


        Hi,

        I am using the demo version of this plug-in and am finding problems to package the project for windows. Please could you help me to detect the problem/s? It might be something very basic as I am not very experienced with UE4. These are the errors that come up in the 'output log' window:

        UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ERROR: No modules found to build. All requested binaries were already part of the installed engine data.
        UATHelper: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): C:\Program Files\Epic Games\UE_4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Game Win64 Development -remoteini="C:\Users\xxxxx\Documents\Unreal\ARPlugin_DEMO
        _v1_7\ARSampleUEv4_15" -noxge -generatemanifest -NoHotReload. See logfile for details: 'UnrealBuildTool-2017.04.17-11.43.00.txt'
        UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
        PackagingResults:Error: Error Unknown Error


        I also get this message in the 'message log' window but not sure what it means:
        Warning AttachTo: '/Game/Maps/ARToolkitSimple.ARToolkitSimple:PersistentLevel.ARToolkitBase_C_0.SceneComponent' cannot be attached to itself. Aborting.

        Thank you

        Comment


          Hi,

          It's not possible to package your project with the DEMO version. It only works from the editor.

          Originally posted by LPPachon View Post
          Hi,

          I am using the demo version of this plug-in and am finding problems to package the project for windows. Please could you help me to detect the problem/s? It might be something very basic as I am not very experienced with UE4. These are the errors that come up in the 'output log' window:

          UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ERROR: No modules found to build. All requested binaries were already part of the installed engine data.
          UATHelper: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): C:\Program Files\Epic Games\UE_4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Game Win64 Development -remoteini="C:\Users\xxxxx\Documents\Unreal\ARPlugin_DEMO
          _v1_7\ARSampleUEv4_15" -noxge -generatemanifest -NoHotReload. See logfile for details: 'UnrealBuildTool-2017.04.17-11.43.00.txt'
          UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
          PackagingResults:Error: Error Unknown Error


          I also get this message in the 'message log' window but not sure what it means:
          Warning AttachTo: '/Game/Maps/ARToolkitSimple.ARToolkitSimple:PersistentLevel.ARToolkitBase_C_0.SceneComponent' cannot be attached to itself. Aborting.

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

          Comment


            Does the plugin support android 7?
            The same build which works on androids between 4.4 and 6 doesn't work on 2 devices with android 7, both devices show white screen and the GUI, and there is no "webcam init error" message i you ask.

            Comment


              Hi,

              Did you try to run the demo project from Google Play ?
              https://play.google.com/store/apps/d...unreal4ar.demo





              Originally posted by Moonmana View Post
              Does the plugin support android 7?
              The same build which works on androids between 4.4 and 6 doesn't work on 2 devices with android 7, both devices show white screen and the GUI, and there is no "webcam init error" message i you ask.
              AR plugin for UE4
              AR Virtual Mirror plugin for UE4
              Red Alert 2 VR remake
              Armed Island VR RTS

              Comment


                Originally posted by AdamHorvath View Post
                Hi,
                Did you try to run the demo project from Google Play ?
                https://play.google.com/store/apps/d...unreal4ar.demo
                Hi, the demo project works fine. Any ideas what to check? same build on some devices work fine, on android 7 devices white screen.

                Comment


                  Last time I had a similar issue, the solution was to update CodeWorks for Android to the most recent version.

                  Originally posted by Moonmana View Post
                  Hi, the demo project works fine. Any ideas what to check? same build on some devices work fine, on android 7 devices white screen.
                  AR plugin for UE4
                  AR Virtual Mirror plugin for UE4
                  Red Alert 2 VR remake
                  Armed Island VR RTS

                  Comment


                    Originally posted by AdamHorvath View Post
                    Last time I had a similar issue, the solution was to update CodeWorks for Android to the most recent version.
                    Unfortunately, i've updated everything yesterday, so it's not the case

                    Comment


                      Will the plugin compile to website via HTML5/JavaScript ? And will it then also support the picture image recognition via ARToolkit ?

                      Comment


                        HTML5 is not supported.

                        Originally posted by newimaging View Post
                        Will the plugin compile to website via HTML5/JavaScript ? And will it then also support the picture image recognition via ARToolkit ?
                        AR plugin for UE4
                        AR Virtual Mirror plugin for UE4
                        Red Alert 2 VR remake
                        Armed Island VR RTS

                        Comment


                          Is this already working with GearVR?

                          Is the lag problem with the GearVR camera solved?

                          Cheers and thanks for the answers!

                          Comment


                            Finally, found the reason of the black/white screen: when installing through unreal engine, unreal engine copies required files to sdcard folder including ARToolkit folder. When the app is installed this way it can locate camera_para.dat file and works fine.
                            And if the app is installed other way after UE copied the files to the folder it also works.
                            However when the app was never launched on a device through unreal engine it includes the folder to APK, but the app can't locate it because it's trying to locate it in a wrong folder.

                            I have checked your code and it seems the path to the file is generated in ARToolkitDevice.cpp:
                            111: FString AbsoluteContentPath = GFilePathBase + TEXT("/UE4Game/") + FApp::GetGameName() + TEXT("/") + FString::Printf(TEXT("%s/Content/"), FApp::GetGameName());

                            05-01 04:26:41.899 12831 12845 E libar : Error (2): unable to open camera parameters file "/storage/emulated/0/UE4Game/ARCHON/ARCHON/Content/ARToolkit/Data/camera_para.dat" for reading.
                            Guess what? /storage/emulated folder is empty.

                            '/storage/emulated/0/' - this part of the path is taken from GFilePathBase extern variable. But i can't find the code which sets it.

                            Is this ARToolkitDevice class is made by you or artoolkit community?
                            Do you know where the variable is set?
                            Any help would be very much appreciated.

                            Comment


                              Hi,

                              Do you have the .obb file too ? Also you need to install using the generated .bat file.


                              Originally posted by Moonmana View Post
                              Finally, found the reason of the black/white screen: when installing through unreal engine, unreal engine copies required files to sdcard folder including ARToolkit folder. When the app is installed this way it can locate camera_para.dat file and works fine.
                              And if the app is installed other way after UE copied the files to the folder it also works.
                              However when the app was never launched on a device through unreal engine it includes the folder to APK, but the app can't locate it because it's trying to locate it in a wrong folder.

                              I have checked your code and it seems the path to the file is generated in ARToolkitDevice.cpp:
                              111: FString AbsoluteContentPath = GFilePathBase + TEXT("/UE4Game/") + FApp::GetGameName() + TEXT("/") + FString::Printf(TEXT("%s/Content/"), FApp::GetGameName());

                              05-01 04:26:41.899 12831 12845 E libar : Error (2): unable to open camera parameters file "/storage/emulated/0/UE4Game/ARCHON/ARCHON/Content/ARToolkit/Data/camera_para.dat" for reading.
                              Guess what? /storage/emulated folder is empty.

                              '/storage/emulated/0/' - this part of the path is taken from GFilePathBase extern variable. But i can't find the code which sets it.

                              Is this ARToolkitDevice class is made by you or artoolkit community?
                              Do you know where the variable is set?
                              Any help would be very much appreciated.
                              AR plugin for UE4
                              AR Virtual Mirror plugin for UE4
                              Red Alert 2 VR remake
                              Armed Island VR RTS

                              Comment


                                Originally posted by AdamHorvath View Post
                                Do you have the .obb file too ?
                                i've tried both options with obb and with single apk, doesn't matter it can't find the camera params.

                                Originally posted by AdamHorvath View Post
                                Also you need to install using the generated .bat file.
                                First of all, i need this app to be downloadable from the google app store, i can't tell users "you can install it only if you install android sdk and will use the bat file", right?
                                Anyway the bat file doesn't help.
                                Let me explain in details.

                                There are 3 ways how i can install an unreal app to a phone:
                                1. Attach it through USB and press "Launch" in UE Editor
                                2. Package the app and install it through USB using the bat file
                                3. Package the app and upload the apk (and if needed obb) file(s) to the google app store and download it from the store.

                                And see what happens:
                                It seems the app is looking for the files in 2 places: /storage/emulated/0/ and /sdcard/
                                When i have clear device and install the app using option 2 or 3, there are no artoolkit files neither in /storage/emulated/0/ nor in /sdcard/ and the camera doesn't work.
                                If i use option 1, UE copies the files to /sdcard/ folder and the app works.
                                Even if i unuinstall the app the /sdcard/ fodler is still here with its content and further installations using any of the methods work, because the app is able to find the files in /sdcard/ folder.
                                I've checked the apk i install, it does contain assets folder with main.zip (named as main.obb.png), which contains the artoolkit folder and myappname-android.pak.
                                When I launch the app it displays GUI and for a second displays 3d model i use, only the camera fails. So it seems the assets are unpacked and used by the app with no problems except the artoolkit folder.
                                So it seems there is no problem with obb, but only with the artoolkit folder which is added as 'additional' folder to pack.

                                One more thing: I installed the unreal4ar demo from the store and it has content folder in 'UE4Game/ArPluginV4_15/ArPluginV4_15' which does contain the artoolkit folder. My app has all folders and similar structure except the content folder. Any ideas why it can be so?
                                Last edited by Moonmana; 05-02-2017, 05:11 AM.

                                Comment

                                Working...
                                X