Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

sceneform-android

> 数据库
Open source

Sceneform Maintained is an ARCore Android SDK with Google Filament as 3D engine. This is the continuation of the archived Sceneform

676 stars0 likes2 views
WebsiteGitHub

About

Sceneform Maintained is an ARCore Android SDK with Google Filament as 3D engine. This is the continuation of the archived Sceneform

Sceneform Maintained SDK for Android


⚠️ This framework isn't updated anymore. Consider using Sceneview in your projects instead.


Sceneform Maintained is an ARCore Android SDK with Google Filament as 3D engine. This is the continuation of the Archived Sceneform

Android Augmented Reality library: AR Model Viewer, Augmented Images, Augmented Faces, Video, Depth, Cloud Anchors, Instant Placement, Light Estimation and much more in Kotlin and Java


Chat with us

(Please don't use it for issues, go to the GitHub Issues section instead)


Sceneform maintained and successor:

  • Sceneform - Java Continuation : Here
  • SceneView - Kotlin Successor : SceneView/sceneview-android

Differences with Google Sceneform (1.15.0, 1.16.0, 1.17.0 and 1.17.1)

  • No plugin needed: Use gltf and glb 3D models files directly from assets, res/raw, local file or http/https url instead of sfa, sfb, fbx, obj,...
  • Latest versions of ARCore SDK and Google Filament
  • Latest gradle dependencies including AndroidX, LifecycleScope/Coroutines (SceneView only),...
  • Available as mavenCentral() dependency
  • Augmented Images supported
  • Augmented Faces supported
  • glb or gltf for 3D models (animations supported)
  • hdr or ktx for Environement (IndirectLight + Skybox)
  • 3D only usage supported and single dependency without ARCore (SceneView only)
  • VideoNode for MediaPlayer (mp4, avi,...) Video 3D Node
  • Horizontal/Vertical Plane Placement
  • Depth occlusion and placement (SceneView only)
  • InstantPlacement (SceneView only)
  • HdrLightEstimation with adjustements between more Spectacular or Realistic
  • Simple Model Viewer for basic usage, with only ArSceneView parameters (SceneView only)
  • Less OpenGL knowlege needed

This repository was originaly a fork of Sceneform Copyright (c) 2021 Google Inc. All rights reserved.

Dependencies

app/build.gradle

gradle
dependencies {
     implementation "com.gorisse.thomas.sceneform:sceneform:1.23.0"
}

more...

Usage (Simple model viewer)

Update your AndroidManifest.xml

AndroidManifest.xml

xml

    ...
    

more...

Add the View to your layout

res/layout/main_activity.xml

xml

sample...

Edit your Activity or Fragment

src/main/java/.../MainActivity.java

kotlin

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)

    // Load model.glb from assets folder or http url
    (supportFragmentManager.findFragmentById(R.id.arFragment) as ArFragment)
        .setOnTapPlaneGlbModel("model.glb")
}

Or

src/main/java/.../MainFragment.java

kotlin
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
    super.onViewCreated(view, savedInstanceState)

    // Load model.glb from assets folder or http url
    (childFragmentManager.findFragmentById(R.id.arFragment) as ArFragment)
        .setOnTapPlaneGlbModel("https://storage.googleapis.com/ar-answers-in-search-models/static/Tiger/model.glb")
}

kotlin sample...

java sample...

Samples

glTF with animation


full video...

kotlin
arFragment.setOnTapArPlaneListener { hitResult, plane, motionEvent ->
    // Create the Anchor
    arFragment.arSceneView.scene.addChild(AnchorNode(hitResult.createAnchor()).apply {
        // Create the transformable model and add it to the anchor
        addChild(TransformableNode(arFragment.transformationSystem).apply {
            renderable = model
            renderableInstance.animate(true).start()
        })
    })
}

kotlin sample project...

java sample project...

Depth Occlusion

kotlin
arFragment.apply {
    setOnSessionConfigurationListener { session, config ->
        if (session.isDepthModeSupported(Config.DepthMode.AUTOMATIC)) {
            config.depthMode = Config.DepthMode.AUTOMATIC
        }
    }
    setOnViewCreatedListener { arSceneView ->
        // Available modes: DEPTH_OCCLUSION_DISABLED, DEPTH_OCCLUSION_ENABLED
        arSceneView.cameraStream.depthOcclusionMode =
            CameraStream.DepthOcclusionMode.DEPTH_OCCLUSION_ENABLED
    }
}

documentation...

sample project...

Augmented Images

sample project...

Augmented Faces

A Blender file augmented face template is available here and can be used to create your own models:

