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

Some test images use incorrect KTXorientation key name #106

Closed
sevmeyer opened this issue Aug 1, 2019 · 10 comments · Fixed by #107
Closed

Some test images use incorrect KTXorientation key name #106

sevmeyer opened this issue Aug 1, 2019 · 10 comments · Fixed by #107

Comments

@sevmeyer
Copy link
Contributor

sevmeyer commented Aug 1, 2019

I have noticed that some test images use the incorrect metadata key KTXOrientation (uppercase O), instead of the correct KTXorientation:

  • cubemap_yokohama_astc_8x8_unorm.ktx
  • cubemap_yokohama_bc3_unorm.ktx
  • cubemap_yokohama_etc2_unorm.ktx
  • metalplate-amg-rgba8.ktx
  • not4_rgb888_srgb.ktx
  • pattern_02_bc2.ktx
  • texturearray_astc_8x8_unorm.ktx
  • texturearray_bc3_unorm.ktx
  • texturearray_etc2_unorm.ktx

I don't expect anything to catch on fire because of this, but it seems worthwhile to mention it.

@MarkCallow
Copy link
Collaborator

I noticed these when working on ktx2ktx2. It caused me to add a feature to drop such invalid metadata or optionally rewrite it during the conversion. I don't have a good way to fix these .ktx files as I don't have the original images. (I would really like to get those for the Yokohama cubemap). I will have to resort to a binary editor I suppose.

Are you up for creating a PR with the fixes?

@sevmeyer
Copy link
Contributor Author

sevmeyer commented Aug 3, 2019

No problem. I found the incorrect keys while working on a simple KTX inspection tool, which also can be used to fix the files. The real challenge was to review the changes in Git.

On this subject, I'm working on a repository with custom KTX test files, including files with errors. Hopefully, that will be a useful contribution to the pool of test data for KTX tools.

@MarkCallow
Copy link
Collaborator

MarkCallow commented Aug 4, 2019

IIRC, I created metalplate* and not4* using PVRTexTool. Maybe it is the guilty party in the other images too, which I found on the net. I just checked and found "KTXOrientation" in the binary. It is indeed the culprit.

@MarkCallow
Copy link
Collaborator

@jherico
Copy link
Contributor

jherico commented Aug 16, 2019

@MarkCallow The original yokohama images are these I believe:
http://www.humus.name/Textures/Yokohama3.zip

They're JPG, but they appear to be higher quality than the KTX existing compressed versions (i.e. no terrible banding in the sky)

@jherico
Copy link
Contributor

jherico commented Aug 16, 2019

Here's the ktx version: https://s3.amazonaws.com/Oculus/cubemap_yokohama_rgba32.zip

@jherico
Copy link
Contributor

jherico commented Aug 16, 2019

oops... looks like I accidentally found the culprit for the original bug.... my cubemap was created using PVRTexTool, and it appears to have put the incorrect KTXOrientation name in. I've posted in their forum about the issue here: https://forums.imgtec.com/t/incorrect-invalid-ktx-key-value-data/3047

@MarkCallow
Copy link
Collaborator

MarkCallow commented Aug 16, 2019

Thanks for the pointer to the Yokohama cubemaps. If I have time next week I'll try to create a Basis compressed .ktx2. I'd like to make new .ktx files of the ETC2, ASTC & BC3 versions as well.

As I noted in an earlier comment, I posted in the imgtec forum as well. There has been no response.

@jherico
Copy link
Contributor

jherico commented Aug 16, 2019

Whoops... should have read the whole thread I guess.

@MarkCallow
Copy link
Collaborator

No worry. The extra post in the forum will show multiple people are interested in a fix.

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

Successfully merging a pull request may close this issue.

3 participants