glTF-Transform | glTF 2.0 SDK for JavaScript TypeScript , on Web | Graphics library
kandi X-RAY | glTF-Transform Summary
kandi X-RAY | glTF-Transform Summary
glTF 2.0 SDK for JavaScript, TypeScript, and Node.js.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of glTF-Transform
glTF-Transform Key Features
glTF-Transform Examples and Code Snippets
Community Discussions
Trending Discussions on glTF-Transform
QUESTION
I am using glTF-transform to create GLB (compressed by gltf-pack), and encountered strange behavior in THREE.GLTFLoader.
I am using vertex colors and passing them this way
My pipeline looks like: Create Glb -> gltfpack -> load to THREE using gltfLoader -> mergeBufferGeometry -> render() with opacity in fragmentShader
...ANSWER
Answered 2021-Oct-04 at 18:33COLOR_0
(not COLOR
) is the expected name of the vertex color attribute – the model could have more than one vertex color set. gltfpack is "normalizing" the float32 colors, which means it replaces float32 values in [0, 1] with uint8 values in [0, 255] instead, requiring ~75% less space. three.js can support both.
QUESTION
Lets say I have 2 models with opaque materials merged in same scene. In some cases one of the model is small and in completely/partially hidden/encapsulated by large model. Eg (sphere inside a sphere). Is there a way to identify hidden parts and remove the textures related to the hidden portions so that unused textures can be removed and size be reduced?
Previously I had issues regarding merging of various models Multiple GLTF loading and Merging on server side which got solved using gltf-transform.
Just thing out if it can be optimized wrt to this area.
...ANSWER
Answered 2021-Sep-14 at 00:03The harder part of this question is deciding how to define something like "partially hidden", and then how to detect which parts of the scene meet that criteria. Commercial tools like RapidCompact will likely do a good job of this, but without them I would expect you'll need some custom work and tuning for your specific models by a technical artist.
If you can identify the unwanted meshes somehow then yes, gltf-transform could be used to remove or downscale those textures... a fairly naive implementation would look something like this:
QUESTION
I want to use the gltf-transform command "merge" in my script and wrote something like this to merge two or more gltf files.
...ANSWER
Answered 2021-Mar-24 at 01:46The @gltf-transform/cli
package you're importing isn't really designed for programmatic usage; it's just a CLI. Code meant for programmatic use is in the /lib
, /core
, and /extensions
packages.
If you'd like to implement something similar in JavaScript, I would try this instead:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install glTF-Transform
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page