Search Unity

Is there any way to replace PVRTexTool with ETC2Comp for ETC1+Alpha+Best texture conversion?

Discussion in 'Android' started by NeatWolf, Jan 15, 2017.

  1. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Hi,

    I unfortunately wasn't aware that the conversion process would have taken so long.

    I finally ended up renaming PVRTexTool to stop the conversion as it already ate up all the morning.

    I see there are better solutions already, like this:

    https://medium.com/@duhroach/building-a-blazing-fast-etc2-compressor-307f3e9aad99#.g2z77z3zr

    Now, I'm pretty sure command line parameters don't match, so simply replacing the file isn't probably going to work.

    Is there a way to replace it in the conversion process?

    Has anyone already built a wrapper to redirect the PVRTexTool2 calls to ETC2Comp ones?
     
  2. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    Hi,

    replacing the PVRTexTool executable should work. You can see the command line arguments that we pass to the tool by printing all argv.

    I did some hacked integration of etc2comp. So far it looks like etc2comp is a lot faster than our current solution in 'Best' quality, but slower for 'Normal' and 'Fast' (etc2comp with effort 0 is slower than PVRTexTool with etcfastperceptual).

    I did not have a look at image quality at all.

    Not sure yet if we will ever ship this, finding a solution that is fast in 'Normal' has higher priority.
     
    NeatWolf likes this.
  3. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    I see. "Best" would definitely require a confirmation dialogue as 90% of the time it's not even worth the time. Or just remove it, it is slow even on serious hardware configs!

    By "replacing", do you mean brutally renaming one exe to the other? Do parameter match? I didn't investigate, but for now I think "Normal" is good enough. I should really make a comparative test between a single "Normal" and "Best" compressed image.
     
  4. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    Yeah, replacing the exe with another. Parameters don't match. I don't recommend it and it will most likely break with a future Unity version, maybe even patch release. But in case you would have been blocked by this...
     
  5. AFrisby

    AFrisby

    Joined:
    Apr 14, 2010
    Posts:
    223
    Did anything ever come of this?
     
  6. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,167