Git Product home page Git Product logo

Comments (6)

MarkCallow avatar MarkCallow commented on June 22, 2024 1

I have tried modifying toktx to use OpenImageIO for reading images. The large numbers of dependencies it has is proving intractable. I have had many issues getting all these packages to build via vcpkg (the only package manager I've found that supports what might be termed redistributable packages) for all the platforms we are supporting. Furthermore building the packages for a single platform in CI, when the builds work, takes 45 minutes or more. Because of these issues I've all but given up on OIIO. I hadn't got far enough to actually try any DDS files.

I had a brief discussion with the primary maintainer of OIIO and it isn't clear that OIIO's DDS reader lets the caller retrieve unmodified, still compressed (raw) image data. The OIIO API model is different. A reader would need special features to provide access to raw image data.

It probably would be relatively straightforward to integrate just a DDS reader into toktx but import would be subject to whatever issues said reader has. If someone wishes to give this a try, contact me first to discuss. Before adding any more readers the way image reading is currently handled in toktx needs restructuring to ease adding new input formats.

from ktx-software.

MarkCallow avatar MarkCallow commented on June 22, 2024 1

Yeah, I didn't meant to imply OIIO should be integrated into KTX-Software.

FWIW I never thought you were.

I'd be happy enough to see OIIO support something like DDS → RGBA32 (via OpenEXR or KTX2), then at least there is a lossless path to access the data.

If this is just to get access to the data in the DDS file, then okay. If you are going to encode it again in whatever format it started from, the decode-encode will introduce further noise into the image. If the intent is to convert a DDS file to a KTX file it is far better to copy the compressed bits from the DDS container into the new KTX2 container. I'm pretty sure all compressed formats available in DDS/D3D have Vulkan equivalents.

from ktx-software.

MarkCallow avatar MarkCallow commented on June 22, 2024

Contributions will be gratefully received.

from ktx-software.

Ben-Mack avatar Ben-Mack commented on June 22, 2024

Yes, DDS to KTX and KTX2 would be great. Does anyone know which tool can do this conversion? I've been looking for it

from ktx-software.

donmccurdy avatar donmccurdy commented on June 22, 2024

We (three.js) are interested in these workflows as well. OpenImageIO might be part of the solution — it can read:

bmp, cineon, dds, dpx, ffmpeg, fits, gif, hdr, heif, ico, iff, jpeg, null, openexr, png, pnm, psd, raw, rla,
sgi, socket, softimage, targa, tiff, webp, zfile

However, we've found OIIO's support for compressed DDS files and cubemaps to be ... less than complete (mrdoob/three.js#24189). But at least OIIO may be able to convert some DDS files to PNG or OpenEXR, which KTX-Software could then ingest.

If there are any other possibilities, we'd be glad to hear about them, and to stop maintaining support for DDS and PVR texture containers in favor of KTX2. 🙏

from ktx-software.

donmccurdy avatar donmccurdy commented on June 22, 2024

Because of these issues I've all but given up on OIIO. I hadn't got far enough to actually try any DDS files.

Yeah, I didn't meant to imply OIIO should be integrated into KTX-Software. Keeping dependencies light makes sense to me. More that (1) it'd be great to see OIIO with a KTX2 plugin someday, and (2) users can potentially use OIIO to convert files to something like OpenEXR, then use KTX-Software to convert to KTX2.

...it isn't clear that OIIO's DDS reader lets the caller retrieve unmodified, still compressed (raw) image data. The OIIO API model is different.

That's a useful point. I'd be happy enough to see OIIO support something like DDS → RGBA32 (via OpenEXR or KTX2), then at least there is a lossless path to access the data. I don't know that DDS really makes sense as an intermediate step in any production pipeline, it's more that we have users who just don't know how to get data out of these files at all.

from ktx-software.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.