Announcement

Collapse
No announcement yet.

Augmented Reality for UE4

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

    Hi guys,

    Has anyone successfully managed to package for windows?

    I'm always getting the 'Webcam init error' message.


    Any help would be greatly appreciated

    Comment


      Hi,

      Did you try it with one of the full versions ? The demo can't be packaged, it's just running in the editor.



      Originally posted by jakwarne View Post
      Hi guys,

      Has anyone successfully managed to package for windows?

      I'm always getting the 'Webcam init error' message.


      Any help would be greatly appreciated
      Last edited by AdamHorvath; 03-27-2018, 10:01 AM.
      AR plugin for UE4
      AR Virtual Mirror plugin for UE4
      Red Alert 2 VR remake
      Armed Island VR RTS

      Comment


        Ah ok, yeah i'm using the demo version. I thought It was just me doing something wrong.

        Then I will proceed to buy the commercial version, I just wanted to test that it meets the needs of our project first.


        The only other things I would need to confirm first is whether...

        - Using 4 markers for 4 separate models is possible?

        - It's possible to still display the models even when the markers aren't visible anymore?

        Thank you for the help

        Comment


          1. Yes you can track 4 markers at the same time
          Check out this example with multiple markers: https://www.youtube.com/watch?v=t6lOCmq65fc

          2. You can display objects on their last known position


          Originally posted by jakwarne View Post
          Ah ok, yeah i'm using the demo version. I thought It was just me doing something wrong.

          Then I will proceed to buy the commercial version, I just wanted to test that it meets the needs of our project first.


          The only other things I would need to confirm first is whether...

          - Using 4 markers for 4 separate models is possible?

          - It's possible to still display the models even when the markers aren't visible anymore?

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

          Comment


            Ok Excellent, thank you very much.

            Also, have you seen any examples of SLAM being used in cooperation with your marker tracking?

            Comment


              Hi everything works really great, i love this plugin I am struggling right now a bit with the display of a widget while a marker is detected. If i add a widget to the viewport in the levelBP when a marker is detected, then the widget displays perfectly. But i havent found the right spot in that BP to remove this widget once the marker is gone. I tried allready so many places, but the widget never goes away! anyone a suggestion?

              Comment


                Hello,

                In the Advanced sample project, open the level blueprint and in the tick function you will find all the GetMarker nodes. Each GetMarker node has a visibility pin. If the marker is tracked the visbility is true.

                You can use this value with a branch node to hide / unhide the menu widget. (SetVisibility) In case you have more than one GetMarker nodes at the beginning of the tick function set a variable to false and only set it true if any of the GetMarker nodes visbility is true, then test against this variable.




                Originally posted by wontonanimalchin View Post
                Hi everything works really great, i love this plugin I am struggling right now a bit with the display of a widget while a marker is detected. If i add a widget to the viewport in the levelBP when a marker is detected, then the widget displays perfectly. But i havent found the right spot in that BP to remove this widget once the marker is gone. I tried allready so many places, but the widget never goes away! anyone a suggestion?
                AR plugin for UE4
                AR Virtual Mirror plugin for UE4
                Red Alert 2 VR remake
                Armed Island VR RTS

                Comment


                  ahaaa thanks Adam, thats a very good way. I tried to do it in a different (wrong ) way.This will work for sure!

                  Comment


                    Hey Adam, v11 is not working with UNREAL 4.18, visual studio 2015. This is the error message I get


                    Code:
                    An error occurred while trying to generate project files.
                    
                    Running C:/Program Files/Epic Games/UE_4.18/Engine/Binaries/DotNET/UnrealBuildTool.exe  -projectfiles -project="C:/Users/shunx/Documents/Unreal Projects/ARDnD/ARDnD.uproject" -game -rocket -progress
                    Discovering modules, targets and source code for project...
                    While compiling C:\Users\shunx\Documents\Unreal Projects\ARDnD\Intermediate\Build\BuildRules\ARDnDModuleRules.dll:
                    ERROR: c:\Users\shunx\Documents\Unreal Projects\ARDnD\Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit\ARToolkit.Build.cs(110,13) : error CS1502: The best overloaded method match for 'System.Collections.Generic.List<UnrealBuildTool.ModuleRules.RuntimeDependency>.Add(UnrealBuildTool.ModuleRules.RuntimeDependency)' has some invalid arguments
                    ERROR: c:\Users\shunx\Documents\Unreal Projects\ARDnD\Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit\ARToolkit.Build.cs(110,37) : error CS1503: Argument 1: cannot convert from 'string' to 'UnrealBuildTool.ModuleRules.RuntimeDependency'
                    ERROR: c:\Users\shunx\Documents\Unreal Projects\ARDnD\Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit\ARToolkit.Build.cs(111,13) : error CS1502: The best overloaded method match for 'System.Collections.Generic.List<UnrealBuildTool.ModuleRules.RuntimeDependency>.Add(UnrealBuildTool.ModuleRules.RuntimeDependency)' has some invalid arguments
                    ERROR: c:\Users\shunx\Documents\Unreal Projects\ARDnD\Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit\ARToolkit.Build.cs(111,37) : error CS1503: Argument 1: cannot convert from 'string' to 'UnrealBuildTool.ModuleRules.RuntimeDependency'
                    ERROR: c:\Users\shunx\Documents\Unreal Projects\ARDnD\Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit\ARToolkit.Build.cs(112,13) : error CS1502: The best overloaded method match for 'System.Collections.Generic.List<UnrealBuildTool.ModuleRules.RuntimeDependency>.Add(UnrealBuildTool.ModuleRules.RuntimeDependency)' has some invalid arguments
                    ERROR: c:\Users\shunx\Documents\Unreal Projects\ARDnD\Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit\ARToolkit.Build.cs(112,37) : error CS1503: Argument 1: cannot convert from 'string' to 'UnrealBuildTool.ModuleRules.RuntimeDependency'
                    ERROR: UnrealBuildTool Exception: Unable to compile source files.
                    Took 0.000170 seconds to synchronously load lazily loaded font '../../../Engine/Content/Slate/Fonts/Roboto-Regular.ttf' (155K)

                    Comment


                      Yes. It works with 4.19 out of the box.

                      If you want to make it work on 4.18 you need to replace it with Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit\ARToolkit.Build.cs from the previous version.


                      Originally posted by Shunxu View Post
                      Hey Adam, v11 is not working with UNREAL 4.18, visual studio 2015. This is the error message I get


                      Code:
                      An error occurred while trying to generate project files.
                      
                      Running C:/Program Files/Epic Games/UE_4.18/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="C:/Users/shunx/Documents/Unreal Projects/ARDnD/ARDnD.uproject" -game -rocket -progress
                      Discovering modules, targets and source code for project...
                      While compiling C:\Users\shunx\Documents\Unreal Projects\ARDnD\Intermediate\Build\BuildRules\ARDnDModuleRules.dll:
                      ERROR: c:\Users\shunx\Documents\Unreal Projects\ARDnD\Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit\ARToolkit.Build.cs(110,13) : error CS1502: The best overloaded method match for 'System.Collections.Generic.List<UnrealBuildTool.ModuleRules.RuntimeDependency>.Add(UnrealBuildTool.ModuleRules.RuntimeDependency)' has some invalid arguments
                      ERROR: c:\Users\shunx\Documents\Unreal Projects\ARDnD\Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit\ARToolkit.Build.cs(110,37) : error CS1503: Argument 1: cannot convert from 'string' to 'UnrealBuildTool.ModuleRules.RuntimeDependency'
                      ERROR: c:\Users\shunx\Documents\Unreal Projects\ARDnD\Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit\ARToolkit.Build.cs(111,13) : error CS1502: The best overloaded method match for 'System.Collections.Generic.List<UnrealBuildTool.ModuleRules.RuntimeDependency>.Add(UnrealBuildTool.ModuleRules.RuntimeDependency)' has some invalid arguments
                      ERROR: c:\Users\shunx\Documents\Unreal Projects\ARDnD\Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit\ARToolkit.Build.cs(111,37) : error CS1503: Argument 1: cannot convert from 'string' to 'UnrealBuildTool.ModuleRules.RuntimeDependency'
                      ERROR: c:\Users\shunx\Documents\Unreal Projects\ARDnD\Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit\ARToolkit.Build.cs(112,13) : error CS1502: The best overloaded method match for 'System.Collections.Generic.List<UnrealBuildTool.ModuleRules.RuntimeDependency>.Add(UnrealBuildTool.ModuleRules.RuntimeDependency)' has some invalid arguments
                      ERROR: c:\Users\shunx\Documents\Unreal Projects\ARDnD\Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit\ARToolkit.Build.cs(112,37) : error CS1503: Argument 1: cannot convert from 'string' to 'UnrealBuildTool.ModuleRules.RuntimeDependency'
                      ERROR: UnrealBuildTool Exception: Unable to compile source files.
                      Took 0.000170 seconds to synchronously load lazily loaded font '../../../Engine/Content/Slate/Fonts/Roboto-Regular.ttf' (155K)
                      AR plugin for UE4
                      AR Virtual Mirror plugin for UE4
                      Red Alert 2 VR remake
                      Armed Island VR RTS

                      Comment


                        Hey guys,

                        I'm wondering if anybody can explain the difference between 'moving the object' and 'moving the camera' is one more stable for tracking?

                        I need to see a static scene on a table. My plan was to have a marker in each corner of the table which adds a unique offset to the 3d scene, to always make sure its positioned in the middle of the table...

                        However, from testing this set up its more apparent that not having the model directly on top of the marker and instead offsetting it from the corner of the table makes the tracking stability worse.

                        Is there anyway to strengthen the set up between markers? I'm not really sure what kind of maths is required in the blueprints to make error correction between markers.

                        Any recommendations would be appreciated.

                        Thanks

                        Comment


                          Originally posted by AdamHorvath View Post
                          Hi,

                          I've uploaded a very early binary version of the upcoming AR plugin with a sample project.
                          Currently it works only in the UE editor (on Windows), and all of it's features can be used with blueprints. No C++ coding required!

                          I've tried to keep everything as simple as possible.

                          Opinions / suggestion are welcomed!

                          How to test ?
                          ===========


                          1. Download the file on the link below and unzip it's contents to your UE4 project directory.
                          http://get.fitnect.hu/download.php?f=tools/ARSample.zip

                          2. Print the markers located in ARSample\Plugins\ARToolkitPlugin\Binaries\Win64\Data\pdf

                          - There are 4 markers here: Kanji , Hiro, Sample 1, Sample 2. (Print at least Hiro, to get started!)
                          - Make sure to print them in their original size, and there should be a white border around the marker.

                          3. Run Epic Games launcher, and install Unreal Engine 4.9.2

                          4. In Epic Games launcher open ARSample project

                          5. Connect your webcam, and press the play button inside the editor!

                          6. Video stream should appear, move the markers (Hiro / Kanji) in front of the camera

                          7. Default unreal 3D chairs should appear on the screen.

                          More info about marker tracking can be found on the following link:
                          http://artoolkit.org/documentation/d...g:marker_about


                          There are two main blueprints in the example:

                          ARToolkitBase blueprint
                          ===================


                          - Default webcam init (640x480 default resolution)
                          - Initializes the video stream and creates a dynamic texture based on the baseFeed material
                          - Loading markers (Marker list can be edited in the Markers enumeration - Content browser: Contents/ARToolkit/Blueprints/Markers
                          - Cleaning up at the end.

                          Level blueprint
                          ===================


                          - Transformation of the "chairs" based on marker positions / rotations.

                          CubeHiro, CubeKanji
                          ===================


                          - Simple static meshes - Feel free to change them!


                          Cheers,
                          Adam
                          Great Adam! if I change your marker image with my specifit image? what can I do?

                          Comment


                            You can use your own images for tracking.

                            Originally posted by gravitstudio View Post

                            Great Adam! if I change your marker image with my specifit image? what can I do?
                            AR plugin for UE4
                            AR Virtual Mirror plugin for UE4
                            Red Alert 2 VR remake
                            Armed Island VR RTS

                            Comment


                              Hi, Adam.
                              i am using Full Version, commercial ver.

                              1. project works fine on viewport preview.
                              and then i tried to package project for android, it works fine by installing with batch file which is generated by ue4 on my developer mobile.
                              but that means only android system with developer mode turned on is working.
                              i tried many different phones without developer mode, always gives me the result with webcam init error on any different mobile
                              (.apk packed with .obb and without .obb tried both)
                              (i tried packing win version, and still it gives me webcam init error)

                              2. also some of phone are just crashing. lg G5 and samsung J5, J7 they are at least android 6.0

                              do you know why its happening? any idea?
                              thx

                              --- added ---

                              i just tested again with new project and copy paste provided SampleProject files to new project
                              then packed without change any of assets

                              still it crashes in G5, samsung J5, J7
                              i used 4.19.0
                              c++ project, empty
                              mobile, scale 2D,3D, no start contents

                              crash message "Unfortunately, [TestProject, project name] has stopped"

                              --- added(2) ---

                              i solved problem (1) it was the problem of obb folder location,

                              "
                              In SampleProject\Plugins\ARToolkitPlugin\Source\ARToolkitPlugin\ARToolkitPlugin_APL.xml locate this line:

                              String obbPath = Environment.getExternalStorageDirectory() + "/obb/";

                              Change it to:

                              String obbPath = Environment.getExternalStorageDirectory() + "/Android/obb/";
                              "

                              but still doesnt work for windows and crashing problem is there.
                              Last edited by ETerNia; 04-11-2018, 03:14 AM.

                              Comment


                                1. Test devices must be in developer mode, because the installer script is using ADB which requires USB debugging on android. In case you want to test it without developer mode you need to upload the app to the play store and install from there.

                                2. One of my test device is a J5, and did not experience crashes on it.

                                To find the reason of the crash you can access the output of your device. Open a command prompt and run the following, while your device is connected via usb

                                adb logcat -s UE4 -s CrashAnrDetector

                                Run the app. You will se the output log in the command prompt.







                                Originally posted by ETerNia View Post
                                Hi, Adam.
                                i am using Full Version, commercial ver.

                                1. project works fine on viewport preview.
                                and then i tried to package project for android, it works fine by installing with batch file which is generated by ue4 on my developer mobile.
                                but that means only android system with developer mode turned on is working.
                                i tried many different phones without developer mode, always gives me the result with webcam init error on any different mobile
                                (.apk packed with .obb and without .obb tried both)
                                (i tried packing win version, and still it gives me webcam init error)

                                2. also some of phone are just crashing. lg G5 and samsung J5, J7 they are at least android 6.0

                                do you know why its happening? any idea?
                                thx

                                --- added ---

                                i just tested again with new project and copy paste provided SampleProject files to new project
                                then packed without change any of assets

                                still it crashes in G5, samsung J5, J7
                                i used 4.19.0
                                c++ project, empty
                                mobile, scale 2D,3D, no start contents

                                crash message "Unfortunately, [TestProject, project name] has stopped"

                                --- added(2) ---

                                i solved problem (1) it was the problem of obb folder location,

                                "
                                In SampleProject\Plugins\ARToolkitPlugin\Source\ARToolkitPlugin\ARToolkitPlugin_APL.xml locate this line:

                                String obbPath = Environment.getExternalStorageDirectory() + "/obb/";

                                Change it to:

                                String obbPath = Environment.getExternalStorageDirectory() + "/Android/obb/";
                                "

                                but still doesnt work for windows and crashing problem is there.
                                Last edited by AdamHorvath; 04-11-2018, 04:35 AM.
                                AR plugin for UE4
                                AR Virtual Mirror plugin for UE4
                                Red Alert 2 VR remake
                                Armed Island VR RTS

                                Comment

                                Working...
                                X