1. Mini Dynamic Lights
一种通过最小化计算来实现快速动态光照的模组,具体方法包括:
- 按类型和数量选择性地对实体进行动态光照计算
- 缩小动态光照半径范围
因此,为了换取性能提升,动态光照可能会出现卡顿现象。不过,你可以通过调整动态光照设置(第 4 节)来适配你的系统。
2. 致谢
感谢以下来源为我提供了开始开发此模组的最佳参考。
3. 功能
本迷你动态光照模组提供五项基本功能。
3.1. 最近实体动态光照
默认情况下,该模组仅渲染最靠近玩家的 4 个符合动态光照条件的实体,这是本模组的最低设置。
[最近实体渲染:]
如果你希望提高设置,请前往选项屏幕的视频设置页面。
发光物品实体在落地前不会产生动态光照,以减少动态光照的计算量。
3.2. 动画
当你手持发光物品时,它会像这样逐渐亮起。
[动画效果:]
细节之处见真章。 :)
3.3. 基于视线的照明
默认的玩家光源位于玩家前方一点,以营造出发光物品被握在玩家身前的错觉。
[基于视线的照明:]
3.4. (实验性)实体配置
本模组目前预配置了玩家和发光鱿鱼作为动态光照源,但你可以按照喜好扩展配置!
在你的游戏目录中找到 config 文件夹,并创建一个名为 dynamic-lights 的子目录。在该目录下创建格式为 filename.yaml 的新文件,模组将遍历每个文件以应用你的新配置。
以下是实体的配置模板:
# 必填字段
type: entity
# 或者
type: item
# 实体/物品的 Minecraft ID
id: minecraft:player
# 实体未着火或持有附魔物品时的光照等级
# 默认为 0
default light level: 0
# 实体持有附魔物品时的光照等级
# 默认为 5
enchantment light level: 5
# 实体着火时的光照等级
# 默认为 5
fire light level: 12
未来会有更多的配置项,但目前仅有这些。
4. 设置
这里的许多设置都具有实验性质,通常保持默认即可。然而,如果你希望获得更高分辨率的动态光照,可以参考视频设置页面中的以下选项:
4.1. 区块构建器 (Chunk Builder)
将此选项设置为 Full Blocking(完全阻塞),以确保所有光照动画同步。这通常能解决所有卡顿问题,但会降低性能。
4.2. 平滑光照 (Smooth Lighting)
将此选项设置为 Minimum(最低),以减少光照平滑度并提升性能。
4.3. 动态光照 (FAST / FANCY)
选项 FAST(快速)会产生略带卡顿的光照,但性能更好。
选项 FANCY(精美)会产生更平滑的光照,但性能较差。
4.4. 动态实体 (Dynamic Entities)
设置此选项以确定要渲染多少个具有动态光照效果的实体。
动态光照实体数量越低,性能越好。
参考(第 3.2 节)。
4.5. DL. 性能 (DL. Performance)
将此选项设置为 SMOOTH(平滑),以在每个刻(tick)都计算动态光照。
将此选项设置为 FASTEST(最快),以延迟到下一个刻再计算动态光照。
5. 模组兼容性
本模组大多与任何模组兼容。以下是一些经过测试并与 Mini Dynamic Lights 兼容的模组:
- Sodium:强烈建议搭配 Mini Dynamic Lights 使用。不过,其选项页面会被覆盖。我未来的计划包括重构动态光照的选项页面。
1. Mini Dynamic Lights
A fast dynamic light mod by doing minimal
computation through:
- selective dynamic light entity computation by type and count
- smaller range of dynamic light radius
As a result, the dynamic lighting can appear choppy in expense of performance.
However, dynamic lighting settings (Section 4.) can be tweaked to fit into your system.
2. Acknowledgement
Thanks to this source for giving me the best reference
for me to get started on this mod.
3. Features
I present to you five basic features to this mini dynamic
lights mod.
3.1. Nearest Entities Dynamic Lights
By default, the mod will only render the nearest 4 entities
that are eligible for dynamic lights, which is the lowest
setting for this mod.
[Nearest Entities Rendering: ]
If you are interested to increase the settings, head to
the video settings of your option screen.
Glowing item entities will not produce dynamic lights until it
reaches the ground to reduce dynamic lights calculations.
3.2. Animation
When you hold a glowing item, it will glow gradually like this.
[Animation: ]
It's the little things that count. :)
3.3. Vision-based Lighting
The default player light is a bit in front of the
player to create an illusion that the glowing item is
being held in front of the player.
[Vision-based Lighting: ]
3.4. (Experimental) Entity Configurable
This mod only preconfigured dynamic lights to players
and glow squids, but you can extend the configuration
to your likings!
In your game directory, find the directory config and
create a directory named dynamic-lights. In
there, create new files in the format filename.yaml and the mod
will iterate over each file to apply your new configuration.
This is a configuration template for entities
# a compulsory field
type: entity
# or
type: item
# minecraft id for the entity/item
id: minecraft:player
# light level when entity is not on fire or has enchanted items
# default is 0
default light level: 0
# light level when entity has enchanted items
# default is 5
enchantment light level: 5
# light level when entity is on fire
# default is 5
fire light level: 12
There will be more configurations in the future, but these
are the current ones so far.
4. Settings
A lot of the settings here are experimental, you can usually leave
it as it is. However, if you are interested in getting higher
dynamic light resolution, you can refer to the following options in the Video Settings page:
4.1. Chunk Builder
Set this option to Full Blocking to ensure all lighting animation
to be in-sync. This will usually fix all choppy-ness issues but will also reduce performances.
4.2. Smooth Lighting
Set this option to Minimum to reduce light smoothness and increase performance.
4.3. Dynamic Lights (FAST / FANCY)
Option FAST will produce slightly choppy lights with greater performance.
Option FANCY will produce smoother lights with lesser performance.
4.4. Dynamic Entities
Set this option to determine how many entities to render the dynamic entities.
The lower the number of dynamic light entities, the greater the performance.
Refer to (Section 3.2.) for reference.
4.5. DL. Performance
Set this option to SMOOTH to always compute for dynamic lights on every tick.
Set this option to FASTEST to delay dynamic lights next tick computation.
5. Mods Compatibility
This mod is mostly compatible to any mods. Here are a few tested mods with Mini Dynamic Lights:
- Sodium: this mod is highly recommended to be added with Mini Dynamic Lights. However, the options page will be overwritten. My future plans include refactor the options page for dynamic lights.
评论 0
登录后参与评分
还没有评论,来抢沙发吧