- Issue category: Semantic Segmentation / URP
- Device type & OS version: Android
- Host machine & OS version: Windows 10
- Issue Environment : Unity Mock / On Device
- ARDK version: v1.3.1 (and an earlier one, installed Nov 21)
- Unity version: 2020.3.9 & 2021.3.1
Bug reproduction steps:
Using a Unity 3D project template -
- Install ARDK, as per ARDK documentation
- Install URP to that project, as per Unity documentation: Installing the Universal Render Pipeline into an existing Project | Universal RP | 14.0.2
- Apply ARDK/URP set up process, as per ARDK documentation
- Follow steps 1 to 11 in Lightship Semantic Textures tutorial: Niantic AR Development Kit (ARDK): Semantic Segmentation Textures Tutorial
- Test in Mock in editor, and in an Android build
Expected Behaviour:
Semantic information IS read, semantic texture IS applied.
Actual Behaviour:
Semantic information IS read (I’ve tested this with a semantic-specific hit placement test), semantic texture is NOT applied.
The Semantic Texture tutorial works perfectly in both Unity 2020 & 2021 (I know the latter isn’t officially supported), so I’m assuming it’s somehow related to URP?
Curiously, the supplied example ‘ContextAwareness/Segmentation/SemanticSegmentation.unity’ DOES still work in URP - though the white overlay in that seems to be applied via a Raw Image gameobject instead of a shader on a material like the Semantic Texture tutorial.
Am I doing something wrong/is there a way I can fix this, or do I need to wait for a future ARDK update to fix it?
Side note:
I’ve spotted two slight errors in the written version of the tutorial and have accounted for them in my bug testing. For posterity, those are:
//add a callback for catching the updated semantic buffer
_semanticManager.SemanticBufferUpdated += OnSemanticsBufferUpdated;
There should be no ‘s’ at the end of Semantic - it should be
//add a callback for catching the updated semantic buffer
_semanticManager.SemanticBufferUpdated += OnSemanticBufferUpdated;
Step 8 of the written tutorial misses telling you to add Texture2D _semanticTexture;
- this is captured in the code at the bottom of the page.