texture-tester
texture-tester copied to clipboard
encoder information
having information about the encoders used (which software and settings) would be great!
For creating PVR textures on OSX I can recommend the tools from https://community.imgtec.com/developers/powervr/installers/ in particular PVRTexTool
You can either use the GUI or the following command for creating a PVR texture that is working for me on iOS WebGL:
/Applications/Imagination/PowerVR_Graphics/PowerVR_Tools/PVRTexTool/CLI/OSX_x86/PVRTexToolCLI -m -flip y,flag -f PVRTC1_4 -q pvrtcbest -i image.png
For S3TC, take a look at https://github.com/BKcore/crunch-osx and use:
./crunch -file image.png -fileformat dds -DXT5 -yflip
To create DDS you can also use ImageMagick:
convert image.png -format dds -define dds:compression=dxt5 -define dds:cluster-fit=true -define dds:mipmaps=0 image_dxt5.dds
Or use Compressonator CLI (a GUI is also available):
CompressonatorCLI.exe -nomipmap -fd DXT5 image.png image_dxt5.dds
To create ATC/ATITC is more complicated, because the available tools are far to be perfect for that (contains bugs):
- Compressonator swizzle R and B channels you will get BGRA instead of RGBA
- Adreno Texture Tool / QCompress (GUI only) use the wrong FOURCC for ATC Explicit and ATC Interpolated in DDS container.
To pre "de"swizzle R and B channels (to fix Compressonator bug) you can use ImageMagick:
convert image.png -channel rgba -alpha on -set colorspace RGB -separate -swap 0,2 -combine -define png:color-type=6 image_bgra.png
Then use:
CompressonatorCLI.exe -nomipmap -fd ATC_RGBA_Explicit image_bgra.png image_atca.dds
Compressonator is Windows only application (both CLI and GUI), but works on macOS and Linux too with Wine
I recreated the dxt1 texture with crunch and ImageMagick (osx) and got both times 131kb instead of 61kb out.
./crunch -file ../shannon/shannon.png -fileformat dds -DXT1 -yflip -mipMode None
What sorcery are you using there ?
crunch: Advanced DXTn Texture Compressor - http://code.google.com/p/crunch
Copyright (c) 2010-2012 Rich Geldreich and Tenacious Software LLC
crnlib version v1.04 x64 Built Mar 30 2015, 15:45:43
Reading source texture: "/Users/chris/Documents/projekte/vv/dts/shannon/shannon.png"
Texture successfully loaded in 0.020s
Source texture: 512x512, Levels: 1, Faces: 1, Format: R8G8B8
Apparent type: 2D map, Flags: R G B Non-Flipped
Flipping texture on Y axis
Converting texture format from R8G8B8 to DXT1
Processing: 100%
Texture format conversion took 0.744s
Writing texture to file: "shannon.dds"
Texture successfully written in 0.748s
Texture successfully processed in 0.749s
Input texture: 512x512, Levels: 1, Faces: 1, Format: R8G8B8
Input pixels: 262144, Input file size: 463987, Input bits/pixel: 14.160
Output texture: 512x512, Levels: 1, Faces: 1, Format: DXT1
Output pixels: 262144, Output file size: 131200, Output bits/pixel: 4.004
Total time: 0.771s
1 total file(s) successfully processed, 0 file(s) skipped, 0 file(s) failed.
Exit status: 0
Would love to bring the dxt1 texture down to 61kb!
ok got it: you need to use CRN file format to get down to 61kb with crunch -fileformat crn
How do you create etc1 files?
I've tried etc1tool
but it didn't work but your image does. I need to know how you built shannon-etc1.pvr file :)
https://github.com/BinomialLLC/crunch is your friend
@cpietsch How do you create this with the crunch
command line? I'm totally noob to this :)
http://toji.github.io/texture-tester/textures/shannon-etc1.pvr
sorry, indeed crunch doesn't support etc1:
Even though the Crunch algorithm was originally designed for compression of DXT textures, it is in fact much more powerful. With some minor adjustments it can be used to compress other texture formats. This section will describe in detail how the original Crunch algorithm was modified in order to be able to compress ETC and ETC2 textures. source
You could check out https://www.binomial.info/buy-basis/
@cpietsch I'm working with legacy technology and it only supports etc1... 😄I will take a look at the link that you showed me anyway 😆