Can you send me the 3D model to info@unreal4ar.com ? I am not sure what is going on without seeing it.
I already send you the last mesh, it is in the MergedMeshes folder.
Hey ,
Could you please take a look at this thread perhaps: Packaging Setting "Additional Non-Asset Directories to copy" not work with Android - Mobile - Epic Developer Community Forums
And maybe tell us if that person is doing something wrong? Because if we canât get the data and dataNFT folders to copy over automatically, we canât make an app that can be put on the play store (as far as my limited knowledge goes regarding creating apps). Iâm having this same problem, it works after i copy over the folders manually. But I canât get the packaging to include the ARtoolkit folder.
Thanks for your time.
While Iâm not , I was able to successfully build for Android from version 1.5 and looking at the change logs:
AR Plugin V1.4 â 2016-01-20
â UnpackData function added for Android builds (extracts data from obb to ue4game)
Anything beyond that version should work as long as you include it in the âAdditional Non-Added Directories To Copyâ group.
Project Settings -> Packaging (Under the Project header) -> Click the button to expand for advanced fields -> At the bottom click the + next to the field -> navigate to the ARToolkit folder
Image below, hope this helps!
Hi Envaal,
Huogo was right, it works like he described above.
One more thing. Data content is copied into the .obb file, so you have to enable it. (Donât disable it)
Single .apk installs wonât work.
Once the user installs your app from the market, UE4 will automatically download the corresponding .obb file and the plugin will unpack all the necessary data from it at first run.
Thank you for your responses! I figured it out, turns out the OBB is extracted to another folder if you donât set all your project names (at packaging etc) to the exact same name.
Hi,
How i can include ARToolkitComponent.h to my c++ files ?
Compiler couldnât found the file, I tried this style but not wroking:
#include âARToolkitPlugin/Public/ARToolkitComponent.hâ
ERROR : Cannot open include file: âARToolkitPlugin/Public/ARToolkitComponent.hâ: No such file or directory
Also i tried to add this code to build file but complier get another error:
PrivateDependencyModuleNames.AddRange(new string] {âARToolkitPluginâ });
[2016.06.20-22.16.59:374][444]CompilerResultsLog:Error: Error c:\usersâŚ\plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(59) : error C3646: âmatrixâ: unknown override specifier
[2016.06.20-22.16.59:374][444]CompilerResultsLog:Error: Error c:\usersâŚ\plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(59) : error C2143: syntax error: missing â,â before ââ
[2016.06.20-22.16.59:374][444]CompilerResultsLog:Error: Error c:\usersâŚ\plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(59) : error C2143: syntax error: missing â)â before â;â
[2016.06.20-22.16.59:374][444]CompilerResultsLog:Error: Error c:\usersâŚ\plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(59) : error C2238: unexpected token(s) preceding â;â
[2016.06.20-22.16.59:375][444]CompilerResultsLog:Error: Error c:\usersâŚ\plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(64) : error C2143: syntax error: missing â;â before â*â
[2016.06.20-22.16.59:375][444]CompilerResultsLog:Error: Error c:\usersâŚ\plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(64) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
[2016.06.20-22.16.59:375][444]CompilerResultsLog:Error: Error c:\usersâŚ\plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(64) : error C2238: unexpected token(s) preceding â;â
[2016.06.20-22.16.59:375][444]CompilerResultsLog:Error: Error c:\usersâŚ\plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C3646: âfilterCutoffFrequencyâ: unknown override specifier
[2016.06.20-22.16.59:375][444]CompilerResultsLog:Error: Error c:\usersâŚ\plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(65) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
[2016.06.20-22.16.59:375][444]CompilerResultsLog:Error: Error c:\usersâŚ\plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(66) : error C3646: âfilterSampleRateâ: unknown override specifier
[2016.06.20-22.16.59:375][444]CompilerResultsLog:Error: Error c:\usersâŚ\plugins\artoolkitplugin\source\artoolkitplugin\public\ARToolkitFunctionLibrary.h(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
So iâve been messing with this for a bit now, and I noticed the actual object is being moved instead of the camera. Does this mean we wonât be able to use lightmass on an object? Is there a way to make the object stationary and have the camera move around instead?
Hey ,
Iâm having the same problem on my Nexus 9! Did you have any luck with it since?
If you want to move the camera not the subject you need to use the Camera Posiition / Camera Rotation outputs of the GetMarker node.
http://www.unreal4ar.com/get-marker/
Check out the motorbike example for reference.
Man⌠i really need to learn how to read :rolleyes:
Hi!
Apologies if this info is already out there, I couldnât find it searching through this thread.
Anyway, just popping in to quickly share the fix that worked for me after hitting this error when building for android:
Note: This is using Commercial Plugin V1.5R1
LogPlayLevel: UnrealBuildTool: [1/2] clang++.exe ModuleâŚcpp [armv7-es2]
LogPlayLevel: UnrealBuildTool: In file included from G:/Timecode/TEST/ARTest/Intermediate/Build/Android/ARTest/Development//ModuleâŚcpp:3:
LogPlayLevel: UnrealBuildTool: G:\UnrealEngine\Engine\Source\Runtime\Private\Android\AndroidJNI.cpp(873,2) : error: âdeleteâ applied to a pointer that was allocated with ânew]â; did you mean âdelete]â? -Werror,-Wmismatched-new-delete]
LogPlayLevel: UnrealBuildTool: delete buf;
LogPlayLevel: UnrealBuildTool: ^
LogPlayLevel: UnrealBuildTool: ]
LogPlayLevel: UnrealBuildTool: G:\UnrealEngine\Engine\Source\Runtime\Private\Android\AndroidJNI.cpp(868,21) : note: allocated with ânew]â here
LogPlayLevel: UnrealBuildTool: signed char* buf = new signed char[len];
LogPlayLevel: UnrealBuildTool: ^
LogPlayLevel: UnrealBuildTool: 1 error generated.
LogPlayLevel: UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: G:\Timecode\TEST\ARTest\Binaries\Android\ARTest-armv7-es2.so
Basically you need to do exactly what the error message says
Head on down to line 873 of Android JNI.cpp and change delete buf; to delete] buf;
There is no need to rebuild the engine as the file is linked only at packaging time as far as I can tell.
Hopefully this helps someone out there.
Many thanks to for the awesome plugin!!
I had this problem a few days ago .
do you have any suggest for post #347 ?
I have this same problem, did you guys figure this out?
Edit:
This also occurs with a binary installation of the UE4 editor. Seems more is going onâŚ
Edit2:
There we go: Why render is distorted in mobile? - Rendering - Epic Developer Community Forums
Hi Vahid!
Iâm a bit busy today so I didnât get to look into it much, but I did find that I could get it to compile as follows:
In MyGameMode.cpp
include âARToolkitComponent.hâ
In MyGame.Build.cpp
PublicDependencyModuleNames.AddRange(new string] { âCoreâ, âCoreUObjectâ, âEngineâ, âInputCoreâ, âARToolkitPluginâ, âARToolkitâ });
In Plugins/ARToolkit/ARToolkitFunctionLibrary.h, at the top of the file above include âARToolkitFunctionLibrary.generated.hâ
#ifdef _WIN64
include âAllowWindowsPlatformTypes.hâ
include <dshow.h>
#pragma comment(lib, âstrmiidsâ)
#endif
#if defined APPLE
import <AVFoundation/AVFoundation.h>
import <CoreVideo/CoreVideo.h>
#endif
include <AR/video.h>
include <AR/ar.h>
include <AR/config.h>
include <AR/param.h>
//NFT
include <AR/arMulti.h>
include <AR/arFilterTransMat.h>
include <AR2/tracking.h>
#ifdef _WIN64
include âHideWindowsPlatformTypes.hâ
#endif
Which comes from the private precompiled headers for the plugin. Iâm guessing ARFilterTransMatInfo & ARdouble types are defined somewhere in there and since they are in precompiled header, when another assembly tries to compile them it canât find them.
Itâs not much of a solution but hopefully it can provide a path for investigation
Thanks for your reply, Itâs ok and i could compile engine.
And when i trying to include in MyGameCamera.h
#include "ARToolkitComponent.h"
UPROPERTY(VisibleDefaultsOnly, Category = "AR")
UARToolkitComponent* ARTool;
and then in MyGameCamera.cpp
ARTool = CreateDefaultSubobject<UARToolkitComponent>(TEXT("ARTool"));
Compiler Error is :
CompilerResultsLog: Info Creating library C:\Users\...\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyGame-2077.lib and object C:\Users\...\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyGame-2077.exp
CompilerResultsLog:Error: Error MyGameCamera.cpp.obj : error LNK2019: unresolved external symbol "private: static class UClass * __cdecl UARToolkitComponent::GetPrivateStaticClass(wchar_t const *)" (?GetPrivateStaticClass@UARToolkitComponent@@CAPEAVUClass@@PEB_W@Z) referenced in function "public: class UARToolkitComponent * __cdecl UObject::CreateDefaultSubo
bject<class UARToolkitComponent>(class FName,bool)" (??$CreateDefaultSubobject@VUARToolkitComponent@@@UObject@@QEAAPEAVUARToolkitComponent@@VFName@@_N@Z)
CompilerResultsLog: Info LINK : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
CompilerResultsLog: Info Creating library C:\Users\...\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyGame-2077.lib and object C:\Users\...\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyGame-2077.exp
CompilerResultsLog:Error: Error MyGameCamera.cpp.obj : error LNK2001: unresolved external symbol "private: static class UClass * __cdecl UARToolkitComponent::GetPrivateStaticClass(wchar_t const *)" (?GetPrivateStaticClass@UARToolkitComponent@@CAPEAVUClass@@PEB_W@Z)
CompilerResultsLog:Error: Error C:\Users\...\Binaries\Win64\UE4Editor-MyGame-2077.dll : fatal error LNK1120: 1 unresolved externals
CompilerResultsLog: Info ERROR: UBT ERROR: Failed to produce item: C:\Users\...\Binaries\Win64\UE4Editor-MyGame-2077.dll
Also I tried adding ELEMENTAL_API to UARToolkitComponent but i couldnât compile plugin
class ELEMENTAL_API UARToolkitComponent : public USceneComponent
Hi Vahid!
I canât test it right away, but off the top of my head does your MyGame.Build.cpp contain the ARToolkitPlugin and ARToolkit in PublicDepencyModuleNames?
Also does your C++ project have a Plugins folder in the root (\MyGame\Plugins) containing the ARToolkitPlugin and ARToolkit folders from the Unreal4AR zip file (Path is \SampleProject\Plugins\ARToolkitPlugin & \SampleProject\Plugins\ARToolkitPlugin\Source\ThirdParty\ARToolkit respectively)?
Actually you might not need the ARToolkit at all, just ARToolkitPlugin.
I just did some quick & dirty copy pasting this morning, lol.
MyGame.Build.cpp :
PublicDependencyModuleNames.AddRange(new string] { âCoreâ, âCoreUObjectâ, âEngineâ, âInputCoreâ, âARToolkitPluginâ, âARToolkitâ });
and Yes i have those folder
Also I tried adding ELEMENTAL_API to UARToolkitComponent but i couldnât compile plugin
class ELEMENTAL_API UARToolkitComponent : public USceneComponent
Is there a way to see how the model will be projected on the marker? ie. I have a marker with a city plan and I want to place houses on their respective lots. Now itâs kind of guesswork to see where the model is going to end up relative to the marker.
No direct way for that, but you can add a plane with the texture of the marker to your scene and use it for reference.