Scripts2026年6月1日·1 分钟阅读

Filament — Real-Time Physically Based Rendering Engine by Google

A cross-platform PBR rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Filament Overview
直接安装命令
npx -y tokrepo@latest install 62cd5eca-5d94-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Filament is an open-source real-time physically based rendering (PBR) engine created by Google. It targets mobile platforms first but runs on Android, iOS, Linux, macOS, Windows, and WebGL2, making it a versatile choice for 3D applications and visualization.

What Filament Does

  • Renders physically based materials with image-based lighting
  • Supports glTF 2.0 model loading out of the box
  • Provides a material system with a custom shading language
  • Offers post-processing effects like bloom, SSAO, and tone mapping
  • Includes tools for baking environment maps and compiling materials

Architecture Overview

Filament uses a retained-mode rendering architecture with a multithreaded backend. The engine abstracts GPU APIs (Vulkan, Metal, OpenGL ES, WebGL) behind a unified driver layer. The material system compiles shader code at build time into optimized per-platform binaries using the matc compiler.

Self-Hosting & Configuration

  • Build from source using CMake on Linux/macOS/Windows
  • Android builds use Gradle with bundled AAR artifacts
  • iOS builds produce universal frameworks via CMake
  • Configure rendering quality with Engine::Config at initialization
  • Material definitions use .mat files compiled by the matc tool

Key Features

  • Mobile-first design with low overhead and small binary size
  • Full PBR pipeline conforming to the Google Filament design document
  • Multithreaded rendering with automatic GPU command batching
  • Built-in glTF viewer (gltf_viewer) for rapid asset preview
  • Java/Kotlin bindings for native Android integration

Comparison with Similar Tools

  • Three.js — web-only, JavaScript; Filament is native C++ with WebGL export
  • Babylon.js — browser-focused; Filament prioritizes mobile native performance
  • bgfx — lower-level rendering abstraction without a built-in PBR pipeline
  • Ogre3D — general 3D engine; Filament is leaner with a PBR-first approach
  • wgpu — Rust GPU abstraction layer; Filament ships a full rendering pipeline

FAQ

Q: Does Filament include a scene graph or ECS? A: No. Filament provides rendering primitives; scene management is left to higher-level frameworks like Sceneform.

Q: Can I use Filament for games? A: Yes, though it focuses on rendering. You would pair it with a separate physics and audio engine.

Q: What shading models are supported? A: Lit (standard PBR), subsurface, cloth, and unlit models are available.

Q: Is Filament used in production? A: Google uses Filament in the Android Scene Viewer and Google Maps 3D features.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产