AR 配置

配置流程

1 AR Foundation更新到3.0,对应的其他库也要更新

 

2 针对srp要做特殊设置

https://docs.unity3d.com/Packages/[email protected]/manual/ar-camera-background-with-scriptable-render-pipeline.html?_ga=2.57110051.844222773.1586945939-95776593.1586748444

 

3 urp相关的设置

使用urp的话要注意

Project setting/Graphics

Project setting/Quality

这两个都要设置URPAssets,别漏了第二项

(通过项目中新建Rendering文件夹,Create/Rendering/Uxxxxp/Pipeline Asset(forward render) 创建)

 

4 创建ar场景(AR Session Origin和AR Session)

AR 配置_第1张图片

 

5 创建ReferrenceImageLibrary

这个library用来存储组织用户识别的自定义图片,随便找张图,存到这里就能识别

这里注意下

AR 配置_第2张图片

设置合理的值,magica cloth组件在缩放时,本身的Radius只能设置成0.01-0.1

当模型被整体缩放过大或过小时,动态骨骼和其关注的collider之间的碰撞会出问题

 

6 创建ImageInfoPrefab

识别后显示的内容

 

7 测试中使用的追踪图片为

xxx

打包注意

这点应该不重要

OtherSettings中Camera Usage Description 要写Camera required for AR

 

相关链接

官网demo

https://github.com/Unity-Technologies/arfoundation-samples

 

3.0文档

https://docs.unity3d.com/Packages/[email protected]/api/UnityEngine.XR.ARFoundation.ARBackgroundRendererFeature.html

 

3.0配置srp说明

https://docs.unity3d.com/Packages/[email protected]/manual/ar-camera-background-with-scriptable-render-pipeline.html?_ga=2.57110051.844222773.1586945939-95776593.1586748444

 

Bilibli [官方直播] Unity AR解决方案:AR Foundation & SenseAR

https://www.bilibili.com/video/av59656334/

 

ARFoundation之路-图像跟踪

https://blog.csdn.net/yolon3000/article/details/96502120

你可能感兴趣的:(AR 配置)