问题描述
如何提取和使用iPad Pro上新的SceneReconstruction API生成的ARMeshGeometry?我正在使用Apple的Visualising Scene Semantics示例应用/代码
我正在尝试将AudioKit AKOscillator()附加到“面部”的中心,作为3D声源,以实时创建它。
我从LiDAR示例代码中看到,这个“似乎”是创建“面部”的点,但是我在合并提取/查看“面部”数据和添加AudioKit声源时遇到了麻烦
在这里,我相信面部表情已经确定(我是新手,这可能是非常错误的):
DispatchQueue.global().async {
for anchor in meshAnchors {
for index in 0..<anchor.geometry.faces.count {
// Get the center of the face so that we can compare it to the given location.
let geometricCenterOfFace = anchor.geometry.centerOf(faceWithIndex: index)
// Convert the face's center to world coordinates.
var centerLocalTransform = matrix_identity_float4x4
centerLocalTransform.columns.3 = SIMD4<Float>(geometricCenterOfFace.0,geometricCenterOfFace.1,geometricCenterOfFace.2,1)
let centerWorldPosition = (anchor.transform * centerLocalTransform).position
如果可以实现,我真的会从看到RAW数组数据中受益?这是来自ARGeometrySource吗?可以打印或查看/提取吗?
然后我想在3D世界位置的“脸”上添加诸如振荡器/噪声发生器之类的东西,并使用类似以下内容的阵列/位置数据对其进行空间化:
var oscillator = AKOscillator() Create the sound generator
AudioKit.output = oscillator Tell AudioKit what to output
AudioKit.start() Start up AudioKit
oscillator.start() Start the oscillator
oscillator.frequency = random(in: 220...880) Set oscillator parameters
我理解这几乎是两个问题,但是欢迎使用ARMeshGemotery数据提取/使用方法,或者在每个“面部”中心或这两个方面的中心实现声源。 上面的链接中的LiDAR可视化场景语义示例的更多代码。
非常感谢您的协助,
R
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)