This is a simple tool to bake IBL maps for t3d.js.
- Bake IBL maps from HDR and LDR images.
- Adjust the Y-axis rotation of IBL maps.
- Adjust the exposure of IBL maps. (coming soon)
- Export to
.env
file, optimized fort3d.js
with smaller size and faster loading speed. - Export to
.hdr
file. - Export to
.dds
file. (coming soon)
The .env
file is used to store baked IBL maps and can be loaded by t3d.js
.
You can find the EnvLoader here: EnvLoader.
The .env
File consists of three parts: Header
, Json Data
, and Buffer Data
.
The header of the .env
File contains the following fields:
- version(4 bytes): The version of the
.env
File. - jsonByteLength(4 bytes): The byte length of the Json Data.
Header's total length is 8 bytes.
The Json Data is a JSON object containing the following fields:
- generator: The name of the generator.
- imageSize: The size of the IBL map at level 0.
- mipmaps: An array of mipmap information. The order is as follows:
level0-posx
,level0-negx
, ...,levelN-negz
. Each element contains:- length: The byte length of the current mipmap.
- position: The byte position of the current mipmap, relative to the beginning of the body.
The Buffer Data is binary data containing all mipmap data.
- Export spherical harmonics.
- Encoding type selection.
- Support explosure editing.
- Add DDS export.
- Add HDR export.