Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2

Overview

Filament

Android Build Status iOS Build Status Linux Build Status macOS Build Status Windows Build Status Web Build Status

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.

Download

Download Filament releases to access stable builds. Filament release archives contains host-side tools that are required to generate assets.

Make sure you always use tools from the same release as the runtime library. This is particularly important for matc (material compiler).

If you'd rather build Filament yourself, please refer to our build manual.

Android

Android projects can simply declare Filament libraries as Maven dependencies:

repositories {
    // ...
    mavenCentral()
}

dependencies {
    implementation 'com.google.android.filament:filament-android:1.15.1'
}

Here are all the libraries available in the group com.google.android.filament:

Artifact Description
filament-android The Filament rendering engine itself.
gltfio-android A glTF 2.0 loader for Filament, depends on filament-android.
gltfio-android-lite Trimmed version of gltfio that does not support some glTF extensions.
filament-utils-android KTX loading, Kotlin math, and camera utilities, depends on gltfio-android.
filament-utils-android-lite Trimmed version of filament-utils that does not support some glTF features.
filamat-android A runtime material builder/compiler. This library is large but contains a full shader compiler/validator/optimizer and supports both OpenGL and Vulkan.
filamat-android-lite A much smaller alternative to filamat-android that can only generate OpenGL shaders. It does not provide validation or optimizations.

iOS

iOS projects can use CocoaPods to install the latest release:

pod 'Filament', '~> 1.15.1'

Snapshots

If you prefer to live on the edge, you can download a continuous build by following the following steps:

  1. Find the commit you're interested in.
  2. Click the green check mark under the commit message.
  3. Click on the Details link for the platform you're interested in.
  4. On the top right, click on the Artifacts dropdown and choose an artifact.

Documentation

  • Filament, an in-depth explanation of real-time physically based rendering, the graphics capabilities and implementation of Filament. This document explains the math and reasoning behind most of our decisions. This document is a good introduction to PBR for graphics programmers.
  • Materials, the full reference documentation for our material system. This document explains our different material models, how to use the material compiler matc and how to write custom materials.
  • Material Properties, a reference sheet for the standard material model.

Examples

Night scene Night scene Materials Materials Helmet Screen-space refraction

Features

APIs

  • Native C++ API for Android, iOS, Linux, macOS and Windows
  • Java/JNI API for Android
  • JavaScript API

Backends

  • 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 Windows
  • WebGL 2.0 for all platforms

Rendering

  • Clustered forward renderer
  • Cook-Torrance microfacet specular BRDF
  • Lambertian diffuse BRDF
  • Custom lighting/surface shading
  • HDR/linear lighting
  • Metallic workflow
  • Clear coat
  • Anisotropic lighting
  • Approximated translucent (subsurface) materials
  • Cloth/fabric/sheen shading
  • Normal mapping & ambient occlusion mapping
  • Image-based lighting
  • Physically-based camera (shutter speed, sensitivity and aperture)
  • Physical light units
  • Point lights, spot lights and directional light
  • Specular anti-aliasing
  • Spot and directional light shadows
  • Cascaded shadows
  • EVSM, PCSS, DPCF, or PCF shadows
  • Transparent shadows
  • Contact shadows
  • Screen-space ambient occlusion
  • Screen-space refraction
  • Global fog
  • Dynamic resolution (with support for AMD FidelityFX FSR)

Post processing

  • HDR bloom
  • Depth of field bokeh
  • Multiple tone mappers: generic (customizable), ACES, filmic, etc.
  • Color and tone management: luminance scaling, gamut mapping
  • Color grading: exposure, night adaptation, white balance, channel mixer, shadows/mid-tones/highlights, ASC CDL, contrast, saturation, etc.
  • TAA, FXAA, MSAA
  • Screen-space lens flares

glTF 2.0

  • Encodings

    • Embeded
    • Binary
  • Primitive Types

    • Points
    • Lines
    • Line Loop
    • Line Strip
    • Triangles
    • Triangle Strip
    • Triangle Fan
  • Animation

    • Transform animation
    • Linear interpolation
    • Morph animation
      • Sparse accessor
    • Skin animation
    • Joint animation
  • Extensions

    • KHR_draco_mesh_compression
    • KHR_lights_punctual
    • KHR_materials_clearcoat
    • KHR_materials_ior
    • KHR_materials_pbrSpecularGlossiness
    • KHR_materials_sheen
    • KHR_materials_transmission
    • KHR_materials_unlit
    • KHR_materials_volume
    • KHR_mesh_quantization
    • KHR_texture_transform