The four bones in the skeleton are moved to the corresponding ARCore poses at runtime. It is possible to attach objects to the bones or assign weight to vertices to position the objects or modify a larger mesh according to the ARCore poses. The positions of the bones in the Blender file give a general idea of how the end result will look like so the relative transform of the attached objects is important.

A face texture should be prepared as a separate file. For creating a face texture this template can be used: canonical_face.png

You can also change the model shape based on the skeleton and weights assigned to vertices, moving some small objects around the head, scaling them, etc...

You can even animate all that.

sample project...

Cloud Anchors

| | - | - |

kotlin
// Create a new anchor = the pose of which ARCore will try to resolve using the ARCore Cloud Anchor service and the provided cloudAnchorId
sceneView.session?.resolveCloudAnchor(cloudAnchorId)?.let { resolvedAnchor ->
  sceneView.scene.addChild(AnchorNode(resolvedAnchor).apply {
      addChild(VideoNode(context, MediaPlayer.create(context, R.raw.restaurant_presentation).apply {
                  this.start()
              },null)
      )
  })
}

Environment Lights

https://user-images.githubusercontent.com/83349532/144654379-a4476baf-8a22-45aa-8088-4f5e3fc7384b.mp4

kotlin
// Use this mode if you want your objects to be more like if they where real
arSceneView.lightEstimationConfig = LightEstimationConfig.REALISTIC
kotlin
// Use this mode if you want your objects to be more spectacular
arSceneView.lightEstimationConfig = LightEstimationConfig.SPECTACULAR
kotlin
// Use this mode if you only want to apply ARCore lights colors and intensity
arSceneView.lightEstimationConfig = LightEstimationConfig.AMBIENT_INTENSITY
kotlin
// Use this mode if you want to disable all ARCore light estimation lights
arSceneView.lightEstimationConfig = LightEstimationConfig.DISABLED

sample project...

Video texture

kotlin
arFragment.setOnTapArPlaneListener { hitResult, plane, motionEvent ->
    // Create the Anchor
    arFragment.arSceneView.scene.addChild(AnchorNode(hitResult.createAnchor()).apply {
        addChild(VideoNode(context, MediaPlayer.create(context, R.raw.video).apply {
            start()
        }, chromaKeyColor, null))
    })
}

sample project...

Dynamic materials/textures

sample project...

Non AR usage

sample project...

Demo

Youtube Youtube

Emulator

Known working configuration

more...

Contribute - Pull Request

Fork the repository or ask for contributor access on Discord

Install GitHub Android Studio Plugin

Create the Pull Request directly from Android Studio

more...

Go further

AR Required vs AR Optional

If your app requires ARCore (AR Required) and is not only (AR Optional), use this manifest to indicates that this app requires Google Play Services for AR (AR Required) and results in the app only being visible in the Google Play Store on devices that support ARCore:

xml

    ...
    

more...

Nodes

To add a node or multiple nodes to the Scene when the user press on a surface, you can override the onTapPlane function from a BaseArFragment.OnTapArPlaneListener:

kotlin
arFragment.setOnTapArPlaneListener(::onTapPlane)
…

sample...

Remove or Hide a node

Remove an AnchorNode from the Scene

kotlin
anchorNode.anchor = null

Remove a Model Node, VideoNode, AugmentedFaceNode,... from the Scene

kotlin
node.parent = null

Show/Hide a Node = Don't render it

kotlin
node.enabled= false

documentation...

Frame Rate (FPS-Bound)

Upper-Bound

The Update-Rate of the rendering is limited through the used camera config of ARCore. For most Smartphones it is 30 fps and for the Pixel Smartphones it is 60 fps. The user can manually change this value (you should know what you are doing).

kotlin
arFragment.setOnViewCreatedListener { arSceneView ->
    // Set a higher bound for the frame rate
    arSceneView.setMaxFramesPerSeconds(60)
}

The default value is 60.

documentation...

Animations

Until now, only RenderableInstance are animtable. Below model corresponds to a RenderablaInstance returned from a node.getRenderableInstance()

Basic usage

On a very basic 3D model like a single infinite rotating sphere, you should not have to use ModelAnimator but probably instead just call:

java
model.animate(repeat).start();

Single Model with Single Animation

If you want to animate a single model to a specific timeline position, use:

java
ModelAnimator.ofAnimationFrame(model, "AnimationName", 100).start();
java
ModelAnimator.ofAnimationFraction(model, "AnimationName", 0.2f, 0.8f, 1f).start();

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Java3dandroidandroid-applicationandroid-library

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库