RealityKit and ARKit – Specify Material Texture Application on Model

Viewed 319

Noob here. When using the following code, it wraps the image texture around the entire model. Is it possible to apply the image texture to a portion of the model (as opposed to the entire model itself) in RealityKit/ARKit?

CODE:

var material = SimpleMaterial()

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

modelSample?.model?.materials = [material]
1 Answers

If you want to apply a texture to a portion of a AR model, not to an entire model, you have to UV-map this texture to a model in a 3d authoring tool (like 3dsMax, Maya, or Blender). UV-mapping is neither possible in RealityKit 1.0 nor in RealityKit 2.0.

Related