How to get consistent normals from ARMeshManager meshes ?
Hello @tdmowrer,
I am trying to use the normals from ARMeshManager meshes and I noticed some strange results. I made a simple material, attached to the mesh template prefab given to ARMeshManager, displaying the normals in world space and, another time, in local space but between two LiDAR scans in the same room it is not displayed the same. Sometimes, colors are consistent with the normal coordinates, but sometimes it's not : red meshes (representing x axis) may be facing blue meshes (representing z axis).
This material is only for debugging our project for which we need the correct normal of each mesh from ARMeshManager.
I made some research and I saw on different forums people using texture coordinates and normals through ARKit features directly and they seem to manage them correctly. I know that texture coordinates are not generated with ARMeshManager meshes and it is the reason why I try to use normals and Triplanar method instead.
Is there a way to get the right normals from ARKit using ARFoundation features ? Is there a specific setup before starting the LiDAR scan to make sure we generate the meshes correctly ? Is it possible that something is happening during the conversion from ARKit to ARFoundation ?
Unity 2019.4.23f1 XCode 12.5(12E262) iOS 14.5.1 ARFoundation 4.1.5 ARKit XR Plugin 4.1.5
There are no known issues with normals on ARKit. Is this reproducible with the NormalMeshes sample in this repo?
Thank you for your quick answer. I tried to reproduce the issue with the samples but all worked as it is suppose to. I will dig something else I guess. Again, thank you for your help.
Thank you for your quick answer. I tried to reproduce the issue with the samples but all worked as it is suppose to. I will dig something else I guess. Again, thank you for your help.
Good day, I'd like to know is there a way for the user to save and load generated mesh data as a 3D object with the correct textures and not the default material used? I'm new to unity and my scripting game isn't that good. I am aware the ARMeshManager contains those value but when I try and access the ARMeshManager script I'm not able to save the data as a 3D model.
I'd truly appreciate the help.