While Sceneform is a pretty fresh library, it’s already has a lot of great functionality and supports few common 3D model formats, including:

Though, things requires some dancing around. To include your models to the projects, you still need to convert them to *.sfb binary format, using Android Studio plugin.

Along with *.sfb file, Android Studio generates a *.sfa text file, that describes how to build binaries in human readable form. This file can be changed manually, and changes will be applied to binaries with next Gradle sync.

Later on, you can load those compiled binary files, both statically from res or asset folder and dynamically from file or network storage using URI ’s:

// Get Rendarable from assets, using URI

val renderable = ModelRenderable.builder()

.setSource(this, Uri.parse("$name.sfb"))

.build()

In one of latest releases, Sceneform Assets library was introduced, that also allows you to load glTF or glb models with out additional conversation.

Material Definitions

Material definitions are some sort of Shaders in Sceneform. By default there are three of them, one for each supported model type:

They describe what parameters are allowed during asset generation, and lately can be changed on runtime. Depending on what asset type you are importing, corresponding material definition will be used.