Тема нативних движків, що спрощують роботу з 3D графікою для Android, є головним болем багатьох розробників. У той час як для iOS існує SceneKit, розробники під Android були змушені або йти в крос-платформені рішення (Unity3d, LibGDX і т.п.) або використовувати самописні/опенсорсні рішення з обмеженим функціоналом. Поява Sceneform SDK вирішує не тільки цю проблему але й інкапсулює в собі роботу з ArCore SDK, відкриваючи для розробників можливість нативної реалізації AR рішень, не вдаючись до стороннього SDK.
В рамках доповіді будуть розглянуті практичні можливості та обмеження Sceneform SDK стосовно проектів з доповненою реальністю (AR). Так само будуть розглянуті такі теми як SLAM, ArCore SDK, розпізнавання та трекінг маркерів на основі зображень, Cloud Anchors та існуючі альтернативи на ринку.
2. Get started
Use cases:
1. Drawing 3D
scene
2. Item 1 + SLAM
(require
support ARCore)
Requirements:
1.Android SDK
version >=24
2.Java 8
3.*Sceneform Gradle
Plugin
4.*Google Sceneform
Tools for Android
Studio
5.*com.google.ar.sc
eneform:core
Support:
1. Shapes (sphere,
cylinder, cube)
2. 2D Android View
3. 3D models
(OBJ/FBX/GLTF/G
LB)
4. *Android
Property
animations or
FBX 2016/17+)
3. Scene and Nodes
Scene
Sun Camera AnchorNode AugmentedFaceNode
SkeletonNode
Special nodes
TransformableNode
4. World Vs Local Coord
World Coord.
Anchor A Coord.
(Local Coord.)
Anchor B Coord.
(Local Coord.)
12. Sceneform Material (I)
A material defines the visual appearance of a surface.
To completely describe and render a surface, a material
provides the following information:
● Material model
● Set of use-controllable named parameters
● Raster state (blending mode, backface culling,
etc.)
● Vertex shader code
● Fragment shader code
material {
// material properties
}
vertex {
// vertex shader, optional
}
fragment {
// fragment shader
}
15. Filament
Filament is a real-time physically
based rendering engine for Android,
iOS, Linux, macOS, Windows, and WebGL.
It is designed to be as small as
possible and as efficient as possible
on Android.
● OpenGL 4.1+ for Linux, macOS and Windows
● OpenGL ES 3.0+ for Android and iOS
● Metal for macOS and iOS
● Vulkan 1.0 for Android, Linux, macOS and iOS (with
MoltenVk), and Windows
● WebGL 2.0 for all platforms
23. Image Recognition
● Up to 1000 reference images.
● Up to 20 images simultaneously in the environment, but it cannot
track multiple instances of the same image.
● The physical image in the environment must be at least 15cm x 15cm
and must be flat
● Once tracked, ARCore provides estimates for position, orientation,
and physical size. These estimates are continuously refined as
ARCore gathers more data.
● ARCore cannot track a moving image, but it can resume tracking
that image after it stops moving.
● All tracking happens on the device, so no internet connection is
required. Reference images can be updated on-device or over the
network without requiring an app update.