Rendering with Filament

Native Linux, macOS and Windows

You must create an Engine, a Renderer and a SwapChain. The SwapChain is created from a native window pointer (an NSView on macOS or a HWND on Windows for instance):

Engine* engine = Engine::create();
SwapChain* swapChain = engine->createSwapChain(nativeWindow);
Renderer* renderer = engine->createRenderer();

To render a frame you must then create a View, a Scene and a Camera:

Camera* camera = engine->createCamera(EntityManager::get().create());
View* view = engine->createView();
Scene* scene = engine->createScene();

view->setCamera(camera);
view->setScene(scene);

Renderables are added to the scene:

Entity renderable = EntityManager::get().create();
// build a quad
RenderableManager::Builder(1)
        .boundingBox({{ -1, -1, -1 }, { 1, 1, 1 }})
        .material(0, materialInstance)
        .geometry(0, RenderableManager::PrimitiveType::TRIANGLES, vertexBuffer, indexBuffer, 0, 6)
        .culling(false)
        .build(*engine, renderable);
scene->addEntity(renderable);

The material instance is obtained from a material, itself loaded from a binary blob generated by matc:

Material* material = Material::Builder()
        .package((void*) BAKED_MATERIAL_PACKAGE, sizeof(BAKED_MATERIAL_PACKAGE))
        .build(*engine);
MaterialInstance* materialInstance = material->createInstance();

To learn more about materials and matc, please refer to the materials documentation.

To render, simply pass the View to the Renderer:

// beginFrame() returns false if we need to skip a frame
if (renderer->beginFrame(swapChain)) {
    // for each View
    renderer->render(view);
    renderer->endFrame();
}

For complete examples of Linux, macOS and Windows Filament applications, look at the source files in the samples/ directory. These samples are all based on libs/filamentapp/ which contains the code that creates a native window with SDL2 and initializes the Filament engine, renderer and views.

For more information on how to prepare environment maps for image-based lighting please refer to BUILDING.md.

Android

See android/samples for examples of how to use Filament on Android.

You must always first initialize Filament by calling Filament.init().

Rendering with Filament on Android is similar to rendering from native code (the APIs are largely the same across languages). You can render into a Surface by passing a Surface to the createSwapChain method. This allows you to render to a SurfaceTexture, a TextureView or a SurfaceView. To make things easier we provide an Android specific API called UiHelper in the package com.google.android.filament.android. All you need to do is set a render callback on the helper and attach your SurfaceView or TextureView to it. You are still responsible for creating the swap chain in the onNativeWindowChanged() callback.

iOS

Filament is supported on iOS 11.0 and above. See ios/samples for examples of using Filament on iOS.

Filament on iOS is largely the same as native rendering with C++. A CAEAGLLayer or CAMetalLayer is passed to the createSwapChain method. Filament for iOS supports both Metal (preferred) and OpenGL ES.

Assets

To get started you can use the textures and environment maps found respectively in third_party/textures and third_party/environments. These assets are under CC0 license. Please refer to their respective URL.txt files to know more about the original authors.

Environments must be pre-processed using cmgen or using the libiblprefilter library.

How to make contributions

Please read and follow the steps in CONTRIBUTING.md. Make sure you are familiar with the code style.

Directory structure

