
Nebula FX
Nebula 是一款粒子模组,由高性能 GPU 实例化渲染引擎和优化后的 NBL 流式传输技术驱动,可实现流畅的大规模动画效果。
核心特性:
高性能渲染
- GPU 驱动: 基于 OpenGL 4.4+ 计算着色器和 SSBO 技术构建。
- 零分配: 逻辑上确保运行时不进行对象分配,彻底消除 GC(垃圾回收)压力。
- PMB(持久映射缓冲区): 利用持久映射缓冲区技术,实现 CPU 到 GPU 的零拷贝数据传输。
- OIT(与顺序无关的透明度): 支持加权混合 OIT,完美解决粒子重叠时的排序问题。
先进的架构设计
- 多线程流式传输:
NblStreamer 在后台线程中执行 Zstd 解压和状态计算,确保主渲染线程不会被阻塞。
- 资源引用计数: 智能
TextureCacheSystem 管理显存资源,支持多实例复用和自动垃圾回收。
- 不可变快照: 使用
TextureAtlasMap 保证多线程环境下的绝对线程安全。
兼容性
- 与 Iris Shaders 无缝兼容。
- 支持 ReplayMod 录制和渲染。
.nbl 文件格式
Nebula 使用自定义的 .nbl 二进制格式,专为流式传输而设计:
- Zstd 压缩: 高压缩率结合超快解压速度。
- SoA 布局: 数据在内存中以 数组结构 (Structure of Arrays) 组织,以最大化 CPU 缓存命中率。
- I/P 帧结构: 类似于视频编码;利用关键帧(I 帧)和预测帧(P 帧)大幅减小文件大小。
有关 nbl 格式的更多信息,请点击 此处。
此外,你可以使用 Blender 插件 将 Blender 动画导出为 .nbl 粒子动画。
安装与使用
前置条件
- Minecraft 1.20.1 (Fabric)
- Fabric API
- ThreatenGL
- ModMenu
- Yet Another Config Lib
- 支持 OpenGL 4.4+ 的显卡
资源路径
- 动画文件:
.minecraft/nebula/animations/*.nbl
播放动画
你可以使用以下命令来播放 NBL 动画。
/nebula play <animation_name> [origin_x] [origin_y] [origin_z]
致谢
贡献
欢迎任何形式的贡献!你可以通过以下方式参与:
- 提交 Issue:报告 bug、建议新功能或提供反馈。
- 提交 Pull Request:修复已知问题、优化代码或改进文档。
- 本地化:帮助我们将该模组翻译成更多语言。
请在提交 PR 之前确保你的代码符合项目的编码风格。
许可证
本项目根据 GPL-v3 许可证 授权。
由 Atemukesu 用 ❤️ 制作

Nebula FX
Nebula is a particle mod powered by a high-performance GPU-instanced rendering engine and optimized NBL streaming for fluid, large-scale animations.
Core Features:
High-Performance Rendering
- GPU Driven: Built on OpenGL 4.4+ Compute Shaders and SSBO technology.
- Zero-Allocation: Logically ensures no object allocation during runtime, completely eliminating GC pressure.
- PMB (Persistent Mapped Buffer): Utilizes persistent mapped buffer technology to achieve zero-copy data transfer from CPU to GPU.
- OIT (Order Independent Transparency): Supports weighted-blended OIT to perfectly resolve sorting issues during particle overlapping.
Advanced Architectural Design
- Multi-threaded Streaming:
NblStreamer performs Zstd decompression and state calculation in a background thread, ensuring the main rendering thread is never blocked.
- Resource Reference Counting: Intelligent
TextureCacheSystem manages VRAM resources, supporting multi-instance reuse and automatic garbage collection.
- Immutable Snapshots: Uses
TextureAtlasMap to guarantee absolute thread safety in multi-threaded environments.
Compatibility
- Seamlessly compatible with Iris Shaders.
- Supports ReplayMod recording and rendering.
.nbl File Format
Nebula uses a custom .nbl binary format specifically engineered for streaming:
- Zstd Compression: High compression ratios coupled with ultra-fast decompression speeds.
- SoA Layout: Data is organized in memory using a Structure of Arrays layout to maximize CPU cache hit rates.
- I/P Frame Structure: Similar to video encoding; utilizes Keyframes (I-Frames) and Predicted Frames (P-Frames) to drastically reduce file size.
For more information about the nbl format, please click here.
Also, you can use the Blender Addon to export a Blender animation as a .nbl particle animation.
Installation & Usage
Prerequisites
- Minecraft 1.20.1 (Fabric)
- Fabric API
- ThreatenGL
- ModMenu
- Yet Another Config Lib
- GPU with OpenGL 4.4+ support
Resource Paths
- Animation Files:
.minecraft/nebula/animations/*.nbl
Play Animations
You can use this command to play NBL Animations.
/nebula play <animation_name> [origin_x] [origin_y] [origin_z]
Thanks
- MadParticle for the inspiration and reference implementation.
Contributing
Contributions of any kind are welcome! You can participate by:
- Submitting Issues: Report bugs, suggest new features, or provide feedback.
- Submitting Pull Requests: Fix known issues, optimize code, or improve documentation.
- Localization: Help us translate the mod into more languages.
Please ensure your code follows the project's coding style before submitting a PR.
License
This project is licensed under the GPL-v3 License.
Made by Atemukesu with ❤️
评论 0
登录后参与评分
还没有评论,来抢沙发吧