BinomialLLC / basis_universal

Basis Universal GPU Texture Codec
Apache License 2.0
2.72k stars 267 forks source link

Can't compress 6 images in to one cubemap #288

Closed maxxnino closed 2 years ago

maxxnino commented 2 years ago

I'm using cli tool to compress 6 images into one cubemap but got this error For cubemaps the total number of input images is not a multiple of 6

basisu -mipmap -mip_smallest 4 -tex_type cubemap .\px.png .\nx.png .\py.png .\ny.png .\pz.png .\nz.png
Basis Universal GPU Texture Compressor v1.16
Copyright (C) 2019-2022 Binomial LLC, All rights reserved
Using SSE 4.1: 1, Multithreading: 1, Zstandard support: 1, OpenCL: 0
Processing 6 total file(s)
Processing source file ".\px.png"
Read source image ".\px.png", 512x512
Total basis file slices: 8
Slice: 0, alpha: 0, orig width/height: 512x512, width/height: 512x512, first_block: 0, image_index: 0, mip_level: 0, iframe: 0
Slice: 1, alpha: 0, orig width/height: 256x256, width/height: 256x256, first_block: 16384, image_index: 0, mip_level: 1, iframe: 0
Slice: 2, alpha: 0, orig width/height: 128x128, width/height: 128x128, first_block: 20480, image_index: 0, mip_level: 2, iframe: 0
Slice: 3, alpha: 0, orig width/height: 64x64, width/height: 64x64, first_block: 21504, image_index: 0, mip_level: 3, iframe: 0
Slice: 4, alpha: 0, orig width/height: 32x32, width/height: 32x32, first_block: 21760, image_index: 0, mip_level: 4, iframe: 0
Slice: 5, alpha: 0, orig width/height: 16x16, width/height: 16x16, first_block: 21824, image_index: 0, mip_level: 5, iframe: 0
Slice: 6, alpha: 0, orig width/height: 8x8, width/height: 8x8, first_block: 21840, image_index: 0, mip_level: 6, iframe: 0
Slice: 7, alpha: 0, orig width/height: 4x4, width/height: 4x4, first_block: 21844, image_index: 0, mip_level: 7, iframe: 0
ERROR: basis_compressor::validate_texture_type_constraints: For cubemaps the total number of input images is not a multiple of 6!
ERROR: Compressor failed 2darray/cubemap/video validation checks!
richgel999 commented 2 years ago

Specify an additional option: "-tex_array". This is a new bug introduced when we switched the default cmd line tool's behavior from texture arrays to individual files. Will fix. Thanks for the report!

richgel999 commented 2 years ago

The fix is checked in. I'll be pushing out a new executable tonight. Thanks again!

maxxnino commented 2 years ago

Thank you