Asset Variant

From Resonite Wiki
Revision as of 01:27, 11 February 2024 by PJB (talk | contribs) (Basic description of asset variants based on what I could find and reverse engineer)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Overview

The Cloud can automatically generate different variants of uploaded assets, such as textures or meshes. These variants allow for extra functionality and improved performance, as clients can download more optimized variants depending on platform or use.

Asset variants are managed automatically by Resonite, and users should generally not need to worry about what variant is being used.

Assets With Variants

The following is a list of what assets can have variants and what their parameters are. Note that variants are heavily an implementation detail, so the information here should not be relied on.

Texture2D

Texture2D variant properties
Name Description Possible values
version integer
filtering mip map filtering Bilinear, Box, Lanczos3
compression texture compression RawRGBA, RawRGBAHalf, BC1_Crunched, BC3_Crunched, BC3nm_Crunched, BC1_Crunched_Non_Perceptual, BC3_Crunched_Non_Perceptual, BC1_LZMA, BC3_LZMA, BC3nm_LZMA, BC4_LZMA, BC6H_LZMA, BC7_LZMA, ETC2_RGB_Crunched, ETC2_RGBA8_Crunched, ETC2_RGB_LZMA, ETC2_RGBA8_LZMA, ASTC_4x4_LZMA, ASTC_5x5_LZMA, ASTC_6x6_LZMA, ASTC_8x8_LZMA, ASTC_10x10_LZMA, ASTC_12x12_LZMA
filtering mip map filtering Bilinear, Box, Lanczos3
quality compression quality integer
width integer
height integer
mips boolean
colorPreprocess None, sRGB, HDRsRGB, LogLUV, RGBM
alphaPreprocess None, sRGB, LogLUV, RGBM

Texture3D

Texture3D variant properties
Name Description Possible values
version integer
compression texture compression RawRGBA, RawRGBAHalf, BC1_Crunched, BC3_Crunched, BC3nm_Crunched, BC1_Crunched_Non_Perceptual, BC3_Crunched_Non_Perceptual, BC1_LZMA, BC3_LZMA, BC3nm_LZMA, BC4_LZMA, BC6H_LZMA, BC7_LZMA, ETC2_RGB_Crunched, ETC2_RGBA8_Crunched, ETC2_RGB_LZMA, ETC2_RGBA8_LZMA, ASTC_4x4_LZMA, ASTC_5x5_LZMA, ASTC_6x6_LZMA, ASTC_8x8_LZMA, ASTC_10x10_LZMA, ASTC_12x12_LZMA
filtering mip map filtering Bilinear, Box, Lanczos3
quality compression quality integer
width integer
height integer
depth integer
mips boolean
colorPreprocess None, sRGB, HDRsRGB, LogLUV, RGBM
alphaPreprocess None, sRGB, LogLUV, RGBM


Cubemap

Cubemap variant properties
Name Description Possible values
version integer
compression texture compression RawRGBA, RawRGBAHalf, BC1_Crunched, BC3_Crunched, BC3nm_Crunched, BC1_Crunched_Non_Perceptual, BC3_Crunched_Non_Perceptual, BC1_LZMA, BC3_LZMA, BC3nm_LZMA, BC4_LZMA, BC6H_LZMA, BC7_LZMA, ETC2_RGB_Crunched, ETC2_RGBA8_Crunched, ETC2_RGB_LZMA, ETC2_RGBA8_LZMA, ASTC_4x4_LZMA, ASTC_5x5_LZMA, ASTC_6x6_LZMA, ASTC_8x8_LZMA, ASTC_10x10_LZMA, ASTC_12x12_LZMA
filtering mip map filtering Bilinear, Box, Lanczos3
quality compression quality integer
size integer
mips boolean
colorPreprocess None, sRGB, HDRsRGB, LogLUV, RGBM
alphaPreprocess None, sRGB, LogLUV, RGBM

Mesh

Cubemap variant properties
Name Description Possible values
version integer
compression mesh compression None, LZ4, LZMA
datatype Mesh, MeshCollider, DualSidedMeshCollider, ConvexHullCollider

Shader

Shader variant properties
Name Description Possible values
variant bit field based on specific material properties unsigned integer
platform WindowsDX11, LinuxOpenGL, AndroidOpenGL