Asset Variant

From Resonite Wiki
(Redirected from Asset Variant System)

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.

Generated variants are free storage wise, the cloud takes the original asset a user has uploaded and makes variants from that. The variants can be specified in the asset itself, for example marking a 4k texture to be the MaxSize of 2k will make a generate 2k variant of that 4k texture that will be delivered to clients.

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