RealityKit和ARKit-在模型上指定材质纹理应用

3

我是新手。在使用以下代码时,它会将图像纹理包裹在整个模型周围。在RealityKit/ARKit中是否有可能将图像纹理应用于模型的部分(而不是整个模型本身)?

代码:

var material = SimpleMaterial()

material.baseColor = try! .texture(TextureResource.load(named: "image.jpg"))

modelSample?.model?.materials = [material]
1个回答

3

如果您想将纹理应用于AR模型的部分而不是整个模型,则必须在3D制作工具(例如3dsMax、Maya或Blender)中将此纹理UV贴图到模型上。在RealityKit 1.0和RealityKit 2.0中均不支持UV贴图。


1
你能否请看一下这个问题并分享你的想法? https://stackoverflow.com/questions/70684317/how-to-take-a-picture-while-using-arkit - elk_cloner
嗨 @elk_cloner,请阅读这篇帖子 - https://stackoverflow.com/questions/66828300/arkit-on-different-iphones/66828695#66828695 - Andy Jazz

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接