多个半透明面片渲染,最好自行调整下 透明面片 的渲染顺序。 一般会和 不透明物体 的渲染顺序相反。相对相机,从 远到近 进行渲染。 可以通过 renderQueue 来控制。 (同时记得 不要叠在一起,避免z fight)
xr-frame里的使用以透明PNG为材质的平面 多张进入场景后 部分平面不显示或者是显示异常?平面以glb格式导入 部分面片模型不显示 或者是在动画过程中显示异常 在某些特定角度可以看到。。 这是什么问题?
04-18xr-frame 目前不支持 pc 小程序
用xr-frame 加载 gltf 模型,上架后,安卓和ios端正常显示,windows端加载不出?开发中,模拟器可以正常显示模型。上架后,只有手机端系统可以正常加载显示模型,windows端一直加载不出来是什么原因?
04-17已修复,感谢指正~
身份证识别文档字段写错了https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/visionkit/idcard.html [图片]
04-15可以用 never-cull 先解决,这里目测是包围盒太小,剔除是基于原始包围盒运算(不受动画影响),比较容易被视锥体剔除
xr-frame视锥体问题,模型Mesh闪烁忽隐忽现在xr-frame中,同样的glb模型,转动一下视角,部分Mesh就不可见了,非常影响体验。 尤其是带动画的模型,动画效果作用于Mesh之上,会使Mesh产生位移,而xr-frame的视锥体检测的是原始位置,导致会有情况看不到这些mesh。 (以上均是个人对xr-frame实现的猜测,实际情况还是需要微信大佬确认) 将模型动画停止后,转到视角会比较清晰的浮现。 [图片] [图片] 这个问题应该存在很久了,也有其他小伙伴报过,确实影响体验。 如果是视锥体问题,能否提供开关关闭此检测。 最后,我理解这种算法是为了提高性能,但是现在很多模型都会有这个问题,而在别的渲染器里都没有啥问题。
04-15可以参考一下官方案例。你这里看起来是没引用注册成功这些组件
xr-frame的ios调试显示无法识别组件开发者工具上可以查看 ios无法识别组件 [图片]
04-15实时 OCR 耗时较高,不同机器里面效果差异大,不推荐使用,所以从案例集里面去掉了。 如果有类似需求,可以考虑用 照片OCR 模式模拟。 至于文档与案例不符,是案例的问题。 OCR模式 和 Plane 模式无关,这里不需要 plane 相关的配置(虽然配置了不影响效果)。 可以参考 官方案例 - 照片OCR 照片OCR 的 在session.start后,具体执行逻辑为 this.session.runOCR
ocr-detect 是不支持了么?https://developers.weixin.qq.com/miniprogram/dev/api/ai/visionkit/VKOCRAnchor.html 我看demo中的实时ocr注视掉了 [图片] 而且demo和文档好像也对不上 [图片] [图片] 我本地调用session.start 成功了,没有任何输出
04-01小程序示例里面的 实时人脸示例 和 实时人脸3d示例 能正常运行吗
为什么wx.createVKSession faceMode模式为1时不生效?const session = wx.createVKSession({ track: { face: { mode: 1 } } }) session.on('updateAnchors', anchors => { session.update3DMode({ open3d: true }) anchors.forEach(anchor => { console.log('anchor.points', anchor.points) console.log('anchor.origin', anchor.origin) console.log('anchor.size', anchor.size) console.log('anchor.angle', anchor.angle) }) }) // 当人脸从相机中离开时,会触发 removeAnchors 事件 session.on('removeAnchors', () => { console.log('removeAnchors') }) session.start(errno => { if (errno) return }) 摄像头实时模式,只有start会触发,返回的errno为null
03-25看官方示例集吧。 看报错,这里应该是自行构建的项目有问题,需要你自己排查
xrframe的指南Component is not found in path ?[图片] 切换了很多基础库的版本仍然报错;项目结构和https://developers.weixin.qq.com/miniprogram/dev/framework/xr-frame/中的一样
03-18客户端的问题,修复中
微信更细到8.0.47后,xrframe的AR交互异常,以前能交互的全部都错位了点击不到,是bug?ios微信更新到8.0.47后,xrframe的AR交互异常,以前能交互的全部都错位了点击不到,是bug? [图片][图片][图片] 后面两张图的内容都无法点击,点到其他空白地方可能会触发到点击事件。
03-18glb那个可以私发我看下,我没太清楚具体问题。 registerGeometry的话,我估计是用法上的差异(应该可以,不过要注意顶点格式与顺序、饶序)。 可以参考下 模版 - 自定义Geometry
xr-frame创建自定义集合图形是不是哪里有问题?[图片] 截图中的墙,通过GLB格式导出后,导入到小程序xr-frame中,会显示一个黑不溜秋的东西,很难调节。 截图中的管子,通过点位数据导出,通过registerGeometry插入,会变成一个另类的东西。 [图片]【后面的那个白色就是那个管子】 附上插入代码【在xr-basic例子中插入】: const xr = wx.getXrFrameSystem(); const xrScene = this.scene = detail.value; let scene = xrScene; console.log('xr-scene', xrScene); let defaultVertexLayoutInfo = { attributes: [ { name: "a_position", format: xr.EVertexFormat.FLOAT3, offset: 0, usage: xr.EVertexLayoutUsage.POSITION }, { name: "a_normal", format: xr.EVertexFormat.FLOAT3, offset: 12, usage: xr.EVertexLayoutUsage.NORMAL, }, { name: "a_texCoord", format: xr.EVertexFormat.FLOAT2, offset: 24, usage: xr.EVertexLayoutUsage.UV0 }, { name: "a_color", format: xr.EVertexFormat.FLOAT4, offset: 32, usage: xr.EVertexLayoutUsage.COLOR } ], stride: 48 }; let vertexs = []; let indices = []; vertexs.push(...[-0.0015113172000000002, 0.0143994946, -0.047332552, 0.030442, -0.468643, -0.882863, 0.75, 1, 1, 1, 1, 1, 0.004940709600000001, -0.0470739829, -0.014478588400000002, 0.198291, -0.914063, -0.353793, 1, 0.968106, 1, 1, 1, 1, 0.0015113172000000002, -0.0143994946, 0.047332552, 0.187446, -0.864073, 0.467164, 0.5, 1, 1, 1, 1, 1, -0.004940709600000001, 0.0470739829, 0.014478588400000002, 0.140296, -0.987724, 0.06869, 0.75, 0.968106, 1, 1, 1, 1, 0.3285223183, 0.0358379627, -0.047332552, -0.066037, 0.46492, 0.882886, 0.25, 1, 1, 1, 1, 1, 0.39032958770000004, 0.036529722900000006, -0.014478588400000002, 0.038404, 0.994907, -0.093196, 0.5, 0.968106, 1, 1, 1, 1, 0.3574776817, 0.0361620373, 0.047332552, 0.034136, 0.884344, -0.465586, 0, 1, 1, 1, 1, 1, 0.2956704123, 0.0354702771, 0.014478588400000002, -0.064795, 0.997491, -0.028504, 0.25, 0.968106, 1, 1, 1, 1, -0.055189746100000006, 4.0988116985000005, -0.047332552, 0.468519, 0.044248, -0.882344, 0.75, 0.968106, 1, 1, 1, 1, -0.0159574213, 4.146576139, -0.014478588400000002, 0.597653, 0.059079, -0.799575, 1, 0.589638, 1, 1, 1, 1, -0.0368102539, 4.1211883015, 0.047332552, 0.879471, 0.086938, 0.467946, 0.5, 0.968106, 1, 1, 1, 1, -0.0760425787, 4.073423861, 0.014478588400000002, 0.931917, 0.089949, 0.35134, 0.75, 0.589638, 1, 1, 1, 1, -4.6125701023, 4.096215750700001, -0.047332552, -0.46849, -0.045219, 0.882311, 0.25, 0.968106, 1, 1, 1, 1, -4.6314819616000005, 4.1550626593, -0.014478588400000002, -0.600626, -0.05529, 0.797616, 0.5, 0.589638, 1, 1, 1, 1, -4.6214298977, 4.1237842493, 0.047332552, -0.879927, -0.081002, -0.468153, 0, 0.968106, 1, 1, 1, 1, -4.6025180384, 4.0649373407, 0.014478588400000002, -0.932338, -0.088051, -0.350703, 0.25, 0.589638, 1, 1, 1, 1, -4.602885902000001, 2.6442282756, -0.047332552, -0.000323, 0.566895, -0.82379, 0.75, 0.589638, 1, 1, 1, 1, -4.6631409809, 2.6304463107, -0.014478588400000002, 0.000897, 0.487689, -0.873017, 1, 0.166922, 1, 1, 1, 1, -4.6311140979, 2.6377717244000003, 0.047332552, 0.0017, 0.924811, 0.380423, 0.5, 0.589638, 1, 1, 1, 1, -4.5708590191, 2.6515536893, 0.014478588400000002, 0.000505, 0.892297, 0.451449, 0.75, 0.166922, 1, 1, 1, 1, -4.281000000000001, 2.6554785884000003, -0.047332552, -0.000321, -0.566, 0.824037, 0.25, 0.589638, 1, 1, 1, 1, -4.281000000000001, 2.593667448, -0.014478588400000002, 0.000914, -0.487246, 0.873264, 0.5, 0.166922, 1, 1, 1, 1, -4.281000000000001, 2.6265214116, 0.047332552, 0.001735, -0.925218, -0.379432, 0, 0.589638, 1, 1, 1, 1, -4.281000000000001, 2.688332552, 0.014478588400000002, 0.000508, -0.892231, -0.45158, 0.25, 0.166922, 1, 1, 1, 1, 0.0005447911999999999, -0.0051906495, -0.0497268575, -0.871118, -0.00581, -0.491039, 0.75, 0.166922, 1, 1, 1, 1, 0.004055558, -0.0386404558, -0.0314716956, -0.480447, 0.009977, -0.876967, 1, 0.031072, 1, 1, 1, 1, 0.0051906342000000005, -0.0494552092, 0.005219157, -0.985135, 0.020457, 0.17056, 0.5, 0.166922, 1, 1, 1, 1, 0.0032851075000000004, -0.0312997745, 0.038852698600000006, -0.888157, 0.005788, 0.459504, 0.75, 0.031072, 1, 1, 1, 1, -0.0005447904000000001, 0.0051906419, 0.0497268583, 0.86227, -0.005619, 0.506417, 0.25, 0.166922, 1, 1, 1, 1, -0.0040555575, 0.038640451000000006, 0.0314717016, 0.476801, 0.01068, 0.878946, 0.5, 0.031072, 1, 1, 1, 1, -0.0051906343, 0.04945521, -0.0052191494, 0.988506, 0.022142, -0.149552, 0, 0.166922, 1, 1, 1, 1, -0.0032851081, 0.0312997804, -0.038852693699999996, 0.887589, 0.00592, -0.460598, 0.25, 0.031072, 1, 1, 1, 1, 0.34821883400000003, 0.0360584103, -0.0497268575, 0.032915, -0.941753, -0.33469, 0.75, 0.031072, 1, 1, 1, 1, 0.3818502678, 0.0364348205, -0.0314716956, -0.045125, -0.468864, -0.882117, 1, 0, 1, 1, 1, 1, 0.3927, 0.0365565188, 0.005219157, -0.094484, -0.981707, 0.165301, 0.5, 0.031072, 1, 1, 1, 1, 0.3744697276, 0.0363522159, 0.038852698600000006, -0.028363, -0.882661, 0.469154, 0.75, 0, 1, 1, 1, 1, 0.3377811737, 0.03594158980000001, 0.0497268583, 0.028975, 0.901698, 0.431395, 0.25, 0.031072, 1, 1, 1, 1, 0.3041497371, 0.0355651795, 0.0314717016, -0.059447, 0.468512, 0.881455, 0.5, 0, 1, 1, 1, 1, 0.29327625549999997, 0.0354434812, -0.0052191494, -0.125704, 0.990689, -0.052277, 0, 0.031072, 1, 1, 1, 1, 0.3115302664, 0.035647784, -0.038852693699999996, -0.030848, 0.882596, -0.469119, 0.25, 0, 1, 1, 1, 1, -0.0426873316, 4.1140330966, -0.0497268575, -0.994537, -0.104383, 0, -0.212237, -0.5, 1, 1, 1, 1, -0.0213396917, 4.140023350400001, -0.0314716956, -0.994537, -0.104383, 0, -0.212237, -0.5, 1, 1, 1, 1, -0.014437724600000002, 4.1484263343, 0.005219157, 1, 0, 0, 0.212237, -0.5, 1, 1, 1, 1, -0.026024508700000004, 4.1343196949, 0.038852698600000006, 1, 0, 0, 0.212237, -0.5, 1, 1, 1, 1, -0.04931266360000001, 4.1059669093, 0.0497268583, 0.056206, -0.473741, -0.878869, 0.875, 1, 1, 1, 1, 1, -0.0706603053, 4.0799766534, 0.0314717016, 0.184598, -0.928938, -0.320931, 1, 0, 1, 1, 1, 1, -0.0775622759, 4.071573665, -0.0052191494, 0.186937, -0.940708, -0.28306, 0.75, 1, 1, 1, 1, 1, -0.0659754951, 4.0856803005, -0.038852693699999996, 0.216273, -0.974434, -0.060861, 0.875, 0.968106, 1, 1, 1, 1, -4.618596864800001, 4.1149688694, -0.0497268575, 0.190712, -0.85927, 0.47464, 0.625, 1, 1, 1, 1, 1, -4.6288874496, 4.1469894703, -0.0314716956, 0.178563, -0.979715, 0.090961, 0.75, 0.968106, 1, 1, 1, 1, -4.6322145282, 4.1573421433, 0.005219157, 0.051085, -0.280288, 0.958556, 0.5, 1, 1, 1, 1, 1, -4.6266291434, 4.1399624333, 0.038852698600000006, 0.087437, -0.961998, 0.25868, 0.625, 0.968106, 1, 1, 1, 1, -4.6154031375, 4.1050311379, 0.0497268583, -0.043183, 0.475108, 0.878867, 0.375, 1, 1, 1, 1, 1, -4.6051125519000005, 4.073010534300001, 0.0314717016, 0.00997, 0.999191, -0.03897, 0.5, 0.968106, 1, 1, 1, 1, -4.6017854715, 4.0626578559, -0.0052191494, 0.009571, 0.959237, 0.282442, 0.25, 1, 1, 1, 1, 1, -4.6073708548, 4.080037561, -0.038852693699999996, 0.046887, 0.998752, -0.017208, 0.375, 0.968106, 1, 1, 1, 1, -4.6220877713, 2.6398362892000002, -0.0497268575, 0.041322, 0.880204, -0.472794, 0.125, 1, 1, 1, 1, 1, -4.654874605500001, 2.6323370542, -0.0314716956, -0.01381, 0.999904, -0.001421, 0.25, 0.968106, 1, 1, 1, 1, -4.665475011500001, 2.6299124548, 0.005219157, -0.003939, 0.285207, -0.958458, 0, 1, 1, 1, 1, 1, -4.6476794158, 2.6339827885, 0.038852698600000006, -0.110852, 0.934333, -0.338724, 0.125, 0.968106, 1, 1, 1, 1, -4.6119122361, 2.6421637091, 0.0497268583, 0.476162, 0.045644, -0.878172, 0.875, 0.968106, 1, 1, 1, 1, -4.5791253992, 2.6496629448, 0.0314717016, 0.605906, 0.059532, -0.793306, 1, 0.589638, 1, 1, 1, 1, -4.5685249877, 2.6520875454, -0.0052191494, 0.954473, 0.09378, -0.283173, 0.75, 0.968106, 1, 1, 1, 1, -4.5863205783, 2.6480172129, -0.038852693699999996, 0.973937, 0.09644, -0.205295, 0.875, 0.589638, 1, 1, 1, 1, -4.281000000000001, 2.6357808392, -0.0497268575, 0.875371, 0.08668, 0.4756, 0.625, 0.968106, 1, 1, 1, 1, -4.281000000000001, 2.602147299, -0.0314716956, 0.929216, 0.090812, 0.358204, 0.75, 0.589638, 1, 1, 1, 1, -4.281000000000001, 2.5912731421000004, 0.005219157, 0.283777, 0.027734, 0.958489, 0.5, 0.968106, 1, 1, 1, 1, -4.281000000000001, 2.6095283014, 0.038852698600000006, 0.385782, 0.036691, 0.92186, 0.625, 0.589638, 1, 1, 1, 1, -4.281000000000001, 2.6462191532, 0.0497268583, -0.476172, -0.045288, 0.878185, 0.375, 0.968106, 1, 1, 1, 1, -4.281000000000001, 2.6798526961, 0.0314717016, -0.608346, -0.056378, 0.791667, 0.5, 0.589638, 1, 1, 1, 1, -4.281000000000001, 2.6907268587, -0.0052191494, -0.954941, -0.088498, 0.283294, 0.25, 0.968106, 1, 1, 1, 1, -4.281000000000001, 2.6724717046000004, -0.038852693699999996, -0.974885, -0.089572, 0.203901, 0.375, 0.589638, 1, 1, 1, 1]) indices.push(...[1, 4, 0, 4, 1, 5, 2, 5, 1, 5, 2, 6, 3, 6, 2, 6, 3, 7, 0, 7, 3, 7, 0, 4, 5, 8, 4, 8, 5, 9, 6, 9, 5, 9, 6, 10, 7, 10, 6, 10, 7, 11, 4, 11, 7, 11, 4, 8, 9, 12, 8, 12, 9, 13, 10, 13, 9, 13, 10, 14, 11, 14, 10, 14, 11, 15, 8, 15, 11, 15, 8, 12, 13, 16, 12, 16, 13, 17, 14, 17, 13, 17, 14, 18, 15, 18, 14, 18, 15, 19, 12, 19, 15, 19, 12, 16, 17, 20, 16, 20, 17, 21, 18, 21, 17, 21, 18, 22, 19, 22, 18, 22, 19, 23, 16, 23, 19, 23, 16, 20, 1, 0, 3, 1, 3, 2, 21, 23, 20, 21, 22, 23, 25, 32, 24, 32, 25, 33, 26, 33, 25, 33, 26, 34, 27, 34, 26, 34, 27, 35, 28, 35, 27, 35, 28, 36, 29, 36, 28, 36, 29, 37, 30, 37, 29, 37, 30, 38, 31, 38, 30, 38, 31, 39, 24, 39, 31, 39, 24, 32, 33, 40, 32, 40, 33, 41, 34, 41, 33, 41, 34, 42, 35, 42, 34, 42, 35, 43, 36, 43, 35, 43, 36, 44, 37, 44, 36, 44, 37, 4, 38, 45, 37, 45, 38, 46, 39, 46, 38, 46, 39, 47, 32, 47, 39, 47, 32, 40, 41, 48, 40, 48, 41, 49, 42, 49, 41, 49, 42, 50, 43, 50, 42, 50, 43, 51, 44, 51, 43, 51, 44, 52, 45, 52, 44, 52, 45, 53, 46, 53, 45, 53, 46, 54, 47, 54, 46, 54, 47, 55, 40, 55, 47, 55, 40, 48, 49, 56, 48, 56, 49, 57, 50, 57, 49, 57, 50, 58, 51, 58, 50, 58, 51, 59, 52, 59, 51, 59, 52, 60, 53, 60, 52, 60, 53, 61, 54, 61, 53, 61, 54, 62, 55, 62, 54, 62, 55, 63, 48, 63, 55, 63, 48, 56, 57, 64, 56, 64, 57, 65, 58, 65, 57, 65, 58, 66, 59, 66, 58, 66, 59, 67, 60, 67, 59, 67, 60, 68, 61, 68, 60, 68, 61, 69, 62, 69, 61, 69, 62, 70, 63, 70, 62, 70, 63, 71, 56, 71, 63, 71, 56, 64, 25, 24, 31, 25, 31, 30, 25, 30, 29, 25, 29, 28, 25, 28, 27, 25, 27, 26, 65, 71, 64, 65, 70, 71, 65, 69, 70, 65, 68, 69, 65, 67, 68, 65, 66, 67, 1, 4, 0, 4, 1, 5, 2, 5, 1, 5, 2, 6, 3, 6, 2, 6, 3, 7, 0, 7, 3, 7, 0, 4, 5, 8, 4, 8, 5, 9, 6, 9, 5, 9, 6, 10, 7, 10, 6, 10, 7, 11, 4, 11, 7, 11, 4, 8, 9, 12, 8, 12, 9, 13, 10, 13, 9, 13, 10, 14, 11, 14, 10, 14, 11, 15, 8, 15, 11, 15, 8, 12, 13, 16, 12, 16, 13, 17, 14, 17, 13, 17, 14, 18, 15, 18, 14, 18, 15, 19, 12, 19, 15, 19, 12, 16, 17, 20, 16, 20, 17, 21, 18, 21, 17, 21, 18, 22, 19, 22, 18, 22, 19, 23, 16, 23, 19, 23, 16, 20, 1, 0, 3, 1, 3, 2, 21, 23, 20, 21, 22, 23, 25, 32, 24, 32, 25, 33, 26, 33, 25, 33, 26, 34, 27, 34, 26, 34, 27, 35, 28, 35, 27, 35, 28, 36, 29, 36, 28, 36, 29, 37, 30, 37, 29, 37, 30, 38, 31, 38, 30, 38, 31, 39, 24, 39, 31, 39, 24, 32, 33, 40, 32, 40, 33, 41, 34, 41, 33, 41, 34, 42, 35, 42, 34, 42, 35, 43, 36, 43, 35, 43, 36, 44, 37, 44, 36, 44, 37, 45, 38, 45, 37, 45, 38, 46, 39, 46, 38, 4, 39, 47, 32, 47, 39, 47, 32, 40, 41, 48, 40, 48, 41, 49, 42, 49, 41, 49, 42, 50, 43, 50, 42, 50, 43, 51, 44, 51, 43, 51, 44, 52, 45, 52, 44, 52, 45, 53, 46, 53, 45, 53, 46, 54, 47, 54, 46, 54, 47, 55, 40, 55, 47, 55, 40, 48, 49, 56, 48, 56, 49, 57, 50, 57, 49, 57, 50, 58, 51, 58, 50, 58, 51, 59, 52, 59, 51, 59, 52, 60, 53, 60, 52, 60, 53, 61, 54, 61, 53, 61, 54, 62, 55, 62, 54, 62, 55, 63, 48, 63, 55, 63, 48, 56, 57, 64, 56, 64, 57, 65, 58, 65, 57, 65, 58, 66, 59, 66, 58, 66, 59, 67, 60, 67, 59, 67, 60, 68, 61, 68, 60, 68, 61, 69, 62, 69, 61, 69, 62, 70, 63, 70, 62, 70, 63, 71, 56, 71, 63, 71, 56, 64, 25, 24, 31, 25, 31, 30, 25, 30, 29, 25, 29, 28, 25, 28, 27, 25, 27, 26, 65, 71, 64, 65, 70, 71, 65, 69, 70, 65, 68, 69, 65, 67, 68, 65, 66, 67]); const vl = scene.createVertexLayout(defaultVertexLayoutInfo); const vb = new Float32Array(vertexs); const ib = new Uint16Array(indices); const geometry = scene.createGeometry(vl, vb, ib); geometry.addSubMesh(ib.length, 0, 0); xr.registerGeometry("man", scene => { return geometry; }); let ele = scene.createElement(xr.XRMesh, { geometry: "man", material: "standard-mat", scale: "10 10 10", position: "0 0 0" }); let geometryRoot = scene.getElementById("node"); geometryRoot.addChild(ele); 另外希望能够提供:ExtrudeGeometry等基础类,不然不如three方便,但是three小程序兼容性比较差【即使改造后】。
03-15