3D model formats in ARKit / ARCore development
Asked Answered
M

4

10

I am a beginner at AR game development for both iOS and Android. I have the following questions:

  1. What kinds of 3D model formats are supported by ARKit for iOS and ARCore for Android respectively? (I tried .dae and .obj are supported by ARkit, not yet test ARCore.)

  2. Our 3D model vendor can only provide us FBX format. How can I convert it to the formats supported by ARKit and ARCore? I tried using 3D model converter, but the converted model has no texture.

Mulligrubs answered 4/10, 2017 at 3:25 Comment(0)
M
24

Updated: August 19, 2023.

SceneKit

Apple SceneKit framework loads 3D models for ARKit and VR apps. SceneKit supports the following 3D formats with corresponding material files:

  • .dae (supports animations)
  • .obj (single-frame) with its texture and .mtl file
  • .abc (only single-frame supported)
  • .usdz (supports animations)
  • .scn (native SceneKit's format, supports animations)

RealityKit

Apple RealityKit framework loads 3D models for AR and VR apps. You can prototype a content for RealityKit in a standalone app called Reality Composer Pro. RealityKit supports the following 3D formats:

  • .usdz (supports animations and dynamics)
  • .reality (supports animations and dynamics, optimized for a faster loading)
  • .rcproject Xcode 14– (supports animations and dynamics)
  • .realitycomposerpro Xcode 15+

Additionally you can use Terminal's usdzconvert command to generate .usdz from the following formats:

  • .obj
  • .glTF
  • .fbx
  • .abc
  • .usda
  • .usdc
  • .usd

And, of course, you can use Reality Converter app with its simple GUI.


Sceneform

Pity but since June 2020 Sceneform has been archived and no longer maintained by Google.

Google Sceneform handles 3D models for ARCore SDK. Sceneform supports the following 3D assets with their material dependencies:

  • .obj (with its .mtl dependency)
  • .glTF (animations not supported)
  • .fbx (with or without animations)
  • .sfa (ascii asset definition, deprecated in Sceneform 1.16)
  • .sfb (binary asset definition, deprecated in Sceneform 1.16)

SceneKit, RealityKit, Sceneform and Reality Composer Pro support Physically Based Rendering.


ARKit and ARCore

But what's the role of ARKit and ARCore then?

These two AR modules don't care about importing and rendering of a 3D geometry. They are only responsible for tracking (world, image, face, geo, etc) and scene understanding (i.e. plane detection, hit-testing & raycasting, depth perception, light estimation, and geometry reconstruction).

Moye answered 26/4, 2019 at 18:39 Comment(0)
C
5

ARKit doesn't care about model formats, because ARKit doesn't display 3D models (or anything else) itself.

ARKit provides information for use by a higher level rendering engine — Apple's SceneKit or SpriteKit, third-party Unreal or Unity plug-ins, or an engine you build yourself with Metal or OpenGL. The rendering engine is responsible for drawing the camera feed and overlaying 3D content to create AR illusions, and it uses the information ARKit provides in order to do so convincingly.

I don't know much about ARCore, but from all appearances it has the same role in the Android ecosystem — it's Unity, Unreal, or some other engine that handles the 3D models there, too.

So, questions like this are specific to whatever 3D engine you're using with ARKit/ARCore. SceneKit can handle DAE and OBJ directly, and a few more formats via Model I/O (see MDLAsset and SCNScene.init(mdlAsset:)). For Unreal, Unity, and whatever else you use with ARCore handle... see the documentation for those technologies.

Conquistador answered 4/10, 2017 at 21:10 Comment(0)
K
3

ARcore itself doesn't come with any 3d model handling logic at this moment. To render a 3D model in any format, you need to parse the data and draw it using openGL. The sample app in the package demonstrates how this can be done for a simple 3D model i.e 1 OBJ and 1 texture file.

Koph answered 5/10, 2017 at 16:50 Comment(0)
P
0

I not sure did you checked ARCore properly. The basic example delivered by Google is working on .obj format. ARCore is set of tools related with AR only. You can use 3D format whatever you want as long as you will be able to use it on Android. It is not related with ARCore Question 2 is not related with ARCore and/or android or even arkit

Peso answered 4/10, 2017 at 16:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.