Coder Social home page Coder Social logo

Comments (6)

nikeruga avatar nikeruga commented on June 12, 2024 1

I contacted you with the information you provided.
Confirmed as a bug by pixyz
They say they will fix it.

from sharpgltf.

vpenades avatar vpenades commented on June 12, 2024

That's odd, what is failing is that the calculated bounds of the mesh don't match the ones stored in the file.

you can bypass the issue by doing this:

ModelRoot.Load("Monkey.glb", ValidationMode.Skip);

That will disable the validation checks on load.

This doesn't mean there's no issues with the model itself;

The accessor is reporting the data has these bounds:

axis min max
X -5.352816E-06 5.352816E-06
Y 0 1
Z -1 1
W 1 1

But there's an element with value:

axis value
X -9.244935E-18
Y -9.681684E-17
Z 1
W 1

So the Y value is below the minimum value of 0 reported by the file.

It's not a critical issue and I suspect you can carry on by skipping the validation, but I guess it's worth to report this to the authors of the gltf exporter to avoid further issues.

from sharpgltf.

nikeruga avatar nikeruga commented on June 12, 2024

"I haven't had much experience with 3D, so it's not easy. It might be a good idea to create code that initially opens with 'load(filename)' and then tries 'load(filename, valid)' in case an exception occurs. As you suggested, I will send a bug report to https://www.pixyz-software.com/ to have it checked."

from sharpgltf.

vpenades avatar vpenades commented on June 12, 2024

It might be a good idea to create code that initially opens with 'load(filename)' and then tries 'load(filename, valid)'

Then we would never had the opportunity to catch this issue of pixyz exporter...

Keep in mind most glTF importers and exporters are still incomplete, buggy and under development... so we have two choices: be strict, catch errors and fix them when they appear.... or try to skip and hide them... so they're never fixed.

I understand it's a bit painful, but I think being strict is the right choice in the long run.

from sharpgltf.

nikeruga avatar nikeruga commented on June 12, 2024

The company does not see any problems in the Validator below.
I received a reply asking me to check.

https://github.khronos.org/glTF-Validator/

from sharpgltf.

vpenades avatar vpenades commented on June 12, 2024

Really? You can report this back to them:

https://github.khronos.org/glTF-Validator/ is the website frontend, the actual project repository is located here and you can download the command line gltf-validator from here

I ran glTF-Validator (command line) against the model you provided 'Monkey.glb' and it produces this report:

Monkey.glb full report

The report header is:

"uri": "Monkey.glb",
    "mimeType": "model/gltf-binary",
    "validatorVersion": "2.0.0-dev.3.8",
    "issues": {
        "numErrors": 21509,
        "numWarnings": 0,
        "numInfos": 25966,
        "numHints": 0,

So gltf-Validator is reporting that Monkey.glb has 21509 errors, which is far from fine.

Most of the errors are related to accessor bounds being incorrectly calculated, which is the same error SharpGLTF is detecting.

{
    "code": "ACCESSOR_MIN_MISMATCH",
    "message": "Declared minimum value for this component (-0.0) does not match actual minimum (-9.622668166445726e-17).",
    "severity": 0,
    "pointer": "/accessors/15217/min/1"
},
{
    "code": "ACCESSOR_ELEMENT_OUT_OF_MIN_BOUND",
    "message": "Accessor contains 38 element(s) less than declared minimum value -0.0.",
    "severity": 0,
    "pointer": "/accessors/15217/min/1"
},

I suspect what they did was to pass the .GLTF file to the gltf-validator website, without dragging the .BIN, so gltf validator only checks the structure layout and not the actual data, which is located in the .BIN file... that's why I used the .GLB file so it performs a full validation.

In any case, I can assure you that the model is not well formed and has internal errors. These errors are not critical since not many libraries use the accessor bounds, but they're errors nonetheless.

from sharpgltf.

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.