Comments (6)
I contacted you with the information you provided.
Confirmed as a bug by pixyz
They say they will fix it.
from sharpgltf.
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.
"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.
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.
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.
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:
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)
- [QUESTION] Any reason morph targets count is sometimes 0 on a mesh? HOT 6
- Reflection Problems for Trimming HOT 15
- AttenuationDistance incorrect default value HOT 1
- [BUG] Extras data lost during load HOT 3
- Satellite image file name incorrect when the gltf file contains extra dot HOT 1
- [Question] Vertex Normals HOT 1
- [Feature request] Export image with its name rather than just the GLTF's name + number HOT 1
- Automaticaly Generate Normals HOT 1
- Expose accessor bounds
- FileLoadException in Navisworks plug-in HOT 3
- [enhancement] make LogicalBufferIndex field public in file gltf.BufferView.cs
- Use generated C# files from CodeGen HOT 6
- [Question] Mesh Vertex with UVW are exploded HOT 2
- CodeGen Tool generates JsonNode not the object itself HOT 1
- No tag for the alpha0031 release from nuget.org HOT 2
- [Questions] Some questions regarding correct procedure for reading HOT 6
- [BUG] VerifyAccessorBounds does not support component type other than FLOAT HOT 3
- Use FileStream to write json gltf HOT 5
- Mesh Extras not supporting custom encodersettings, to avoid special character serialization HOT 1
- CodeGen - Self referencing array in json schema results in stackoverflow HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharpgltf.