Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
ARCore Unreal v1.7.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
bopangzz committed Feb 13, 2019
1 parent 57c1041 commit 014419c
Show file tree
Hide file tree
Showing 50 changed files with 452 additions and 215 deletions.
37 changes: 37 additions & 0 deletions AugmentedFaces/AugmentedFaces.uproject
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"FileVersion": 3,
"Category": "",
"Description": "",
"Plugins": [
{
"Name": "AppleARKit",
"Enabled": true
},
{
"Name": "AppleARKitFaceSupport",
"Enabled": true
},
{
"Name": "GoogleARCore",
"Enabled": true
},
{
"Name": "GoogleARCoreServices",
"Enabled": true
},
{
"Name": "MagicLeapMedia",
"Enabled": false,
"SupportedTargetPlatforms": [
"Lumin"
]
},
{
"Name": "MagicLeap",
"Enabled": false,
"SupportedTargetPlatforms": [
"Lumin"
]
}
]
}
2 changes: 2 additions & 0 deletions AugmentedFaces/Config/DefaultEditor.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@


177 changes: 177 additions & 0 deletions AugmentedFaces/Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
[URL]
[/Script/Engine.RendererSettings]
r.MobileHDR=False
r.Mobile.DisableVertexFog=True
r.Shadow.CSM.MaxMobileCascades=2
r.MobileMSAA=1
r.Mobile.UseLegacyShadingModel=False
r.Mobile.AllowDitheredLODTransition=False
r.Mobile.AllowSoftwareOcclusion=False
r.DiscardUnusedQuality=False
r.AllowOcclusionQueries=True
r.MinScreenRadiusForLights=0.030000
r.MinScreenRadiusForDepthPrepass=0.030000
r.MinScreenRadiusForCSMDepth=0.010000
r.PrecomputedVisibilityWarning=False
r.TextureStreaming=True
Compat.UseDXT5NormalMaps=False
r.ClearCoatNormal=False
r.ReflectionCaptureResolution=128
r.ReflectionEnvironmentLightmapMixBasedOnRoughness=True
r.ForwardShading=False
r.VertexFoggingForOpaque=True
r.AllowStaticLighting=True
r.NormalMapsForStaticLighting=False
r.GenerateMeshDistanceFields=False
r.DistanceFieldBuild.EightBit=False
r.GenerateLandscapeGIData=False
r.DistanceFieldBuild.Compress=False
r.TessellationAdaptivePixelsPerTriangle=48.000000
r.SeparateTranslucency=False
r.TranslucentSortPolicy=0
TranslucentSortAxis=(X=0.000000,Y=-1.000000,Z=0.000000)
r.CustomDepth=1
r.CustomDepthTemporalAAJitter=True
r.PostProcessing.PropagateAlpha=0
r.DOF.Algorithm=True
r.DefaultFeature.Bloom=False
r.DefaultFeature.AmbientOcclusion=False
r.DefaultFeature.AmbientOcclusionStaticFraction=True
r.DefaultFeature.AutoExposure=False
r.DefaultFeature.AutoExposure.Method=0
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=False
r.UsePreExposure=False
r.DefaultFeature.MotionBlur=False
r.DefaultFeature.LensFlare=False
r.TemporalAA.Upsampling=False
r.DefaultFeature.AntiAliasing=0
r.DefaultFeature.LightUnits=1
r.DefaultBackBufferPixelFormat=4
r.Shadow.UnbuiltPreviewInGame=True
r.StencilForLODDither=False
r.EarlyZPass=3
r.EarlyZPassMovable=True
r.EarlyZPassOnlyMaterialMasking=False
r.DBuffer=True
r.ClearSceneMethod=1
r.BasePassOutputsVelocity=False
r.SelectiveBasePassOutputs=False
bDefaultParticleCutouts=False
fx.GPUSimulationTextureSizeX=1024
fx.GPUSimulationTextureSizeY=1024
r.AllowGlobalClipPlane=False
r.GBufferFormat=1
r.MorphTarget.Mode=True
r.GPUCrashDebugging=False
vr.InstancedStereo=False
vr.MultiView=False
vr.MobileMultiView=False
vr.MobileMultiView.Direct=False
vr.MonoscopicFarField=False
vr.RoundRobinOcclusion=False
vr.ODSCapture=False
r.WireframeCullThreshold=5.000000
r.SupportStationarySkylight=True
r.SupportLowQualityLightmaps=True
r.SupportPointLightWholeSceneShadows=True
r.SupportAtmosphericFog=True
r.SkinCache.CompileShaders=False
r.Mobile.EnableStaticAndCSMShadowReceivers=True
r.Mobile.EnableMovableLightCSMShaderCulling=True
r.Mobile.AllowDistanceFieldShadows=True
r.Mobile.AllowMovableDirectionalLights=True
r.MobileNumDynamicPointLights=4
r.MobileDynamicPointLightsUseStaticBranch=True
r.SkinCache.SceneMemoryLimitInMB=128.000000
r.GPUSkin.Limit2BoneInfluences=False
r.SupportDepthOnlyIndexBuffers=True
r.SupportReversedIndexBuffers=True
r.SupportMaterialLayers=False

[/Script/EngineSettings.GameMapsSettings]
EditorStartupMap=/Game/AugmentedFaces.AugmentedFaces
LocalMapOptions=
TransitionMap=None
bUseSplitscreen=False
TwoPlayerSplitscreenLayout=Horizontal
ThreePlayerSplitscreenLayout=FavorTop
FourPlayerSplitscreenLayout=Grid
bOffsetPlayerGamepadIds=False
GameInstanceClass=/Script/Engine.GameInstance
GameDefaultMap=/Game/AugmentedFaces.AugmentedFaces
ServerDefaultMap=/Engine/Maps/Entry.Entry
GlobalDefaultGameMode=/Script/Engine.GameModeBase
GlobalDefaultServerGameMode=None

[/Script/Slate.SlateSettings]
bExplicitCanvasChildZOrder=True

[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
bSupportsPortraitOrientation=True
bSupportsUpsideDownOrientation=False
bSupportsLandscapeLeftOrientation=False
PreferredLandscapeOrientation=LandscapeLeft
MinimumiOSVersion=IOS_12
bSupportsLandscapeRightOrientation=False
BundleDisplayName=AugmentedFaces UE4
BundleIdentifier=com.google.ar.core.examples.unreal.augmentedfaces

[/Script/HardwareTargeting.HardwareTargetingSettings]
TargetedHardwareClass=Mobile
AppliedTargetedHardwareClass=Mobile
DefaultGraphicsPerformance=Scalable
AppliedDefaultGraphicsPerformance=Scalable

[/Script/AndroidRuntimeSettings.AndroidRuntimeSettings]
PackageName=com.google.ar.core.examples.unreal.augmentedfaces
MinSDKVersion=24
TargetSDKVersion=26
bPackageDataInsideApk=True
Orientation=Sensor
bFullScreen=True
ApplicationDisplayName=AugmentedFaces UE4

[/Script/Engine.PhysicsSettings]
DefaultGravityZ=-980.000000
DefaultTerminalVelocity=4000.000000
DefaultFluidFriction=0.300000
SimulateScratchMemorySize=262144
RagdollAggregateThreshold=4
TriangleMeshTriangleMinAreaThreshold=5.000000
bEnableAsyncScene=False
bEnableShapeSharing=False
bEnablePCM=True
bEnableStabilization=False
bWarnMissingLocks=True
bEnable2DPhysics=False
PhysicErrorCorrection=(PingExtrapolation=0.100000,PingLimit=100.000000,ErrorPerLinearDifference=1.000000,ErrorPerAngularDifference=1.000000,MaxRestoredStateError=1.000000,MaxLinearHardSnapDistance=400.000000,PositionLerp=0.000000,AngleLerp=0.400000,LinearVelocityCoefficient=100.000000,AngularVelocityCoefficient=10.000000,ErrorAccumulationSeconds=0.500000,ErrorAccumulationDistanceSq=15.000000,ErrorAccumulationSimilarity=100.000000)
LockedAxis=Invalid
DefaultDegreesOfFreedom=Full3D
BounceThresholdVelocity=200.000000
FrictionCombineMode=Average
RestitutionCombineMode=Average
MaxAngularVelocity=3600.000000
MaxDepenetrationVelocity=0.000000
ContactOffsetMultiplier=0.020000
MinContactOffset=2.000000
MaxContactOffset=8.000000
bSimulateSkeletalMeshOnDedicatedServer=True
DefaultShapeComplexity=CTF_UseSimpleAndComplex
bDefaultHasComplexCollision=True
bSuppressFaceRemapTable=False
bSupportUVFromHitResults=False
bDisableActiveActors=False
bDisableKinematicStaticPairs=False
bDisableKinematicKinematicPairs=False
bDisableCCD=False
bEnableEnhancedDeterminism=False
MaxPhysicsDeltaTime=0.033333
bSubstepping=False
bSubsteppingAsync=False
MaxSubstepDeltaTime=0.016667
MaxSubsteps=6
SyncSceneSmoothingFactor=0.000000
AsyncSceneSmoothingFactor=0.990000
InitialAverageFrameRate=0.016667
PhysXTreeRebuildRate=10
DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2)
6 changes: 6 additions & 0 deletions AugmentedFaces/Config/DefaultGame.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[/Script/EngineSettings.GeneralProjectSettings]
ProjectID=4A9DFE39614B36C7EB82999BE90B6537
ProjectName=AugmentedFaces
CompanyName=Google
CopyrightNotice=

