PVRTexToolCLI Raw Data Wrapping

This topic contains 5 replies, has 3 voices, and was last updated by  Henry 2 years ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #52130

    Henry
    Member

    Hi, I have successfully managed to wrap some raw textures to the PVRTC 4BPP format using the GUI. However I am having some trouble locating the same function in the CLI version of PVRTexTool. Because the texture data is raw, I am unable to specify any of the file formats mentioned in the input tooltip (KTX, DDS etc).

    I require the use of the CLI interface to batch automate some conversion processes.

    Assistance and input is greatly appreciated 🙂

    #52131

    Joe Davis
    Member

    Hi Henry,

    Unfortunately, this functionality only exists in the GUI tool. We could add an interface to the command line, but I suspect it would be quite unwieldy. I would recommend generating a TGA or BMP header for your raw data.

    Hope this helps,
    Joe

    #52132

    Henry
    Member

    Actually it would be a great help if the command line could include that feature as I can’t find any other software that offers the same wrapping feature that PVRTexTool has. I initially thought that the GUI was built around the CLI as if it were a wrapper. I don’t work with image formats much unfortunately, so I don’t really know how I’m supposed to go about with generating those headers.

    #52150

    Simon Fenney
    Moderator

    Joe,
    Does the CLI version support PNM file formats? They might be a compromise solution as the headers for those are utterly trivial. For example, they can be produced with a single printf in C, and then the raw RGB data is simply concatenated.

    #52151

    Joe Davis
    Member

    Does the CLI version support PNM file formats?

    Not yet. I’ve filed BRN58174 for the suggestion to support PNM, Seems like a neat way to quickly wrap raw data.

    initially thought that the GUI was built around the CLI as if it were a wrapper

    Most of the functionality comes from the PVRTexTool library. Unfortunately though, there are some features that are GUI specific.

    I haven’t used it before, but this free to use library has a very clean API for generating TGA files: http://research.cs.wisc.edu/graphics/Gallery/LibTarga/

    #52153

    Henry
    Member

    I’ve did some analysis on the raw compressed texture and the wrapped texture. It seems like the GUI just generates a proper PVR header for the texture to be readable. I’ll try a quick hack to see if I can discard the existing unknown header and generate one based on the whitepaper for the PVR format.

    Thanks for the input so far, learning new things 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.