Create Renderables

A Renderable is a 3D model and consists of vertices, materials, textures, and more. It can be attached to a Node and rendered as part of a scene. This page describes how to create and modify renderables.

Create from Android widgets

You can create a ViewRenderable from standard android widgets. These are rendered as flat cards in the scene.

To create one:

  1. Create a layout file in res > layout. For example:

    <TextView xmlns:android=""
       android:textAlignment="center" />
  2. Build the ViewRenderable

        .setView(this, R.layout.test_view)
        .thenAccept(renderable -> testViewRenderable = renderable);

    This version of setView() takes the resource ID of the uninflated layout file. You can also call setView(View) to create a renderable from programmatically created views.

All build() methods in Sceneform return a CompletableFuture. The object is built on a separate thread and the callback function is executed on the main thread.

The size of the renderable is based on the size of the View object. By default, every 10px for the view becomes 1cm for the renderable. Call setPixelsToMeters() to change the conversion ratio.

Changes to the underlying view affect how the renderable is displayed. Nodes with a view renderable attached will dispatch touch events to the view, so you can, for example respond to a button press.

// update button text when the renderable's node is tapped
Button button = (Button) renderable.getView();
button.setOnClickListener((button) -> button.setText("clicked"));

Create from a 3D asset

Sceneform provides tools and plugins for converting 3D assets files (OBJ, FBX, glTF) to Sceneform binary assets (SFB), which can then be built into a ModelRenderable.

For more information, see Import and Preview 3D Assets.

Create at runtime

ShapeFactory and MaterialFactory let your create renderable objects from simple shapes and materials.

Here's how to create a red sphere:

MaterialFactory.makeOpaqueWithColor(this, new Color(
            material -> {
              redSphereRenderable =
                  ShapeFactory.makeSphere(0.1f, new Vector3(0.0f, 0.15f, 0.0f), material); });

Modify renderables at runtime

If multiple nodes use the renderable, then changes to that renderable apply to all nodes. To avoid that behavior, call makeCopy() to create a separate renderable instance. Note this also calls makeCopy() on every material in the renderable.

blueSphereRenderable = redSphereRenderable.makeCopy();
                  MaterialFactory.MATERIAL_COLOR, new Color(;

Send feedback about...