This repository not only contains the core Filament engine, but also its supporting libraries and tools.

  • android: Android libraries and projects
    • filamat-android: Filament material generation library (AAR) for Android
    • filament-android: Filament library (AAR) for Android
    • filament-utils-android: Extra utilities (KTX loader, math types, etc.)
    • gltfio-android: Filament glTF loading library (AAR) for Android
    • samples: Android-specific Filament samples
  • art: Source for various artworks (logos, PDF manuals, etc.)
  • assets: 3D assets to use with sample applications
  • build: CMake build scripts
  • docs: Documentation
    • math: Mathematica notebooks used to explore BRDFs, equations, etc.
  • filament: Filament rendering engine (minimal dependencies)
    • backend: Rendering backends/drivers (Vulkan, Metal, OpenGL/ES)
  • ide: Configuration files for IDEs (CLion, etc.)
  • ios: Sample projects for iOS
  • libs: Libraries
    • bluegl: OpenGL bindings for macOS, Linux and Windows
    • bluevk: Vulkan bindings for macOS, Linux, Windows and Android
    • camutils: Camera manipulation utilities
    • filabridge: Library shared by the Filament engine and host tools
    • filaflat: Serialization/deserialization library used for materials
    • filagui: Helper library for Dear ImGui
    • filamat: Material generation library
    • filamentapp: SDL2 skeleton to build sample apps
    • filameshio: Tiny filamesh parsing library (see also tools/filamesh)
    • geometry: Mesh-related utilities
    • gltfio: Loader for glTF 2.0
    • ibl: IBL generation tools
    • image: Image filtering and simple transforms
    • imageio: Image file reading / writing, only intended for internal use
    • matdbg: DebugServer for inspecting shaders at run-time (debug builds only)
    • math: Math library
    • mathio: Math types support for output streams
    • utils: Utility library (threads, memory, data structures, etc.)
    • viewer: glTF viewer library (requires gltfio)
  • samples: Sample desktop applications
  • shaders: Shaders used by filamat and matc
  • third_party: External libraries and assets
    • environments: Environment maps under CC0 license that can be used with cmgen
    • models: Models under permissive licenses
    • textures: Textures under CC0 license
  • tools: Host tools
    • cmgen: Image-based lighting asset generator
    • filamesh: Mesh converter
    • glslminifier: Minifies GLSL source code
    • matc: Material compiler
    • matinfo Displays information about materials compiled with matc
    • mipgen Generates a series of miplevels from a source image
    • normal-blending: Tool to blend normal maps
    • resgen Aggregates binary blobs into embeddable resources
    • roughness-prefilter: Pre-filters a roughness map from a normal map to reduce aliasing
    • specular-color: Computes the specular color of conductors based on spectral data
  • web: JavaScript bindings, documentation, and samples

License

Please see LICENSE.

Disclaimer

This is not an officially supported Google product.

