Skip to content

Cubemap

A Cubemap is a special type of texture that contains 6 individual 2D textures for each side of a cube. Cubemaps can be used for environmental reflections and skyboxes. The cubemap importer supports and automatically detects different layouts including row, column or vertical/horizontal cross layouts. You can also use equirectangular panoramic imgages or provide 6 separate images files with the postfixes front, back, left, right, top, bottom.

Properties

NameTypeDefaultAccessDescription
size1i🟩❌The size for each face of the cubemap.
Details

Type
1b: boolean
1c: color (integer)
1i: integer
1f: float
1s: string
2b: 2-component boolean vector
2i: 2-component integer vector
2f: 2-component float vector
3b: 3-component boolean vector
3i: 3-component integer vector
3f: 3-component float vector

Access
🟩 : Property value can be read with FxFile.Get
🟥 : Property value can be changed with FxFile.Set
❌ : Property value is read-only and can't be changed

Create

Cubemap textures can't be created like other files, they have to be imported with FxFile.Import and the FileType 222.

lua
cubemapID = FxFile.Import(222, "c:\\MyFolder\\MyCubemap.png", "");

Files

The default cubemap is located at Programs\Foxel Studio\default.fxlcm. Other imported cubemaps are stored as shared files in Shared\Cubemaps\ with the extension .fxlcm.