HDR Encoding Tools:Blender 材质与纹理插件

下载来源:Blender Extensions。
Blender 官方扩展库收录Blender 插件

资源介绍

Tools for encoding/compressing HDR images & vertex colors

Compatibility: Blender 4.2.0+

官方介绍(中文整理)

用于编码/压缩《人类发展报告》图像和顶点颜色的工具。

《人类发展报告》编码工具可以准备用于Unity等游戏引擎的烤制的《人类发展报告》灯光。它可以将.HDR 或.EXR 图像转换成带有 RGBM 或 DLDR 编码的 PNG。它也可以压缩和清理《人类发展报告》的顶端颜色,以便安全导出到游戏引擎。

RGBM 和 dLDR 编码被游戏开发者用来减少光图的文件大小。 RGBM 有时可以将一个HDR 光图的文件尺寸至少削减一半, DLDR 可以将其进一步削减(尽管损失更大 )。 您可以在 Unity 的文档中阅读更多关于这些编码的信息。

与《人类发展报告》图像相比,《人类发展报告》顶点颜色的内存足迹要低得多。 然而, Unity通常会将导入的顶点颜色固定在 0.0 – 1. 0 范围,在导入后将所有值都丢弃在 1.0 以上。 此加冕的压缩功能将所有光值除以特定的压缩系数, 从而允许它们安全导出到 Unity, 从而可以通过遮光器将其重新组合到预定值。

如何使用(基于图像)

Blender首先按照《人类发展报告》图像格式(.hdr /.exr)的烘烤灯光的通常步骤(.hdr /.Exr),紧随Blender的通常步骤。一旦您保存了您的《人类发展报告》灯塔文件,请遵循这些步骤:

  • 进入 UV/图像编辑器并打开右侧栏(即按 N)
  • 单击“ HDR 编码” 标签。 选择您的. EXR 或.HDR 图像
  • 出版“Generate PNG”
  • 片刻后,你的新巴布亚新几内亚将自动出现在UV/图像编辑器中。
  • 不需要手动保存新图像 – adton 也会与您选择的 EXR/ HDR 图像保存相同的文件夹。

编码

两个PNG编码都储存了伽马编码(1.2.2)值,

RGBM 存储颜色除以其最大成分; 恢复其在阿尔法信道中的乘数。 dLDR 简单地绘制 [0, 2] 至 [0, 1] 的地图; 超过 2 的强度被压缩。

在 Unity 中解码( 阴影图、 线性色空间)

(对于RGBM, Alpha Is Tr透明不受限制-alpha是一个乘数,而不是覆盖范围),然后:

  • RGBM:pow(RGB × A × 5, 2.2)
  • dLDR:pow (RGB x 2, 2. 2)

在伽马空间项目中, 抛下俯卧撑, 仅次于乘法。

查看官方原文摘要(English)

HDR Encoding Tools can prepare baked HDR light for use in game engines like Unity. It can convert an .HDR or .EXR image to a PNG with RGBM or dLDR encoding. It can also compress and clean up HDR vertex colors for safe export to game engines.

RGBM and dLDR encodings are used by game developers to reduce file size of lightmaps. RGBM can sometimes cut the file size of a HDR lightmap by at least half, and dLDR can cut it down even further (albeit with further lossiness.) You can read more about these encodings in Unity's documentation.

HDR vertex colors have a significantly lower memory footprint than HDR images. However, Unity normally will clamp imported vertex colors to the 0.0 – 1.0 range, discarding all values above 1.0 after import. This addon's Compress feature will divide all light values by a specific compression factor, which then allows their safe export to Unity where they can be re-multiplied back to their intended value via a shader.

How to Use (Image-based)

First follow Blender's usual steps for baking light to an HDR image format (.hdr / .exr). Once you've saved your HDR lightmap file, follow these steps:

  • Go into the UV/Image Editor and open the right sidebar (ie. press N)
  • Click on the "HDR Encoding" tab. Choose your .EXR or .HDR image
  • Press "Generate PNG"
  • After a moment, your new PNG will appear in the UV/Image Editor automatically.
  • No need to save the new image manually – the addon also saves it the same folder as your chosen .EXR/HDR image.

Encodings

Both PNG encodings store gamma-encoded (1/2.2) values, following Unity's lightmap conventions:

RGBM stores the color divided by its max component; the multiplier that restores it goes in the alpha channel. dLDR simply maps [0, 2] to [0, 1]; intensities above 2 are clamped.

Decoding in Unity (Shader Graph, linear color space)

Import the PNG with sRGB unchecked (and for RGBM, Alpha Is Transparency unchecked — alpha is a multiplier, not coverage), then:

  • RGBM: pow(RGB × A × 5, 2.2)
  • dLDR: pow(RGB × 2, 2.2)

In a gamma-space project, drop the pow and just multiply.

查看官方完整介绍 ↗

安装方法

  1. 打开 Blender「编辑 → 偏好设置 → 获取扩展(Get Extensions)」,搜索 HDR Encoding Tools,可直接从官方库安装。
  2. 手动安装时,选择适合当前 Blender 版本与系统的 ZIP 包,在「获取扩展」右上角菜单选择「从磁盘安装(Install from Disk)」,选中 ZIP 文件,无需解压。
  3. 安装后,在偏好设置的「插件(Add-ons)」中确认已启用,并按作者说明使用。

Blender 官方安装说明 ↗

下载安装包

请选择与你的 Blender 版本和操作系统相符的文件,下载由 Blender 官方扩展库提供。

正在加载安装包…

前往官方页面 ↗
来源与许可
© 版权声明
THE END
喜欢就支持一下吧
点赞13 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容