Giter VIP home page Giter VIP logo

Comments (7)

stevenvergenz avatar stevenvergenz commented on May 28, 2024 1

@willswannackpluto This probably is an issue with the importer (importer author here). Unity does not allow you to specify the color space for a given texture at runtime, so all loaded textures are in gamma space (I think). You can verify this by extracting the texture from your GLB file using hex editor tools, then comparing that to Unity's preview window. I suspect they'll be different.

from gltf-blender-exporter.

UX3D-nopper avatar UX3D-nopper commented on May 28, 2024

Have you checked, if the importer is correctly loading the images?
Below are three exports: GLB, glTF with and without embedded images:

grafik
grafik
grafik

from gltf-blender-exporter.

UX3D-nopper avatar UX3D-nopper commented on May 28, 2024

Can you please test the scene with your importer:
27bb80d

from gltf-blender-exporter.

UX3D-nopper avatar UX3D-nopper commented on May 28, 2024

I think the importer is not correctly converting/loading the images, when they are embedded.
I close the ticket for now.

from gltf-blender-exporter.

 avatar commented on May 28, 2024

@UX3D-nopper Thanks for the test scene! It's very helpful. Interestingly, it works fine using the Unity importer so I'm going to keep digging and will post back if I find it's not an importer issue.

from gltf-blender-exporter.

UX3D-nopper avatar UX3D-nopper commented on May 28, 2024

Yes, please get back to us, if you find out an issue.
The point is, that the PNG encoding is taken - as mentioned in the code - from the original Blender code:
blender-thumbnailer.py

from gltf-blender-exporter.

Tshadow05 avatar Tshadow05 commented on May 28, 2024

I was having the same issue and I think you are right @stevenvergenz. I was able to fix it by changing the creation of the Texture2D (in Unity GLTFSceneImporter line 697) from
texture = new Texture2D(0, 0);
To
texture = new Texture2D(2,2, TextureFormat.ARGB32, true, true);
And now the objects are coming in with the correct color. Though its possible that other objects may get imported with the wrong color if they are in gamma space.

from gltf-blender-exporter.

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.