Flutter Filament

具有实时物理渲染引擎的 Flutter

本项目展示了 filament 的能力及其在 Flutter 中的应用。

特点

  • 使用 HDR 渲染 3D 模型

非常感谢 filament 团队为此做出的贡献。您可以在原始存储库中随时查看 filament。

运行

Android

要在 Android 上运行此项目,您需要运行 `filament_flutter_android/example` 中的 flutter 项目。当前使用的 filament 版本为 `1.25.0`,要更改 filament 版本,请在 `/android/build.gradle` 的依赖项中进行修改。

dependencies {
    implementation 'com.google.android.filament:filament-android:1.25.0'
    implementation 'com.google.android.filament:gltfio-android:1.25.0'
    implementation 'com.google.android.filament:filament-utils-android:1.25.0'
}

如果您更改了 filament 版本,建议重建项目文件。

  1. 请根据 Android 依赖项中指示的版本,下载适合您操作系统的 filament 版本:https://github.com/google/filament/releases
  2. 在终端中,打开 `filament_flutter_android/example/android/app/src/main/assets/envs` 文件夹。
  3. 运行生成器。
dowloaded_filament_folder/bin/cmgen -x default_env --format=ktx --size=256 --extract-blur=0.1 --extract-blur=0.1 lightroom_14b.hdr

项目文件

  • 3D 模型 – filament_flutter_android/example/android/app/src/main/assets/models
  • 天空盒 – filament_flutter_android/example/android/app/src/main/assets/envs

GitHub

查看 Github