Skip to content
Swift framework for loading various 3d models in SceneKit
C++ Swift C Objective-C
Branch: master
Clone or download
Latest commit 56d8053 Apr 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
3DViewer edits in API Jan 27, 2019
AssetImport.xcworkspace add files Jan 27, 2019
AssetImportKit Swift 5 update Apr 22, 2019
HowToInstall add files Jan 27, 2019
Media update readme Mar 2, 2019
SceneKitAssetImport Swift 5 update Apr 22, 2019
.gitignore Initial commit Jan 27, 2019
HowToInstall.md add files Jan 27, 2019
LICENSE Initial commit Jan 27, 2019
README.md update readme Mar 2, 2019

README.md

License

AssetImportKit is a cross platform library (macOS, iOS) that coverts the files supported by Assimp to SceneKit scenes.

Features

AssetImportKit allows you to import Assimp supported file formats directly in SceneKit at runtime. The library supports:

  • Geometry
  • Materials (with color, embedded textures and external textures)
  • Cameras and
  • Skeletal animations.
  • Serialization to .scn format

Supported file formats

AssetImportKit supports the following file formats: 3DS, 3MF, COLLADA, FBX, GLTF, OBJ STL. If you want to add support of all Assimp importers, please look at my assimp-for-ios build script.

Demos

This repository includes 2 small demos for macOS and iOS.

Requirements

  • Xcode 10 or later
  • Swift 4.2
  • iOS 11.3 or later
  • macOS 10.13 or later

Installation via CocoaPods

pod 'AssetImportKit'

Manual Installation

In order to install AssetImportKit manually please read the How-to-Install guide.

Usage

do {
  let assimpScene = try SCNScene.assimpScene(filePath: filePath,
                                              postProcessSteps: [.defaultQuality])
  let modelScene = assimpScene.modelScene
  modelScene.rootNode.childNodes.forEach {
    sceneView.scene?.rootNode.addChildNode($0)
  }
} catch {
  print(error.localizedDescription)
}

Note for iOS builds: if you are developing an iOS application, set the Enable Bitcode under Build Settings->Build Options of your target to NO.

License

AssetImportKit's license is based on 3-clause BSD-License.

You can’t perform that action at this time.