MapLayerExport

Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.

Up and coming

Turn a map layer Blender rendered into packed sheets and a height map, ready to upload.

Put one under its MapScene and point Folder at Blender's output for the layer. ExportAsync crops and shrinks by the scene's resolution areas, packs the tiles into 1024 sheets with an AtlasBuilder and writes a new numbered version; once the sheets are uploaded, EncodeAsync builds the map's upload file from their image ids.

Made with Instance.new("MapLayerExport") or Clone().

Properties

NameTypeDefaultDescription
FolderPathHandlerThe folder Blender rendered the layer into: ColorMap.png, HeightMap.exr, HeightMapAlpha.png and meta.json.
LayerNamestring
Versionnumberread-onlyRead-only: the number of the next version folder, kept under Layers in a folder named after LayerName.

Methods

NameArgumentsReturnsDescription
ExportAsync
yields
()(PathHandler?, string?)Crops by the resolution areas, shrinks the low-res ones, tiles, packs 1024 sheets and writes them, HeightMap.png and Meta.json into a new version.
GetHeightMapAsync
yields
()(HeightMap?, string?)
EncodeAsync
yields
(sheetImageIds: { [number]: string })(buffer?, string?)Once the sheets are uploaded, returns the upload file's bytes from each sheet's image id.
From ShotInstance 33