Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoder information #1

Open
FlorianLudwig opened this issue Mar 2, 2016 · 9 comments
Open

encoder information #1

FlorianLudwig opened this issue Mar 2, 2016 · 9 comments

Comments

@FlorianLudwig
Copy link

having information about the encoders used (which software and settings) would be great!

@felixpalmer
Copy link

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 

@mems
Copy link

mems commented Nov 6, 2016

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):

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

@cpietsch
Copy link

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!

@cpietsch
Copy link

ok got it: you need to use CRN file format to get down to 61kb with crunch -fileformat crn

@EloB
Copy link

EloB commented Oct 15, 2018

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 :)

@cpietsch
Copy link

https://github.com/BinomialLLC/crunch is your friend

@EloB
Copy link

EloB commented Oct 16, 2018

@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
image

@cpietsch
Copy link

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/

@EloB
Copy link

EloB commented Oct 17, 2018

@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 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants