Dyson Sphere Program
Install with App

Details

Latest version
1.0.1
Last Updated
First Uploaded
Downloads
17
Likes
0
Size
47KB
Dependants

DysonShellOptimizer — 戴森壳几何优化

前置

  • BepInEx:5.4.17
  • LossyCompression:0.3.8

功能

  • 并行化 DysonShell.GenerateGeometry 的网格扫描、最近边和最近节点计算。
  • 跨戴森壳并行执行蓝图导入,再在主线程统一创建 Unity 模型。
  • 几何输出顺序与原版一致:不改变顶点、邻接表、节点归属、vertsq 和朝向。
  • 分批建模并释放顶点、Mesh 和 Material。
  • 蓝图导入期间合并戴森节点 GPU 缓冲上传。

配置

配置文件:BepInEx/config/sinthome358.dsp.dysonshelloptimizer.cfg

配置 默认 说明
General.Enabled true 总开关;关闭后完全走原版逻辑
General.MaxDegreeOfParallelism 0 并行线程数;0 使用 CPU 核心数
General.ParallelAcrossShells true 跨壳并行生成几何
General.FreeGeometryAfterPaste true 粘贴后释放几何与模型,查看时按需重建
General.GeometryBatchMultiplier 4 每批壳数 = CPU 核数 × 该值
General.BatchNodeBufferUpload true 每层只上传一次节点缓冲
General.LogTimings false 输出每批耗时与堆内存日志

较大的 GeometryBatchMultiplier 会减少批次数和调度开销,但提高峰值内存;较小的值更省内存。MaxDegreeOfParallelism=0 适合大多数机器。

兼容性

  • 与其它重写 DysonShell.GenerateGeometry、DysonSphereLayer.ImportFromBlueprint 或 DrawModels 的模组可能冲突。

DysonShellOptimizer

Requirements

  • BepInEx: 5.4.17
  • LossyCompression: 0.3.8

Features

  • Parallelizes the grid scan, nearest-edge search, and nearest-node calculation in DysonShell.GenerateGeometry.
  • Imports blueprints across Dyson shells in parallel, then creates Unity models on the main thread.
  • Preserves vanilla geometry ordering: vertices, adjacency, node ownership, vertsq, and winding are unchanged.
  • Models shells in batches and releases vertices, meshes, and materials.
  • Batches the Dyson node GPU buffer upload during blueprint import.

Configuration

Config file: BepInEx/config/sinthome358.dsp.dysonshelloptimizer.cfg

Key Default Description
General.Enabled true Master switch; when disabled, the vanilla path is used
General.MaxDegreeOfParallelism 0 Worker threads; 0 uses the CPU core count
General.ParallelAcrossShells true Generate geometry across shells in parallel
General.FreeGeometryAfterPaste true Release geometry and models after paste; rebuild on view
General.GeometryBatchMultiplier 4 Shells per batch = CPU cores × this value
General.BatchNodeBufferUpload true Upload the node buffer once per layer
General.LogTimings false Log per-batch timing and managed heap usage

A larger GeometryBatchMultiplier reduces batch count and scheduling overhead but raises peak memory. A smaller value uses less memory. MaxDegreeOfParallelism=0 is suitable for most systems.

Compatibility

  • May conflict with other mods that rewrite DysonShell.GenerateGeometry, DysonSphereLayer.ImportFromBlueprint, or DrawModels.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.