Comments
  • Building using native Visual Studio

    Building using native Visual Studio

    Describe the bug Not a bug. I am just wondering what prevents building filament using the native Microsoft compiler in Visual Studio? Is it just a matter of C++ code not building? I saw a reference about assembly code in another issue. Is this still a problem or is there equivalent c code?

    enhancement windows 
    opened by gpyalt 37
  • Initial draft of C FFI wrapper for filament

    Initial draft of C FFI wrapper for filament

    This is an initial draft of a C wrapper for #139.

    This will likely require major rework before it is merged, but I wanted to get the discussion going nevertheless.

    Current the idea of API.h / cfilament.h is that the same symbol name is used in the C header, but is directly aliased to the C++ class if the header is included from the cpp file.

    I am also not sure whether duplication of documentation makes sense here. The interface is most likely going to be used by writers of FFI wrappers for other languages that do not use the header directly. Actual users of C will likely have access to an actual C++ compiler and can link against the static library directly without use of this wrapper.

    opened by shartte 37
  • Occlusion Material

    Occlusion Material

    Describe the bug I use filament via the SceneForm SDK. But I suspect it is a filament bug. When I put this material on an object then on some devices (I have not yet been able to determine which ones are 100% functional and which are not.) the objects behind it are displayed in black.

    This effect only affects GLTF and OBJ objects. FBX models are correctly occluded.

    The question now is whether it is a filament bug or rather an ArCore bug.

    This is my occluder material:

    material {
        name : "Occlusion material",
        shadingModel : unlit,
        colorWrite : false,
        depthWrite : true
    }
    
    fragment {
        void material(inout MaterialInputs material) {
            prepareMaterial(material);
            material.baseColor = vec4(0.0);
        }
    }
    

    To Reproduce Simply place a model with this material in front of a GLTF object. That is the result. 68686583-2135c400-056c-11ea-8a0b-c2b1ce06e7b6

    Expected behavior It would be correct if the object behind it were not visible. Like this: 68686464-f8adca00-056b-11ea-9dd5-9203d7a497fe

    Screenshots See "ToReproduce" and "Expected behavior" sections

    Smartphone (please complete the following information):

    • Device: [Not Working: Pixel 3a / OnePlus 5T] [Working: for example Samsung S7]
    • OS: [All Android Versions]

    Additional context The render order of the objects was set as follows: Camera -> Occlusion -> Others

    If this is not a filament error I apologize. But I have the feeling that the people in the SceneForm Repo are being let down.

    Maybe someone from this team can help. What surprises me is that it only does not work with GLTF and OBJ objects.

    opened by bobekos 36
  • readPixels on iOS/Metal returns buffer with only zeros

    readPixels on iOS/Metal returns buffer with only zeros

    I am using readPixels with a callback on iOS/Metal. The PixelBuffer uses PixelDataFormat::RGBA and PixelDataType::UBYTE. I am reserving an uint8_t array of size width * height * 4 for the storage, and call renderer->readPixels(0, 0, width, height, std::move(pb)).

    The swapchain has SwapChain::CONFIG_TRANSPARENT | SwapChain::CONFIG_READABLE as parameters, and I have metalLayer.opaque = NO to match that.

    Unfortunately, when the callback fires, the buffer is all zeros. Any ideas?

    (will try on other backends tomorrow).

    bug metal 
    opened by kpeeters 35
  • "gltfviewer -s" results in no lighting

    Describe the bug in windows, command "gltf_viewer my.gltf", that point lighting effect is visible; however, command "gltf_viewer -s my.gltf",that point lighting effect is gone. However, we do not want to scale the scene.

    Expected behavior how could be modify the code to control this?

    opened by JackKaiXing 34
  • How to show only gltf model not the background part

    How to show only gltf model not the background part

    I want to render the gltf model with a transparent background in android-

    the code is

      ` surfaceView = SurfaceView(this);
        choreographer = Choreographer.getInstance()
        modelViewer = ModelViewer(surfaceView)
        surfaceView.setOnTouchListener(modelViewer)
        loadGltf("BusterDrone")
        loadEnvironment("venetian_crossroads_2k")
    
    }
    
    private fun loadEnvironment(ibl: String) {
        // Create the indirect light source and add it to the scene.
        var buffer = readAsset("envs/$ibl/${ibl}_ibl.ktx")
        KtxLoader.createIndirectLight(modelViewer.engine, buffer).apply {
            intensity = 100_000f
            modelViewer.scene.indirectLight = this
    
        }
    
        // Create the sky box and add it to the scene.
        buffer = readAsset("envs/$ibl/${ibl}_skybox.ktx")
        KtxLoader.createSkybox(modelViewer.engine, buffer).apply {
            //modelViewer.view.blendMode=View.BlendMode.TRANSLUCENT
            modelViewer.scene.skybox= Skybox.Builder().intensity(0f).color(0.0f, 0.0f, 0.0f, 0.0f).build(modelViewer.engine)
            //modelViewer.scene.skybox=null
        }
    }
    
    private fun loadGltf(name: String) {
        val buffer = readAsset("models/${name}.gltf")
        modelViewer.loadModelGltf(buffer) { uri -> readAsset("models/$uri") }
        modelViewer.transformToUnitCube()
    }
    
    private fun readAsset(assetName: String): ByteBuffer {
        val input = assets.open(assetName)
        val bytes = ByteArray(input.available())
        input.read(bytes)
        return ByteBuffer.wrap(bytes)
    }`
    

    I'm getting the black background when I'm using this code in skybox modelViewer.scene.skybox= Skybox.Builder().intensity(0f).color(0.0f, 0.0f, 0.0f, 0.0f).build(modelViewer.engine)

    and twhen I'm using this code in skybox. modelViewer.view.blendMode=View.BlendMode.TRANSLUCENT modelViewer.scene.skybox=null

    I'm getting like this Screenshot_2020-10-21-11-18-24-514_com google android filament gltf (1)

    Please tell me how can I show the model without any background?

    enhancement gltf 
    opened by shivammaindola 34
  • crash on Android 8.1.0

    crash on Android 8.1.0

    Describe the bug some devices are works, but some not.

    crash info bugreport files

    crash detail info refer to file tombstone_00

    device info https://www.tme.net/device/vivo-x20a/

    Android 8.1.0

    bug opengl gpu specific 
    opened by August1996 33
  • 1.16 may have broken skinmeshes lighting

    1.16 may have broken skinmeshes lighting

    Describe the bug I updated from 1.15.2 to 1.16.1 and the lighting of my skin meshes completely broke. It looks as if the normals aren't computed properly, I'm not even sure the light is coming from the correct direction. No problem on static geometries.

    • I already rebuilt the materials.
    • I don't think I have any kind of scales in my hierarchy

    To Reproduce Steps to reproduce the behavior: I don't have repro steps and can't provide screenshots yet, this will take me a while to provide (or is there a way to provide screenshots privately?)

    I'm opening the ticket as a heads-up and welcoming suggestions if this problem could be on my side. In the meanwhile I've temporarily reverted to 1.15.2.

    Desktop (please complete the following information):

    • OS: Windows
    • GPU: NVIDIA GTX 1080
    • Backend: OpenGL
    bug 
    opened by teub 33
  • How to render into a transparent RenderTarget/Texture?

    How to render into a transparent RenderTarget/Texture?

    I create a View and set a RenderTarget which contains a color and depth attachment.

    The texture for the color attachment is created like:

    fila_texture = filament::Texture::Builder()
          .width(settings.width)
          .height(settings.height)
          .levels(1)
          .usage(filament::Texture::Usage::COLOR_ATTACHMENT | filament::Texture::Usage::SAMPLEABLE)
          .format(filament::Texture::InternalFormat::RGBA16F)
          .build(settings.ctx->getEngineRef());
    

    I've set the clear color using ClearOptions of the Renderer to an arbitary color with an alpha of 0.

    Is this the correct way of rendering into a transparent buffer?

    I'm asking because the result I get seems to have an alpha of 1.0.

    bug 
    opened by roxlu 33
  • GLTF's UV scaling functionality not implemented?

    GLTF's UV scaling functionality not implemented?

    Bug description We suspect that the Filament 1.4.5 version, present in last Sceneform version (1.16.0), does not deal (properly) with UV Scaling in GLTF/GLB files.

    To Reproduce This kind of transform is carried-out by means of the GLTF 2.0 extension KHR_texture_transform. Said this, when this kind of UV Scaling is used in a GLTF file under ARCore, in order to obtain a repeatable large texture, these are the wrong results obtained: image Please note the wrong repetition problem in the platform and the rail.

    Expected behavior Of course, the texture is shown in a correct way when we visualize the GLTF by means of a WebGL viewer (e.g. VSCodium GLTF Extension with BJS rendering): image

    Smartphone (please complete the following information):

    • Device: Motorola MotoG6 and Samsung Tab S4
    • OS: Android 9.0
    bug gltf 
    opened by vortice3D 29
  • opengl32.lib duplicate defines error

    opengl32.lib duplicate defines error

    I am trying to build the filament libs into my own project, but my project already includes opengl for other libs and I am getting the following errors: https://pastebin.com/aNCA9DEd

    Do you guys have some sort of workaround for this just like the unwindows.h file?

    opened by Tenebralus 27
  • Add RGTC + BPTC support

    Add RGTC + BPTC support

    Filament already supports S3TC. I assumed the naming conventions followed that of EXT_texture_compression_s3tc.

    Based on the existing S3TC support we extended Filament with RGTC and BPTC support because we use Filament with BC textures on macOS and Windows. The relevant OpenGL extensions are EXT_texture_compression_rgtc and EXT_texture_compression_bptc.

    We tested it with Metal backend (on Intel and ARM64 macs) and on Windows (with OpenGL backend). Didn't test the Vulkan backend.

    opened by palver123 0
  • gltfio: Store default transform for animated entities

    gltfio: Store default transform for animated entities

    If an entity has its scale animated to 0 its transformation matrix can't store rotation information, so it effectively "resets" its orientation. To fix, we store the original, unanimated transform matrix.

    Fixes #6311

    opened by bejado 1
  • Box and sphere IBLs with tinting

    Box and sphere IBLs with tinting

    Overview

    This PR expands Filament IBLs in two ways:

    • it adds IBL color tinting capabilities to alter the color of reflections
    • it adds two types of local IBLs: spheres and axis-aligned boxes

    Tinting

    Our application allows users to take screenshots with solid and gradient color backgrounds. We use custom IBLs and it was visually displeasing that the background color was not incorporated into the reflections.

    Without IBL tinting, this is how two metallic objects would look like in front of a red background: image

    The following screenshot shows how the previous scene looks like using a full tint: image

    The weight of the tint can be customized (with a scaler in the range of [0,1], see the above screenshot).

    This does alter the intensity of the IBL but for our particular application, this proved to be a desired property.

    The tinting itself is an overlay blend using artist established constants for split-value. Tint weight is left as a user-adjustable parameter.

    (While you are testing, please note that ACES does drastic hue shifts on fully saturated colors, so you may see a mismatch between the postprocessed background color and the reflected colors due to this.)

    Localized IBLs

    Reflections on low roughness bodies with parallel planar faces look awkward with infinite IBLs, that is, what is currently available. For example, the bottom-left of the following screenshot is vague in terms of how many objects are there: image

    By using localized IBLs, this ambiguity may be resolved. If the IBL is mapped onto a spherical proxy geometry, we get image

    while an axis-aligned box provides reflections such as shown below: image

    This PR contains an optimized version of the sphere-ray intersection that only works correctly if the ray is inside the IBL sphere (which is a reasonable restriction for IBLs). In terms of AMD ISA assembly, it requires 34 full rate and 2 quarter rate (rcp and sqrt) instructions. The numerically stable way of computing both roots would require 42 full rate and 3 quarter rate in ISA.

    For rays outside the IBL sphere, the difference is shown below. The full computation of both roots and selecting the closest one along the ray looks as: image

    The optimized computation shown in the PR renders the following image: image

    In terms of performance, the current solution uses a runtime branch to determine the type of the IBL. Whether this is acceptable is up to the reviewers to decide.

    opened by gaborvalasek 5
  • gltf animation has wrong orientation if rotation is non zero and no rotation sampler is used

    gltf animation has wrong orientation if rotation is non zero and no rotation sampler is used

    Describe the bug object during scaling animation has wrong orientation if rotation is non zero and no rotation sampler is used. Setting a single rotation keyframe(resulting in a constant sampler) resolves the issue.

    To Reproduce Steps to reproduce the behavior:

    1. load the file keyframe_rotation_no.gltf keyframe_rotation.zip

    2. notice that when no animation is played, the beams are parallel

    3. play the animation which uniformly scales one of the beams

    4. the beams in the animation should be parallel but they are not. The animating beam now seems to have zero rotation.

    Expected behavior Since no rotation sampler is used, the rotation should remain unchanged between animating and not animating. This is the case in other gltf viewers such as donmccurdy's or babylonjs. The file keyframe_rotation_yes.gltf has a constant rotation sampler and works as expected.

    Screenshots Screenshot 2022-11-21 at 11 58 08 Screenshot 2022-11-21 at 11 58 35

    Desktop (please complete the following information):

    • tested on filament-1.26.0, filament-1.28.3, https://google.github.io/filament/viewer/
    • model exported by Khronos glTF Blender I/O v3.3.32

    Additional context We encountered this issue when trying to optimise our animations using gltfpack. We assume it removes animation tracks only containing a single keyframe that has no effect on the already set rotation.

    bug gltf 
    opened by lwky 1
  • The attachSkin model is disappeared sometimes

    The attachSkin model is disappeared sometimes

    Hi, I use the interface attachSkin in the FilamentInstance to bind the face renderable to the character model. However, I met some problems and need help on how to use attachSkin interface.

    I have two gltf resources, one is the character and the other one is face. They share some bones and I attach the renderable whose name is Arachi_face_A_SHoff of face model to the first skin of character model through the ModelViewer I modified to show multiple model with same Engine ,View , Renderer, Camera and Scene

    The Code Snippet

            lifecycleScope.launch(Dispatchers.IO) {
                val modelViewer = modelViewer ?: [email protected]
                val modelByteBuffer = loadModelAsset(MAIN_FOLDER, MODEL_NAME)
    
                val mainModelName = "main"
                val subModelName = "sub"
    
                val mainAsset = modelViewer.modelManager.loadModelGltfAsync(mainModelName, modelByteBuffer) { fileName ->
                    loadModelAsset(MAIN_FOLDER, fileName)
                }
    
                val subByteBuffer = loadModelAsset(SUB_FOLDER, MODEL_NAME)
                val subAsset = modelViewer.modelManager.loadModelGltfAsync(subModelName, subByteBuffer) { fileName ->
                    loadModelAsset(SUB_FOLDER, fileName)
                }
    
                withContext(Dispatchers.Main) {
                    modelViewer.addModelToScene(mainAsset)
                    modelViewer.transformModelToUnitCube(mainAsset)
                    modelViewer.addModelToScene(subAsset)
    
                    subAsset?.getFirstEntityByName("Arachi_face_A_SHoff")?.let { entity ->
                        mainAsset?.instance?.attachSkin(0, entity)
                    }
                }
            }
    

    Describe the bug

    1. The face renderable may be disappeared while perform Gesture.ORBIT by GestureDetector and here is reference video

    To Reproduce Steps to reproduce the behavior:

    1. render the two gltf resources mentioned above2.
    2. attach the face to the first skin of the character
    3. perform the Gesture.ORBIT by GestureDetector

    Expected behavior The face is always rendered on the screen.

    Logs

    2022-11-21 11:00:10.415 24097-24097/com.filament.sample I/Filament: FEngine (64 bits) created at 0x7bab7d4680 (threading is enabled)
    2022-11-21 11:00:10.416 24097-28657/com.filament.sample D/Filament: Using ASurfaceTexture
    2022-11-21 11:00:10.416 24097-28657/com.filament.sample I/Filament: FEngine resolved backend: OpenGL
    2022-11-21 11:00:10.417 24097-28657/com.filament.sample V/Filament: [Qualcomm], [Adreno (TM) 660], [OpenGL ES 3.2 [email protected] ([email protected], I2fb6e682e6, 1631580237) (Date:09/14/21)], [OpenGL ES GLSL ES 3.20]
    2022-11-21 11:00:10.417 24097-28657/com.filament.sample V/Filament: Feature level: 2
        Active workarounds: 
        dont_use_timer_query
        disable_sidecar_blit_into_texture_array
        split_easu
        invalidate_end_only_if_invalidate_start
        allow_read_only_ancillary_feedback_loop
        enable_initialize_non_used_uniform_array
    2022-11-21 11:00:10.418 24097-24097/com.filament.sample I/Filament: FEngine feature level: 2
    
    

    Smartphone (please complete the following information):

    • Device: [SAMSUNG S21]
    • OS: [Android 12]
    bug gltf 
    opened by TedHsieh7 4
