Comments (6)
I'ts hard to tell without knowing more about what you're doing.
could you provide a reproducible example?
from sharpgltf.
I'ts hard to tell without knowing more about what you're doing.
could you provide a reproducible example?
Looking at the raw model file it seems like at some meshes the delta on all vertexes is 0. I assume then the library just clears the morph targets list if none of them change anything in the mesh?
from sharpgltf.
I assume then the library just clears the morph targets list if none of them change anything in the mesh?
Yes, that is the case, see
SharpGLTF/src/SharpGLTF.Toolkit/Geometry/Packed/_PrimitiveHelpers.cs
Lines 48 to 49 in 681b03b
Now, I am wondering whether this is right or not. From the data perspective, it's a waste of resources to add an effect-less morph target, but not adding it changes the morph targets sequence indexing so it can result in incorrect morph target assignment and animation...
But it also depends on how are you using this...
from sharpgltf.
I assume then the library just clears the morph targets list if none of them change anything in the mesh?
Yes, that is the case, see
SharpGLTF/src/SharpGLTF.Toolkit/Geometry/Packed/_PrimitiveHelpers.cs
Lines 48 to 49 in 681b03b
Now, I am wondering whether this is right or not. From the data perspective, it's a waste of resources to add an effect-less morph target, but not adding it changes the morph targets sequence indexing so it can result in incorrect morph target assignment and animation...
But it also depends on how are you using this...
The model format of the game requires that all meshes have the same amount of morph targets. It's not too hard to work around it by just adding zeroed out morphs though
from sharpgltf.
I assume then the library just clears the morph targets list if none of them change anything in the mesh?
Yes, that is the case, see
SharpGLTF/src/SharpGLTF.Toolkit/Geometry/Packed/_PrimitiveHelpers.cs
Lines 48 to 49 in 681b03b
Now, I am wondering whether this is right or not. From the data perspective, it's a waste of resources to add an effect-less morph target, but not adding it changes the morph targets sequence indexing so it can result in incorrect morph target assignment and animation...
But it also depends on how are you using this...
Maybe it could potentially be an optional flag? As I said it's not too hard to work around if such behavior is expected but it's also not really mentioned anywhere that this would happen. Don't know how GLTF standard dictates this though
from sharpgltf.
Don't know how GLTF standard dictates this though
Well, generally speaking, glTF specification does not like adding stuff that has "no effect" into the rendering... in fact, the gltf validator issues warnings if you do stuff like adding a mesh that is never used in the scene and so on
from sharpgltf.
Related Issues (20)
- 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
- Should SharpGLTF throw an exception when an unsupported extension is required? HOT 5
- [Feature Request] Switch to using System.IO.Abstractions for file logic HOT 1
- [BUG] Unable to retrieve vertices from morph target when using SceneBuilder HOT 1
- Support for EXT_meshopt_compression HOT 1
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.