Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Sceneform for pragmatics

Sceneform for pragmatics

Andrei Dotsenko

March 12, 2020
Tweet

More Decks by Andrei Dotsenko

Other Decks in Programming

Transcript

  1. Table of contents • Solutions for 3D-rendering • What is

    Sceneform • How to use - simple flow • What we could do with Sceneform • Our experience • Conclusions
  2. Solutions for 3D-rendering • GLSurfaceView - native Android approach, raw

    OpenGL • LibGDX - powerful game development framework • Unity - cross-platform game engine • Filament - real-time physically based rendering engine
  3. What is Sceneform? • High-level scene graph API • Physically-based

    3D renderer - Filament • ARCore integration classes • Sceneform Tools gradle plugin + Android Studio plugin
  4. How to use - simple flow Prepare 3D model Load

    model by ModelRenderable.builder() Add SceneView to layout Convert model to SFB format by plugin Add renderable to the scene
  5. Preloaded or dynamically created models • Convert from files (OBJ,

    FBX, glTF) by Android Studio Plugin • Create simple shapes at runtime using ShapeFactory and MaterialFactory • Create Views from res/layout at runtime using ViewRenderable
  6. Models debugging • Lost textures • Broken animations • Corrupted

    bones • Position on the screen • Converting converting converting...
  7. Converter • Embedded in Android Studio • Command line only

    • Almost non-configurable • Suppressed or meaningless errors
  8. SFB-files & back-compatibility It is not safe to use converted

    (SFB) models at runtime with different Sceneform version than the converters version. E.g. (FBX-file + Sceneform converter v1.11) + App with Sceneform v1.11 => OK (FBX-file + Sceneform converter v1.11) + App with Sceneform v1.12 => CRASH Bonus - Android Studio crash
  9. Lights • Impossible to disable default environment light • Single

    light source works fine. More than one leads to bugs
  10. Broken bones after conversion • Model may be distorted due

    to bone weight • Distortion depends on the position of the model relative to the center of coordinates
  11. SceneController fun onResume() fun onPause() BaseNodeAnimator fun start() fun stop()

    fun pause() fun resume() BaseSceneBuilder fun build(): CompletableFuture BaseTransfomation fun transform(modelNode: BaseModelNode): CompletableFuture BaseModelNode fun init(): CompletableFuture
  12. Read: Revolut & 3D cards https://medium.com/revolut/how-we-implemented-3d-cards-in-revolut-fa842 03a8f42 ARCore Cupcakes series

    of articles https://medium.com/@harivigneshjayapalan/arcore-cupcakes-1-render-a-scen e-without-ar-for-phones-without-arcore-27d61a43a130 Issue tracker & samples https://github.com/google-ar/sceneform-android-sdk