Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Unity Configuring AR Foundation 3.0.0-preview to work with LWRP or URP

Discussion in 'Handheld AR' started by todds_unity, Aug 29, 2019.

  1. todds_unity

    todds_unity

    Unity Technologies

    Joined:
    Aug 1, 2018
    Posts:
    127
    With AR Foundation 3.0.0-preview, we are supporting Lightweight Render Pipeline (LWRP) or Universal Render Pipeline (URP).

    AR Foundation supports the two scriptable render pipelines:
    • Lightwight Render Pipeline (LWRP) - supported versions 5.7.2 or later
    • Universal Render Pipeline (URP) - supported versions 7.0.0 or later
    Note: Projects made using LWRP or URP are not compatible with the High Definition Render Pipeline or the built-in Unity rendering pipeline. Before you start development, you must decide which render pipeline to use in your Project.


    Basic Configuration for SRP with AR Foundation
    1. In the project's Assets folder, create a new folder named "Rendering".

    2. In the Assets > Rendering folder, create a "ForwardRenderer" for your SRP.
      create-forward-renderer.png
      • For LWRP, choose Create > Rendering > Lightweight Render Pipeline > Forward Renderer.
      • For URP, choose Create > Rendering > Universal Render Pipeline > Forward Renderer.
    3. In the Inspector with the Forward Renderer selected, add a "ARBackgroundRendererFeature" to the list of Renderer Features.
      add-renderer-feature.png

    4. In the Assets > Rendering folder, create a "PipelineAsset" for your SRP.
      create-pipeline-asset.png
      • For LWRP, choose Create > Rendering > Lightweight Render Pipeline > Pipeline Asset.
      • For URP, choose Create > Rendering > Universal Render Pipeline > Pipeline Asset.
    5. In the Inspector with the Pipeline Asset selected, add the Forward Renderer.
      set-renderer-data.png
      1. Switch the Renderer Type to Custom.
      2. Select the Forward Renderer that you created for the Render Type > Data field.
    6. In Project Settings > Graphics, select the Pipeline Asset for the Scriptable Render Pipeline Settings field.
      set-pipeline-asset.png
     
    Last edited: Aug 29, 2019
  2. Blarp

    Blarp

    Joined:
    May 13, 2014
    Posts:
    205
    THX TODDS
     
    todds_unity likes this.
  3. SnoozerBear_er

    SnoozerBear_er

    Joined:
    Apr 9, 2018
    Posts:
    2
    Thanks!
     
    todds_unity and Blarp like this.
  4. olemidt1

    olemidt1

    Joined:
    Mar 22, 2018
    Posts:
    3
    Amazing. Thanks, I look forward to testing this
     
  5. Saicopate

    Saicopate

    Joined:
    Sep 25, 2017
    Posts:
    71
    Anyone got it to work with 2019.3.0b1 + AR Foundation 3.0? I'm getting blue screen.

    EDIT: OK. I got it to work on a fresh project. However I have a problem converting from a existing one. Any tips to look for?
     
    Last edited: Sep 3, 2019
    soorya696 likes this.
  6. Saicopate

    Saicopate

    Joined:
    Sep 25, 2017
    Posts:
    71
    Ok I got it to work. The problem was that the Canvas was displayed in "Screen Space - Camera" mode with a separate camera. After switching to "Overlay" all is fine.
    Would be nice of you guys to place a simple warning on this post that it does not work when there is a second camera e.g. for canvas rendering. This would spare me and future users a few hours of battling as it doesn't throw any warnings nor errors.

    On a side - LWRP is great (thanks for finally integrating it with ARF), but still we should have an option for a separate canvas camera to e.g. to render 3D objects.
     
    soorya696 likes this.
  7. JohnKP-Mindshow

    JohnKP-Mindshow

    Joined:
    Oct 25, 2017
    Posts:
    56
    While easy to set up, a little frustrating we have to do this and doesn't work for our LWRP use case. We are using a custom SRP in the project folder (it's a very slight modification of the LWRP), so even though the fix should still be relevant to our SRP, its not working since it is looking for shaders hardcoded to a path in the package manager :(


    Trying to figure out the least hackiest work around, but any suggestions from the LWRP or ARFoundation devs would help
     
  8. MF_Danny

    MF_Danny

    Joined:
    Sep 4, 2019
    Posts:
    12
    Just updated to this, I seem to be coming across a gamma issue. My project is linear but my camera feed is definitely having gamma applied to it. Any help would be greatly appreciated - I'm a colossal noob at all of this stuff
     
  9. Blarp

    Blarp

    Joined:
    May 13, 2014
    Posts:
    205
    Click the "custom background" checkbox on the AR component.
    Add a material that has this linear shader:

    https://forum.unity.com/threads/linear-color-space-for-camera-background.537262/#post-4136656

    Camera will be crisp again
     
    MF_Danny likes this.
  10. gfellisch

    gfellisch

    Joined:
    Sep 2, 2019
    Posts:
    21
    I do not get the option to add "AR Background Renderer Feature" to the Renderer Features of my ForwardRenderer. The Project was created with LWRP and the ARFoundation Package ist installed.

    Any idea how I can fix that?
     
  11. gfellisch

    gfellisch

    Joined:
    Sep 2, 2019
    Posts:
    21
    Just found it. The project still loaded v2 instead of v3-preview.
     
  12. MF_Danny

    MF_Danny

    Joined:
    Sep 4, 2019
    Posts:
    12
    Blarp likes this.
  13. AlexTrofim88

    AlexTrofim88

    Joined:
    Oct 17, 2016
    Posts:
    2
    Hi. When creating a build for Android (ARCore), the camera background is always black. I managed to solve this problem by replacing the shader.


    Code (CSharp):
    1. Shader "ALEXWICK/ARCore/ARBackground(Linear)"
    2. {
    3.     Properties {
    4.         _MainTex ("Texture", 2D) = "white" {}
    5.         _UvTopLeftRight ("UV of top corners", Vector) = (0, 1, 1, 1)
    6.         _UvBottomLeftRight ("UV of bottom corners", Vector) = (0 , 0, 1, 0)
    7.     }
    8.  
    9.     // For GLES3
    10.     SubShader
    11.     {
    12.         Pass
    13.         {
    14.             ZWrite Off
    15.  
    16.             GLSLPROGRAM
    17.  
    18.             #pragma only_renderers gles3
    19.  
    20.             #ifdef SHADER_API_GLES3
    21.             #extension GL_OES_EGL_image_external_essl3 : require
    22.             #endif
    23.  
    24.             uniform vec4 _UvTopLeftRight;
    25.             uniform vec4 _UvBottomLeftRight;
    26.  
    27.             #ifdef VERTEX
    28.  
    29.             varying vec2 textureCoord;
    30.  
    31.             void main()
    32.             {
    33.                 #ifdef SHADER_API_GLES3
    34.                 vec2 uvTop = mix(_UvTopLeftRight.zy, _UvTopLeftRight.xw, gl_MultiTexCoord0.y);
    35.                 vec2 uvBottom = mix(_UvBottomLeftRight.zy, _UvBottomLeftRight.xw, gl_MultiTexCoord0.y);
    36.                 textureCoord = mix(uvTop, uvBottom, gl_MultiTexCoord0.x);
    37.  
    38.                 gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
    39.                 #endif
    40.             }
    41.  
    42.             #endif
    43.  
    44.             #ifdef FRAGMENT
    45.             varying vec2 textureCoord;
    46.             uniform samplerExternalOES _MainTex;
    47.  
    48.             void main()
    49.             {
    50.                 #ifdef SHADER_API_GLES3
    51.                 gl_FragColor = texture(_MainTex, textureCoord);
    52.                 //gamma to linear conversion
    53.         gl_FragColor.rgb = pow(gl_FragColor.rgb, vec3(2.2));
    54.                 #endif
    55.             }
    56.  
    57.             #endif
    58.  
    59.             ENDGLSL
    60.         }
    61.     }
    62.  
    63.   Subshader
    64.   {
    65.     Pass
    66.     {
    67.       ZWrite Off
    68.  
    69.       CGPROGRAM
    70.  
    71.       #pragma exclude_renderers gles3
    72.       #pragma vertex vert
    73.       #pragma fragment frag
    74.  
    75.       #include "UnityCG.cginc"
    76.  
    77.       uniform float4 _UvTopLeftRight;
    78.       uniform float4 _UvBottomLeftRight;
    79.  
    80.       struct appdata
    81.       {
    82.         float4 vertex : POSITION;
    83.         float2 uv : TEXCOORD0;
    84.       };
    85.  
    86.       struct v2f
    87.       {
    88.         float2 uv : TEXCOORD0;
    89.         float4 vertex : SV_POSITION;
    90.       };
    91.  
    92.       v2f vert(appdata v)
    93.       {
    94.         float2 uvTop = lerp(_UvTopLeftRight.zy, _UvTopLeftRight.xw, v.uv.y);
    95.         float2 uvBottom = lerp(_UvBottomLeftRight.zy, _UvBottomLeftRight.xw, v.uv.y);
    96.  
    97.         v2f o;
    98.         o.vertex = UnityObjectToClipPos(v.vertex);
    99.         o.uv = lerp(uvTop, uvBottom, v.uv.x);
    100.  
    101.         // Instant preview's texture is transformed differently.
    102.         o.uv = o.uv.yx;
    103.         //o.uv.x = 1.0 - o.uv.x;
    104.         //o.uv.y = 1.0 - o.uv.y;
    105.         return o;
    106.       }
    107.  
    108.       sampler2D _MainTex;
    109.  
    110.       fixed4 frag(v2f i) : SV_Target
    111.       {
    112.            return tex2D(_MainTex, i.uv);
    113.       }
    114.       ENDCG
    115.     }
    116.   }
    117.  
    118.   FallBack Off
    119. }
     
    dnoparker, MF_Danny and Blarp like this.
  14. HonorableDaniel

    HonorableDaniel

    Joined:
    Feb 28, 2007
    Posts:
    2,951
    Does ARFoundation support having no graphics pipeline set? The ARFoundation sample project did not have any render pipeline assigned. I'm getting a bunch of shader errors, and I'm getting a pink screen on my iPad. Please help.
     
  15. todds_unity

    todds_unity

    Unity Technologies

    Joined:
    Aug 1, 2018
    Posts:
    127
    Hi @HonorableDaniel ,

    - What is the exact version of Unity?
    - What version of AR Foundation package?
    - What version of ARKit package?
    - What is the full version of Xcode including the build ID? E.g. "11.1 (11A1025)"
    - What is the full version of iOS are you using? Tap the short version value under Settings > About > SoftwareVersion, and it will shift to appear something like "13.1.2 (16A860)".
    - What is the model of device are you using? Tap the model number value under Settings > About > ModelNumber, and it will shift to appear something like "A1904".

    Todd
     
    Last edited: Oct 3, 2019
  16. HonorableDaniel

    HonorableDaniel

    Joined:
    Feb 28, 2007
    Posts:
    2,951
    2019.2.7f2
    3.0.0 Preview 3
    3.0.0 Preview 3
    Version 11.0 (11A420a)
    13.1 (17A844)
    A2152
     
  17. todds_unity

    todds_unity

    Unity Technologies

    Joined:
    Aug 1, 2018
    Posts:
    127
    The default pipeline, the Legacy Render Pipeline, is what is used when the ProjectSettings > Graphics > ScriptableRenderPipelineSettings is set to None.

    This is the state of the arfoundation-samples project in the master branch. It uses the Legacy RP.

    What changes have you made to the arfoundation-samples project? Which of the sample scenes are you building?

    Would you try pulling down a fresh copy of the arfoundation-samples project and building the SimpleAR scene with no project or scene modifications?


    Todd
     
    Last edited: Oct 4, 2019
  18. HonorableDaniel

    HonorableDaniel

    Joined:
    Feb 28, 2007
    Posts:
    2,951
    Ok, I didn't touch it or any settings. The only modification I made to the project was I enabled the HumanBodyTracking3D scene. I assumed I had to turn at least 1 scene on.

    Ok, I did exactly that, and it crashes immediately. Please see attached screenshot of Xcode for more details.

    Screen Shot 2019-10-03 at 9.17.05 PM.png
     
  19. enslaved2die

    enslaved2die

    Joined:
    Aug 13, 2017
    Posts:
    20
    on macOS Mojave 10.14.6 I always get this error:

    Library/PackageCache/com.unity.xr.arsubsystems@3.0.0-preview.3/Runtime/XRSubsytstem.cs(50,40): error CS0115: 'XRSubsystem<TSubsystemDescriptor>.OnDestroy()': no suitable method found to override

    and I dont have a clue how to fix it.
     
    markmit1908 likes this.
  20. clebertavares

    clebertavares

    Joined:
    Jan 2, 2012
    Posts:
    55
    Look what I´ve done here:

    https://forum.unity.com/threads/arfoundation-v3-0.736148/page-2#post-5028170

    just change

    #if UNITY_2019_3_OR_NEWER
    protected sealed override void OnDestroy()
    #else
    public sealed override void Destroy()
    #endif

    to

    #if UNITY_2019_3_OR_NEWER
    public sealed override void Destroy()
    #else
    public sealed override void Destroy()
    #endif
     
    enslaved2die and Blarp like this.
  21. Blarp

    Blarp

    Joined:
    May 13, 2014
    Posts:
    205
    Revert ARF and ARKit to preview 1. You are set to preview 3 at the moment.

    Remove subsystem package.

    This worked for me
     
  22. todds_unity

    todds_unity

    Unity Technologies

    Joined:
    Aug 1, 2018
    Posts:
    127

    If you are using Unity 2019.3.*, AR Foundation version 3.0.0-preview.3 requires 2019.3.0b5 or later.

    There is a breaking change between b4 and b5. Unfortunately, the package system and the #define versions are unable to distinguish between beta versions.

    Upgrade to 2019.3.0b5, and this issue will go away.

    Todd
     
    Blarp likes this.
  23. todds_unity

    todds_unity

    Unity Technologies

    Joined:
    Aug 1, 2018
    Posts:
    127
    This is not an ARFoundation / ARKit issue.

    In speaking with the render team, this sounds like your installation of Unity is corrupt. The shaders that are mentioned in the log output are standard Unity shaders that have nothing to do with ARFoundation.

    I would suggest the following steps:

    - Uninstall Unity entirely.
    - Reinstall Unity.
    - Delete any existing Unity build artifacts and directories.
    - Delete any existing Xcode build artifacts and directories.
    - Create a new empty scene in Unity, and build it to the device.

    If the problem still persists, I would suggest filing a bug.

    Todd
     
  24. HonorableDaniel

    HonorableDaniel

    Joined:
    Feb 28, 2007
    Posts:
    2,951
    Do you mean just 2019 or all of my Unity installs?
     
  25. MaxXR

    MaxXR

    Joined:
    Jun 18, 2017
    Posts:
    67
    Hi all

    For some reason SimpleAR demo scene place object on mapped plane after upgrading to LWRP. Any ideas how to resolve?

    Using 2019.2.5f1, ran SimpleAR from Samples pack (https://github.com/Unity-Technologies/arfoundation-samples) built and worked, could see Cube. Then upgraded to LWRP following steps above. Get plane tracking (though shader stops working) and tap to place doesn't reveal any object. What am i missing? Or is this a bug?

    Am tapping on the generated planes but no instantiation (even though exact same code as before upgraded to LWRP:


    Goal is am trying to get ARfoundation 3 + LWRP + occlusion shader working so i can get stuff falling through floor (https://forum.unity.com/threads/ar-foundation-occlusion-object-or-shader.594394/)

    Thanks!
     
    Last edited: Oct 8, 2019
  26. enslaved2die

    enslaved2die

    Joined:
    Aug 13, 2017
    Posts:
    20
    Look if you have the Tracked Pose Driver on the AR Camera, if not, install the XR Legacy Input Helpers Package and add this component to the camera.
     
  27. MaxXR

    MaxXR

    Joined:
    Jun 18, 2017
    Posts:
    67
    Thanks
    It's already on there and 'XR Legacy Input Helpers' is already in the project also..
    upload_2019-10-11_21-40-57.png
    Super weird that it doesn't just work :/
    Any other ideas?
     
  28. enslaved2die

    enslaved2die

    Joined:
    Aug 13, 2017
    Posts:
    20
    https://github.com/DanMillerDev/ARFoundation_PostProcessing
    Try this project from the XR Evangelist Dan Miller and just use it at a base and upgrade it to LWRP or URP. You even can update to preview 3 when you are on 2019.3. It worked for me, so yeah try it. You even get like a real nice example on how to use PostFX with AR Foundation on top.
     
    Tarrag likes this.
  29. orcinus

    orcinus

    Joined:
    May 7, 2013
    Posts:
    14
    Anyone managed to get shadows on the plane working?
     
  30. enslaved2die

    enslaved2die

    Joined:
    Aug 13, 2017
    Posts:
    20
    Have a look at this post.
    https://forum.unity.com/threads/lwrp-shadows.652024/
    or when you are really impatient
    https://gist.githubusercontent.com/...5bf3a1c31bd5e8e0160fa13b26a9a1/arproxy.shader

    I modified this shader to work with URP
    Code (CSharp):
    1. Shader "Augmented Reality/Proxy"
    2. {
    3.     Properties
    4.     {
    5.     }
    6.  
    7.     SubShader
    8.     {
    9.         Tags
    10.         {
    11.             "RenderType" = "Transparent"
    12.             "RenderPipeline" = "UniversalPipeline"
    13.             "IgnoreProjector" = "True"
    14.         }
    15.         LOD 300
    16.  
    17.         Pass
    18.         {
    19.             Name "AR Proxy"
    20.             Tags
    21.             {
    22.                 "LightMode" = "UniversalForward"
    23.             }
    24.  
    25.             Blend SrcAlpha OneMinusSrcAlpha
    26.             ZWrite On
    27.             Cull Off
    28.  
    29.             HLSLPROGRAM
    30.             #pragma prefer_hlslcc gles
    31.             #pragma exclude_renderers d3d11_9x
    32.             #pragma target 2.0
    33.  
    34.             // -------------------------------------
    35.             // Material Keywords
    36.             #pragma shader_feature _ALPHATEST_ON
    37.             #pragma shader_feature _ALPHAPREMULTIPLY_ON
    38.  
    39.             // -------------------------------------
    40.             // Lightweight Pipeline keywords
    41.             #pragma multi_compile _ _MAIN_LIGHT_SHADOWS
    42.             #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE
    43.             #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
    44.             #pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS
    45.             #pragma multi_compile _ _SHADOWS_SOFT
    46.  
    47.             // -------------------------------------
    48.             // Unity defined keywords
    49.             #pragma multi_compile _ DIRLIGHTMAP_COMBINED
    50.             #pragma multi_compile _ LIGHTMAP_ON
    51.  
    52.             //--------------------------------------
    53.             // GPU Instancing
    54.             #pragma multi_compile_instancing
    55.  
    56.             #pragma vertex HiddenVertex
    57.             #pragma fragment HiddenFragment
    58.  
    59.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
    60.             #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
    61.  
    62.             struct Attributes
    63.             {
    64.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    65.                 float4 positionOS   : POSITION;
    66.             };
    67.  
    68.             struct Varyings
    69.             {
    70.                 float4 positionCS   : SV_POSITION;
    71.                 float4 shadowCoord  : TEXCOORD0;
    72.             };
    73.  
    74.             Varyings HiddenVertex(Attributes input)
    75.             {
    76.                 Varyings output = (Varyings)0;
    77.  
    78.                 UNITY_SETUP_INSTANCE_ID(input);
    79.                 UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
    80.  
    81.                 VertexPositionInputs vertexInput = GetVertexPositionInputs(input.positionOS.xyz);
    82.  
    83.                 output.shadowCoord = GetShadowCoord(vertexInput);
    84.                 output.positionCS = vertexInput.positionCS;
    85.  
    86.                 return output;
    87.             }
    88.  
    89.             half4 HiddenFragment(Varyings input) : SV_Target
    90.             {
    91.                 UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
    92.  
    93.                 half s = MainLightRealtimeShadow(input.shadowCoord);
    94.  
    95.                 return half4(0, 0, 0, 1 - s);
    96.             }
    97.             ENDHLSL
    98.         }
    99.  
    100.         UsePass "Universal Render Pipeline/Lit/DepthOnly"
    101.     }
    102.  
    103.     FallBack "Hidden/InternalErrorShader"
    104. }
    105.  
     
    fotalik and Amin- like this.
  31. R42_Leon

    R42_Leon

    Joined:
    Feb 24, 2016
    Posts:
    17
    Thanks for this, works straight out of the box with:

    Unity 2019.2.10f1
    ARFoundation 3.0.0 - preview.4
    LWRP 6.9.0

    I gotta note that the latest LWRP version available in the package manager was 6.9.2, but was getting a black camera background with that one (Not strictly a ARFoundation issue, Vuforia was giving me the same behaviour) so I had to revert.
     
  32. hugoH2LPK

    hugoH2LPK

    Joined:
    Jul 26, 2018
    Posts:
    5
    I just updated to LWRP on a new project but for reason ImageTracking doesn't seem to be working anymore. Anyone has a suggestion??
     
  33. enslaved2die

    enslaved2die

    Joined:
    Aug 13, 2017
    Posts:
    20
    ARFoundation 3.0.0 - preview.3 and up only works with 2019.3 see this:

     
  34. R42_Leon

    R42_Leon

    Joined:
    Feb 24, 2016
    Posts:
    17
    Don't know what to tell you, I'm using 2019.2 and works just fine. I'm only using older AR features such as plane and image tracking so far, maybe that's why.
     
  35. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    306
    I'm lost!

    Unity 2019.3.0b9
    AR Foundation preview 4 - 3.0.0.0
    ARCore XR Plugin preview 4 - 3.0.0.0
    ARKIT XR Plugin preview 4 - 3.0.0.0
    URP 7.1.2

    From the 1st post in this thread, 1 to 3 works great, but then I get to step number 4:
    I create the pipeline asset and call it "ARFoundationPipelineAsset"
    Then it automatically also creates "ARFoundationPipelineAsset_Renderer" , errrrrrr ok?!?

    I go to step 5, select my "ARFoundationPipelineAsset", but then how do I add the Forward Renderer?
    There is already a "ARFoundationPipelineAsset_Renderer (ForwardRendererData)" added in here by itself.....

    So now while in the steps it only said to create 2 things in the render folder (which I did) I have that extra renderer.

    I'm confused if I need it, delete it, use it or what I'm suppose to do with it?

    In my render folder I now have:
    ARFoundationForwardRenderer
    ARFoundationPipelineAsset
    ARFoundationPipelineAsset_Renderer (this is the one that was automatically created)
     
  36. enslaved2die

    enslaved2die

    Joined:
    Aug 13, 2017
    Posts:
    20
    Create the RenderPipelineAsset, create a ForwardRendererAsset to it or use the automatically generated one and add it to the PipelineAsset, selected your ForwardRenderer in the PipelineAsset and add the ARBackground to the ForwardRenderer. You can decide to ignore the automatically generated one or use it. URP needs a ForwardRendererAsset anyways, so Unity decided to just produce it automatically when you're creating a PipelineAsset :)
     
    newguy123 likes this.
  37. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    306
    Thanks, I'll give that a try
    Of course, it would be so much easier if anything automtic happens anyway, that all this can just be setup by itself when you add AR Foundation as a package
    It can detect if you're using URP, LWRP or just plain old SR and automatically do the settings for you
     
  38. enslaved2die

    enslaved2die

    Joined:
    Aug 13, 2017
    Posts:
    20
    This would be dumb, not every AR App is just an AR App. Imagine you have a Non AR mode and an AR mode and even in the Non AR mode the AR Background path needs to be stored. This is a waste of compute.
    In this case it is a better approach to change out the Renderer on Demand with
    "GraphicsSettings.renderPipelineAsset = YourPipelineAsset;"

    Sometimes there is a reason why not everything is set up automatically ;)
     
  39. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    306
    at least a prompt then asking you to set it or not.....
    every few seconds help in the bigger scheme of things
     
  40. todds_unity

    todds_unity

    Unity Technologies

    Joined:
    Aug 1, 2018
    Posts:
    127
    With the Universal Render Pipeline (URP) still a work in progress, the path to set up the pipeline for URP has changed since my initial set of instructions.

    To configure AR Foundation to work with the later versions of URP, please refer to this updated documentation: Configuring AR Camera Background with a Scriptable Render Pipeline.


    Additionally, if you are working in an existing project, do note that the materials & shaders that are used with the built-in render pipeline may not be compatible with LWRP and URP. Incorrect shaders are the cause of the issue that @MaxXR was seeing in this post on this thread.

    Please refer to the URP documentation for Upgrading your Shaders.


    Todd
     
    ManjitSBedi and newguy123 like this.
  41. Geenz

    Geenz

    Joined:
    Sep 1, 2010
    Posts:
    99
    So, attempting to utilize ARFoundation 3.0.0 preview 6 + Unity 2019.3.0b12 + URP 7.1.5 + ARKit 3.0.0 preview 4 seems to result in the camera background not appearing. It's just black. This is on a fresh project. Note that I did follow the instructions for configuring the AR camera background with SRP as noted in the documentation.

    Interestingly enough, setting a custom material with the appropriate shader does show that it's working, however the background is still solid black.
     
  42. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    306
    Thanks for the link.
    Quick question though @todds_unity
    The link says to switch the GRAPHICS settings to the newly created ARFoundationPipelineAsset

    ....do we also change the QUALITY settings to same ARFoundationPipelineAsset, or do we leave the Quality one on the existing UniversalRP - High Quality that is already assigned to it?
     
  43. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    306
    on a new project on the cam, instead of the old Track Pose Driver, there is now something just called AR Pose Driver. I'm assuming this replaces the old one

    ...also, with 2019.3.0b12 and URP 7.1.5, I'm getting a black camera feed when building to android. Appreciate any tips to fix this!!!
     
    Last edited: Nov 29, 2019
  44. patcarver

    patcarver

    Joined:
    Jul 13, 2016
    Posts:
    7
    I'm getting the black background too (LWRP). I can get it to work using custom material but I think using it that way makes the human occlusion feature not work at all.
     
  45. Saaskun

    Saaskun

    Joined:
    Nov 29, 2019
    Posts:
    7
    Hi, the ARBackgroundRendererFeature doesn't displays for me :(

    Using 2019.3.0, URP 7.1.6, AR Foundation 2.1.4
     
  46. lkdin

    lkdin

    Joined:
    Jun 29, 2018
    Posts:
    10
    You probably didn't install the ARFoundation and ARKitXR/ARCoreXR plugin from the Package Manager. If you do so it should show up.

    Cheers, Dinesh
     
  47. Saaskun

    Saaskun

    Joined:
    Nov 29, 2019
    Posts:
    7
    I installed all the necessary stuff :(



    UPDATE: I installed the AR Foundation from Github and now it appears
     
    Last edited: Dec 2, 2019
  48. xAvatarchikx

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    60
    Hi! How can I use PostProcessData with SRP? In the editor, a glow works for me, but on ios there is no glow ...
     
  49. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    306
    Yes I would like to know also. ARFoundation apparently uses its own post processing and you shouldnt use the postprocessstack2 with it....

    But I havent been able to find its own post processing....
     
  50. xAvatarchikx

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    60
unityunity