5 changes: 5 additions & 0 deletions AugmentedFaces/Config/DefaultInput.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


[/Script/Engine.InputSettings]
DefaultTouchInterface=None

Binary file not shown.
Binary file added AugmentedFaces/Content/ARPawn.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added AugmentedFaces/Content/Assets/earMAT.uasset
Binary file not shown.
Binary file added AugmentedFaces/Content/Assets/ear_fur.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AugmentedFaces/Content/Assets/ear_fur.uasset
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added AugmentedFaces/Content/Assets/fox_sample.fbx
Binary file not shown.
Binary file added AugmentedFaces/Content/Assets/fox_sample.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added AugmentedFaces/Content/Assets/frecklesMAT.uasset
Binary file not shown.
Binary file added AugmentedFaces/Content/Assets/noseMAT.uasset
Binary file not shown.
Binary file added AugmentedFaces/Content/Assets/nose_fur.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added AugmentedFaces/Content/Assets/nose_fur.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added AugmentedFaces/Content/AugmentedFaces.umap
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added AugmentedFaces/Content/FoxFaceAttachment.uasset
Binary file not shown.
Binary file added AugmentedFaces/Content/MessageDialog.uasset
Binary file not shown.
1 change: 0 additions & 1 deletion AugmentedImages/AugmentedImages.uproject
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FileVersion": 3,
"EngineAssociation": "{D8C09841-4A56-7D95-C577-5D8344D23714}",
"Category": "",
"Description": "",
"Plugins": [
Expand Down
2 changes: 1 addition & 1 deletion AugmentedImages/Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ AppliedDefaultGraphicsPerformance=Maximum

[/Script/AndroidRuntimeSettings.AndroidRuntimeSettings]
MinSDKVersion=24
TargetSDKVersion=24
TargetSDKVersion=26
PackageName=com.google.ar.core.examples.unreal.augmentedimages
bPackageDataInsideApk=True
bFullScreen=True
Expand Down
1 change: 0 additions & 1 deletion CloudARPin/CloudARPinSample.uproject
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FileVersion": 3,
"EngineAssociation": "{A695F608-7F4D-889B-300B-6FBE7982C6FD}",
"Category": "",
"Description": "",
"Modules": [
Expand Down
2 changes: 1 addition & 1 deletion CloudARPin/Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ AppliedDefaultGraphicsPerformance=Scalable

[/Script/AndroidRuntimeSettings.AndroidRuntimeSettings]
MinSDKVersion=24
TargetSDKVersion=24
TargetSDKVersion=26
bPackageDataInsideApk=True
bFullScreen=True
bUseExternalFilesDir=True
Expand Down
Binary file not shown.
6 changes: 5 additions & 1 deletion CloudARPin/Source/CloudARPinSample/ARPlaneRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ void AARPlaneRenderer::UpdatePlaneMesh(UARPlaneGeometry* ARCorePlaneObject, UPro
TArray<FLinearColor> PolygonMeshVertexColors;
TArray<int> PolygonMeshIndices;
TArray<FVector> PolygonMeshNormals;
TArray<FVector2D> PolygonMeshUVs;

PolygonMeshVertices.Empty(PolygonMeshVerticesNum);
PolygonMeshVertexColors.Empty(PolygonMeshVerticesNum);
Expand All @@ -145,6 +146,9 @@ void AARPlaneRenderer::UpdatePlaneMesh(UARPlaneGeometry* ARCorePlaneObject, UPro
PolygonMeshVertices.Add(BoundaryPoint);
PolygonMeshVertices.Add(InteriorPoint);

PolygonMeshUVs.Add(FVector2D(BoundaryPoint.X, BoundaryPoint.Y));
PolygonMeshUVs.Add(FVector2D(InteriorPoint.X, InteriorPoint.Y));

PolygonMeshNormals.Add(PlaneNormal);
PolygonMeshNormals.Add(PlaneNormal);

Expand Down Expand Up @@ -184,7 +188,7 @@ void AARPlaneRenderer::UpdatePlaneMesh(UARPlaneGeometry* ARCorePlaneObject, UPro
}

// No need to fill uv and tangent;
PlanePolygonMeshComponent->CreateMeshSection_LinearColor(0, PolygonMeshVertices, PolygonMeshIndices, PolygonMeshNormals, TArray<FVector2D>(), PolygonMeshVertexColors, TArray<FProcMeshTangent>(), false);
PlanePolygonMeshComponent->CreateMeshSection_LinearColor(0, PolygonMeshVertices, PolygonMeshIndices, PolygonMeshNormals, PolygonMeshUVs, PolygonMeshVertexColors, TArray<FProcMeshTangent>(), false);

// Set the component transform to Plane's transform.
PlanePolygonMeshComponent->SetWorldTransform(ARCorePlaneObject->GetLocalToWorldTransform());
Expand Down
1 change: 0 additions & 1 deletion ComputerVision/ComputerVision.uproject
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"FileVersion": 3,
"EngineAssociation": "{687313F1-4017-732B-F093-63B4DA844176}",
"Category": "",
"Description": "",
"Modules": [
Expand Down
9 changes: 8 additions & 1 deletion ComputerVision/Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ bBuildForES31=False
bBuildForArm64=False
bBuildForArmV7=True
MinSDKVersion=24
TargetSDKVersion=24
TargetSDKVersion=26
bPackageDataInsideApk=True
bFullScreen=False
PackageName=com.google.ar.core.examples.unreal.computervision
Expand Down Expand Up @@ -161,3 +161,10 @@ AsyncSceneSmoothingFactor=0.990000
InitialAverageFrameRate=0.016667
PhysXTreeRebuildRate=10
DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2)

[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
bSupportsPortraitOrientation=False
bSupportsUpsideDownOrientation=False
bSupportsLandscapeLeftOrientation=True
PreferredLandscapeOrientation=LandscapeLeft

Binary file modified ComputerVision/Content/ComputerVision/ComputerVision.umap
Binary file not shown.
Binary file not shown.
43 changes: 0 additions & 43 deletions ComputerVision/Source/ComputerVision/EdgeDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,46 +164,3 @@ UTexture2D *AGoogleARCoreEdgeDetector::GetCameraImage()
return CameraImageTexture;
}

void AGoogleARCoreEdgeDetector::GetTransformedCameraImageUV(TArray<float>& OutUV)
{
if(!CameraImageTexture) {
return;
}

// First get the cropped UV so that the camera image and pass through camera image has the same aspect ratio.
FIntPoint ScreenSize = GEngine->GameViewport->Viewport->GetSizeXY();
int32 TexWidth = CameraImageTexture->GetSizeX();
int32 TexHeight = CameraImageTexture->GetSizeY();
float TexAspect = static_cast<float>(TexWidth) / static_cast<float>(TexHeight);
// Hard coded the passthrough image aspect ratio as it is hard coded in the ARCore Plugin.
float PassthroughAspect = 1920.0f / 1080.0f;

bool bLandscape = true;
if (ScreenSize.X < ScreenSize.Y)
{
bLandscape = false;
}

float MinU = 0.0f;
float MinV = 0.0f;

if(TexAspect < PassthroughAspect) {
// Texture needs to be cropped on top/bottom.
MinV = (1 - TexAspect / PassthroughAspect) / 2.0f;
} else {
// Texture needs to be cropped on the left/right.
MinU = (1 - PassthroughAspect / TexAspect) / 2.0f;
}

if (!bLandscape)
{
float Temp = MinU;
MinU = MinV;
MinV = Temp;
}

const TArray<float> CroppedUV = { MinU, MinV, 1.0f - MinU, MinV, MinU, 1.0f - MinV, 1.0f - MinU, 1.0f - MinV };

// Transform the cropped UV.
UGoogleARCoreSessionFunctionLibrary::GetPassthroughCameraImageUV(CroppedUV, OutUV);
}
6 changes: 0 additions & 6 deletions ComputerVision/Source/ComputerVision/EdgeDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ class AGoogleARCoreEdgeDetector : public AActor
UFUNCTION(BlueprintCallable, Category = "GoogleARCoreSample|EdgeDetector", meta = (Keywords = "googlear arcore edgedetector"))
UTexture2D *GetCameraImage();

/**
* Generate the texture coordinates that matches the camera image with the passthrough image aspect ratio and rotation.
*/
UFUNCTION(BlueprintPure, Category = "GoogleARCoreSample|EdgeDetector", meta = (Keywords = "googlear arcore edgedetector"))
void GetTransformedCameraImageUV(TArray<float>& OutUV);

/**
* The generated camera texture.
*/
Expand Down
9 changes: 8 additions & 1 deletion HelloARUnreal/Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ StoreVersion=1
ApplicationDisplayName=Hello AR UE4
VersionDisplayName=1.0
MinSDKVersion=24
TargetSDKVersion=24
TargetSDKVersion=26
InstallLocation=InternalOnly
bEnableGradle=True
bPackageDataInsideApk=True
Expand Down Expand Up @@ -213,3 +213,10 @@ AsyncSceneSmoothingFactor=0.990000
InitialAverageFrameRate=0.016667
PhysXTreeRebuildRate=10
DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2)

[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
bSupportsPortraitOrientation=False
bSupportsUpsideDownOrientation=False
bSupportsLandscapeLeftOrientation=True
PreferredLandscapeOrientation=LandscapeLeft

Binary file modified HelloARUnreal/Content/Blueprints/HelloARHudWidget.uasset
Binary file not shown.
Binary file modified HelloARUnreal/Content/Maps/HelloAR.umap
Binary file not shown.
Loading

0 comments on commit 014419c

Please sign in to comment.