[英]How to properly render external texture in Sceneform 1.16.0?
没有任何代码适用于 Sceneform 1.16.0,因为没有 .sfb、.sfm 或 .sfa 格式。 新材料似乎是 in.matc 格式,人类不可读。 如何在此版本的 Sceneform 中创建或修改材质?
使用sceneform_camera_material.matc可以将相机渲染到 Sceneform 的背景,但无论选择何种相机预览分辨率,它都非常像素化。 GLTF 模型在加载时看起来很棒,问题是特定于外部纹理的。
这是与纹理的线性过滤有关的问题还是与 Google Filament 的材质设置有关?
如果您使用 Sceneform 1.16 并想要创建sceneform.rendering.Material
,
(1) 您需要使用 Filmaent matc 工具创建自己的 matc 文件。 您可以在https://github.com/google/filament/releases下载灯丝工具。
(2) 创建自己的matc文件后,放到android raw目录下,调用
com.google.ar.sceneform.rendering.Material.builder()
.setSource(context, R.raw.YOUR_MATC_FILE)
.build()
.thenAccept { material->
//Do something with created sceneform's Material
}
.exceptionally { throwable: Throwable? ->
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.