• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..17-Mar-2025-

3d_scene_adapter/H17-Mar-2025-851646

3d_widget_adapter/H17-Mar-2025-6,0284,387

figures/H17-Mar-2025-

kits/js/H17-Mar-2025-9,5107,403

lume/H17-Mar-2025-258,762186,948

metadata/lume/LumeEngine/tools/H17-Mar-2025-1,7881,788

LICENSEH A D17-Mar-20259.9 KiB179152

OAT.xmlH A D17-Mar-20258 KiB10351

README.mdH A D17-Mar-20253.4 KiB5544

README_en.mdH A D17-Mar-20254.1 KiB5645

bundle.jsonH A D17-Mar-20254.8 KiB138136

README.md

1# AGP引擎
2
3## 简介
4AGP(Ark Graphics Platform)引擎是一款跨平台、高性能实时渲染的3D引擎,具有易用性、高画质、可扩展等特性。引擎使用先进的ECS(Entity-Component-System)架构设计,进行模块化封装(如材质定义、后处理特效等),为开发者提供了灵活易用的开发套件。AGP引擎支持Opengl ES/Vulkan后端,降低开发者对硬件资源依赖。
5
6AGP引擎的主要结构如下图所示:
7
8![AGP引擎架构图](./figures/graphic_3d_architecture.jpg)
9
10OpenHarmony 3D图形栈的分层说明如下:
11
12• 接口层:提供图形的Native API能力以及ECS组件系统。
13
14• 引擎层
15
16| 模块                     | 能力描述                                                                                       |
17|------------------------|--------------------------------------------------------------------------------------------|
18| 模型解析         | 提供解析GLTF模型的能力。                                                                               |
19| 材质定义            | 提供了PBR(基于物理的渲染)等材质的定义。                               |
20| 动画           | 提供动画引擎的相关能力,如刚体、骨骼等。                            |
21| 光照&阴影&反射 | 提供定向光、点光源、聚光源等光源;提供PCF(基于硬阴影的抗锯齿算法)等算法。      |
22| 后处理特效 | 主要完成ToneMapping(色调映射)、Bloom(高亮溢出)、HDR(高动态范围成像)、FXAA(快速近似抗锯齿)、Blur(模糊)等后处理特效功能。      |
23| 插件系统                | 提供了加载各种插件的能力,利用插件开发新功能。 |
24| 资源管理                | 此模块提供了资源管理能力,主要包含内存管理、线程管理、GPU资源管理等。 |
25| 系统抽象                | 主要包含了文件系统、窗口系统、调试系统等。 |
26
27• 图形后端:支持OpenGL ES、Vulkan后端。
28
29## 目录
30
31```
32foundation/graphic/graphic_3d/
33├── 3d_widget_adapter                  # 适配ArkUI接口代码
34├── lume                               # 引擎核心代码
35│   ├── Lume_3D                        # ECS框架,3D模型解析,3D渲染基础能力
36│   ├── LumeBase                       # 基础数据类型、数学库
37│   ├── LumeEngine                     # 资源管理、线程管理、跨平台、插件系统
38│   └── LumeRender                     # 引擎后端、渲染管线
39│   └── LumeBinaryCompile              # 引擎shader(着色器)编译
40```
41## 编译构建
42通过gn编译,在out目录下对应产品的文件夹中生成lib3dWidgetAdapter.z.solibAGPDLL.z.solibPluginAGP3D.z.solibPluginAGPRender.z.so43```
44hb build graphic_3d
45```
46## 说明
47
48### 使用说明
49AGP引擎作为OpenHarmony的组件,提供系统的3D绘制能力,包含引擎的加载、自定义灯光、相机以及纹理等能力,供开发者自定义3D模型。
50## 相关仓
51- [**graphic_graphic_2d**](https://gitee.com/abbuu_openharmony/graphic_graphic_2d)
52- [arkui_ace_engine](https://gitee.com/openharmony/arkui_ace_engine)
53- [third_party_egl](https://gitee.com/openharmony/third_party_egl)
54- [third_party_opengles](https://gitee.com/openharmony/third_party_opengles)
55- [third_party_skia](https://gitee.com/openharmony/third_party_skia)

README_en.md

1# AGP Engine
2
3## Introduction
4The Ark Graphics Platform (AGP) engine is a cross-platform, high-performance real-time 3D engine that is easy to use, high-quality, and scalable. The engine is designed with an advanced Entity-Component-System (ECS) architecture and is modularly encapsulated (such as material definitions, post-processing effects, etc.), providing developers with a flexible and easy-to-use development kit. The AGP engine supports the Opengl ES/Vulkan backend to reduce developers' dependence on hardware resources.
5
6The main structure of the AGP engine is shown in the following figure:
7
8![AGP引擎架构图](./figures/graphic_3d_architecture.jpg)
9
10The layering of the OpenHarmony 3D graphics stack is described as follows:
11
12• Interface layer: provides graphical native API capabilities and ECS component systems.
13
14• Engine layer
15
16| Module                     | Competency description                                                                                       |
17|------------------------|--------------------------------------------------------------------------------------------|
18| Model parsing         | Provides the ability to parse GLTF models.                                                                               |
19| Material Definitions            | Definitions for materials such as PBR (Physically Based Rendering) are provided.                               |
20| animation           | Provides animation engine-related capabilities such as rigid bodies, bones, etc.                            |
21| Lighting & Shadows & Reflections | Provide directional light, point light, spot light source and other light sources; Algorithms such as PCF (Hard Shadow-Based Anti-Aliasing Algorithm) are available.      |
22| Post-processing effects | It mainly completes post-processing effects such as ToneMapping, Bloom, HDR (High Dynamic Range Imaging), FXAA (Fast Approximate Anti-Aliasing), and Blur.      |
23| Plug-in system                | Provides the ability to load various plugins and develop new features with plugins. |
24| resource management                | This module provides resource management capabilities, including memory management, thread management, and GPU resource management. |
25| System abstraction                | It mainly includes file system, window system, debugging system, etc. |
26
27• Graphical backend: OpenGL ES, Vulkan backend supported.
28
29## Directory Structure
30
31```
32foundation/graphic/graphic_3d/
33├── 3d_widget_adapter                  # Adapt to the ArkUI interface code
34├── lume                               # Engine core code
35│   ├── Lume_3D                        # ECS framework, 3D model analysis, and 3D rendering basic capabilities
36│   ├── LumeBase                       # Basic data types, math libraries
37│   ├── LumeEngine                     # Resource management, thread management, cross-platform, plug-in system
38│   └── LumeRender                     # Engine backend, render pipeline
39│   └── LumeBinaryCompile              # Engine shader compilation
40```
41## Compilation and Building
42Through GN compilation, the lib3dWidgetAdapter.z.so, libAGPDLL.z.so, libPluginAGP3D.z.so, and libPluginAGPRender.z.so are generated in the folder of the corresponding product in the out directory.
43```
44hb build graphic_3d
45```
46## Description
47AGP Engine As a component of ArkUI, it provides the 3D drawing capability of the system.
48### Usage
49For more information, please refer to the use of other components in ArkUI. The AGP engine mainly provides 3D painting capabilities, including engine loading, custom lighting, camera, and texture capabilities, for developers to customize 3D models.
50## Repositories Involved
51- [**graphic_graphic_2d**](https://gitee.com/abbuu_openharmony/graphic_graphic_2d)
52- [arkui_ace_engine](https://gitee.com/openharmony/arkui_ace_engine)
53- [third_party_egl](https://gitee.com/openharmony/third_party_egl)
54- [third_party_opengles](https://gitee.com/openharmony/third_party_opengles)
55- [third_party_skia](https://gitee.com/openharmony/third_party_skia)
56