RealityKit –以编程方式将材料添加到ModelEntity [英] RealityKit – Adding a Material to a ModelEntity programmatically

查看:342
本文介绍了RealityKit –以编程方式将材料添加到ModelEntity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

RealityKit的文档包括以下结构:OcclusionMaterialSimpleMaterialUnlitMaterial用于向ModelEntity添加材料.

The docs for RealityKit include the structs: OcclusionMaterial, SimpleMaterial, and UnlitMaterial for adding materials to a ModelEntity.

或者,您可以在模型中加载带有附加材料的模型.

Alternatively you can load in a model with a material attached to it.

我想以编程方式向ModelEntity添加自定义材料/纹理.如何在不向Reality Composer或其他3D软件的模型中添加材料的情况下即时实现这一目标?

I want to add a custom material/texture to a ModelEntity programmatically. How can I achieve this on the fly without adding the material to a model in Reality Composer or some other 3D software?

推荐答案

更新时间:2020年6月23日.

目前RealityKit 2.0中有4种类型的材料:

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