Releases(v1.29.0)
Owner
Google
Google ❤️ Open Source
Google
An easy to build CO2 Monitor/Meter with Android and iOS App for real time visualization and charting of air data, data logger, a variety of communication options (BLE, WIFI, MQTT, ESP-Now) and many supported sensors.

CO2-Gadget An easy to build CO2 Monitor/Meter with cell phone App for real time visualization and charting of air data, datalogger, a variety of commu

Mariete 29 Nov 15, 2022
Oxygine is C++ engine and framework for 2D games on iOS, Android, Windows, Linux and Mac

BUILD AND RUN See oxygine-framework/readme/ folder. It has instructions on how to build and run oxygine on different platforms. Wiki available at http

Oxygine 735 Nov 24, 2022
An efficient, small mobile key-value storage framework developed by WeChat. Works on Android, iOS, macOS, Windows, and POSIX.

中文版本请参看这里 MMKV is an efficient, small, easy-to-use mobile key-value storage framework used in the WeChat application. It's currently available on Andr

Tencent 15.3k Nov 25, 2022
A cross-platform (Android/iOS/Windows/macOS) cronet plugin for Flutter via `dart:ffi`

cronet_flutter A cross-platform (Android/iOS/Windows/macOS) cronet plugin for Flutter via dart:ffi

