Giter VIP home page Giter VIP logo

Comments (6)

create3000 avatar create3000 commented on June 25, 2024

I was a bit wrong, because Safari always does gl.UNPACK_COLORSPACE_CONVERSION_WEBGL with gl.NONE, which is what has to be done to get the right rendering behavior.

from x_ite.

create3000 avatar create3000 commented on June 25, 2024

glTF ignores ICC color profiles and custom gamma in images, but not X3D.

images SHOULD NOT contain ..., or embedded ICC profiles. Such features, if present, MUST be ignored by client implementations.

Here is a example image with custom ICC color profile:

https://create3000.github.io/x_ite/playground/?url=https://rawgit.com/create3000/Library/main/Tests/Components/Texturing/ColorManagement.x3d.

https://andreasplesch.github.io/Library/Viewer/index.html?url=https://rawgit.com/create3000/Library/main/Tests/Components/Texturing/ColorManagement.x3d.

Either we should always do gl.UNPACK_COLORSPACE_CONVERSION_WEBGL with gl.NONE (what Safari always does), or ImageTexture should have a new field colorspaceConversion (think this is the right capitalization).

from x_ite.

create3000 avatar create3000 commented on June 25, 2024

I haven't found anything in X3D spec about textures and ICC color profiles:

https://www.google.com/search?client=firefox-b-d&q=ICC+site%3Ahttps%3A%2F%2Fwww.web3d.org%2Fdocuments%2Fspecifications%2F19775-1%2FV4.0%2FPart01%2F

from x_ite.

andreasplesch avatar andreasplesch commented on June 25, 2024

Thank you for the investigation. Probably time to ask on x3d-public for guidance. I can do that.

from x_ite.

andreasplesch avatar andreasplesch commented on June 25, 2024

Let's see if there is a response on x3d-public.

I remembered why I did not focus on that at the time. It is clear that the test glTF asset in the issue and the image used in the comments have unrealistic, extreme ICC profiles which is not a fair representation. For most textures the problem would be subtle. So this is not an urgent problem. Also, authors can always decide to use images without embedded profiles.

But there is a problem if pixel accurate glTF rendering with exact colors is a goal.

from x_ite.

andreasplesch avatar andreasplesch commented on June 25, 2024

Castle renders the test correctly:

image

It converted the gltf to this x3d:
textureencodingtest.zip

The x3d has the textures converted to giant PixelTextures without the ICC applied.

So that could be an option but it is not practical for larger images.

from x_ite.

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.