null 24 Nov 9, 2022
Firmware, mechanical and electrical design files for the Inline Filament Diameter Estimator, Lowcost (InFiDEL).

Inline Filament Diameter Estimator, Lowcost (InFiDEL) Originally created by Thomas Sanladerer A cheap, yet precise filament diameter sensor, intended

Daniel Smullen 107 Nov 18, 2022
Sega Master System / Game Gear / SG-1000 emulator for iOS, macOS, Raspberry Pi, Windows, Linux, BSD and RetroArch.

Gearsystem is a very accurate, cross-platform Sega Master System / Game Gear / SG-1000 emulator written in C++ that runs on Windows, macOS, Linux, BSD, iOS, Raspberry Pi and RetroArch.

Ignacio Sanchez Gines 180 Nov 21, 2022
Signed - a 3D modeling and construction language based on Lua and SDFs. Signed will be available for macOS and iOS and is heavily optimized for Metal.

Signed - A 3D modeling language Abstract Signed is a Lua based 3D modeling language, it provides a unique way to create high quality 3D content for yo

Markus Moenig 90 Nov 21, 2022
MTEngineSDL is a SDL2+ImGui engine for macOS, Linux and MS Windows.

Hello and welcome to the MTEngineSDL! This is an application host framework for starting custom apps created using SDL2, ImGui and OpenGL. How to comp

null 3 Jan 10, 2022
Real-Time Rendering with Lighting Grid Hierarchy I3D 2019 Demo

Real-Time Rendering with Lighting Grid Hierarchy I3D 2019 Demo Daqi Lin This demo is for the I3D 2019 paper Real-Time Rendering with Lighting Grid Hie

Lin Daqi 110 Sep 20, 2022
An implementation of physically based shading & image based lighting in D3D11, D3D12, Vulkan, and OpenGL 4.

Physically Based Rendering (c) 2017 - 2018 Michał Siejak (@Nadrin) An implementation of physically based shading model & image based lighting in vario

Michał Siejak 1.1k Nov 15, 2022
Improved version of real-time physics engine that couples FEM-based deformables and rigid body dynamics

Enhanced version of coupled FEM and constrained rigid body simulation Description This little playground aimed to test our Conjugate Gradients based M

Andrey Voroshilov 25 Apr 11, 2022
Macos-arm64-emulation - A guide for emulating macOS arm64e on an x86-based host.

macos-arm64-emulation Use the following guide to download and configure all of the necessary tools and files for emulating the macOS arm64e kernel. Th

Cylance 231 Nov 22, 2022
Utility to install kexts, Frameworks and PrivateFrameworks in the System of macOS. For macOS Monterey 12 and Big Sur 11

Command-Line-SnapShot-Mounter Credit: chris1111 Apple This utility uses the macOS terminal Command Line SnapShot Mounter is an utility that allows you

chris1111 22 Oct 14, 2022
Light probe generation and BRDF authoring for physically based shading.

IBLBaker About IBLBaker is provided under the MIT License(MIT) Copyright(c) 2015 Matt Davidson. Please see the LICENSE file for full details. Feel fre

MattD 657 Nov 16, 2022
Physically-based GPU and CPU ray-tracer emerging on a surface

etx-tracer Physically-based GPU and CPU ray-tracer emerging on a surface. Features Vertex Connection and Merging algorithm (CPU and GPU); Full-spectra

Serhii Rieznik 232 Nov 16, 2022
Updates the Wii's current system time with the real world time.

Fix Wii System Time This is a homebrew tool I made for the Wii a while ago. It updates the current system time with the real world time via worldtimea

Puzzle 2 Nov 9, 2022
🗺️ OMAPS.APP — Offline OpenStreetMap maps for iOS and Android. A community-driven fork of MAPS.ME.

OMaps is an open source cross-platform offline maps application, built on top of crowd-sourced OpenStreetMap data. It was publicly released for iOS and Android.

OMaps 4.1k Nov 27, 2022
A beginner friendly desktop UI for Tasmota flashed devices for Windows, macOS and Linux.

TasmoManager A beginner friendly desktop UI for Tasmota flashed devices for Windows, macOS and Linux. Features Native Tasmota device discovery (via ta

Tom Butcher 49 Nov 20, 2022