glTF | glTF – Runtime 3D Asset Delivery | iOS library
kandi X-RAY | glTF Summary
kandi X-RAY | glTF Summary
glTF (GL Transmission Format) is a royalty-free specification for the efficient transmission and loading of 3D scenes and models by applications. glTF minimizes both the size of 3D assets, and the runtime processing needed to unpack and use those assets. glTF defines an extensible, common publishing format for 3D content tools and services that streamlines authoring workflows and enables interoperable use of content across the industry.
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
glTF Key Features
glTF Examples and Code Snippets
Community Discussions
Trending Discussions on glTF
QUESTION
I'm using a PlaneGeometry
as water, and have added a ship (gltf model) on it. Problem is, when the boat slightly rests into the water, the water is shown inside the boat, even though the boat is afloat. Is there a way to clip the water when a boat (or other models/objects) intersect with it with motion?
ANSWER
Answered 2022-Mar-14 at 05:40Effect of floating is made with sin function, applied to y-coordinate. You can use the same principle to make gltf model(ship) move on any coordinate axis.
Example:
QUESTION
I tried to export GLTF model from Blender to Three.js. It works. But I have some artifacts on Three.js with lighting and painting. I have lines and squares in Three.js and I don't know why.
I used only Principled BSDF node in Blender to painting my model. If I set material in Three.js (MeshPhongMaterial) it works fine. But not with Principled BSDF node from Blender. Any ideas?
I'm trying to make the object cast a shadow and react to the lighting. This works well with MeshPhongMaterial and with Principled BSDF. But in the second option, I don't like these black stripes.
...ANSWER
Answered 2022-Mar-14 at 12:12The usual approach to mitigate self-shadowing artifacts is to modulate the bias
property of your shadow-casting light. Try it with:
QUESTION
In this minimal react-three-fiber App I am trying to load and include the same GLTF model twice:
...ANSWER
Answered 2021-Aug-18 at 09:33I am not an expert on three.js
, just based on what I find and try to answer your questions.
1. Only one eye is shown even there is 2 primitives defined
If you import the same model by using useGLTF()
, it will refer to the same object. Therefore, the 2 primitives are pointing to the same gltf and only last/one config is applied.
QUESTION
I'm trying to load a remote asset (.glb or .gltf) into the ModelViewer
in filament. The Google Filament sample-gltf-viewer shows a RemoteServer
object but I'm not seeing how I can load a remote asset from a URL (e.g. https://github.com/kelvinwatson/glb-files/raw/main/DamagedHelmet.glb)
I've tried the below but I get "Unable to parse glb file".
The code for RemoteServer doesn't indicate where we can pass a URL.
...ANSWER
Answered 2022-Feb-24 at 20:21Issue has been resolved. The issue was that I wasn't fully downloading the file, and that the modelViewer.loadModelGlb
needed to be called on the main thread.
Here is the working code:
QUESTION
Structure of my project 66% threejs model, 44% html (side control) using Bootstrap. I’m trying to make mouse picker, when pointing at an object so that it is shown on which object it is pointed. As I understand it, he sees the coordination of the mouse badly. Please help me figure out and set up the correct coordination mouse with Canvas.
Code:
...ANSWER
Answered 2022-Feb-22 at 09:34I suggest you use pointermove
instead of mousemove
and also use getBoundingClientRect()
in your event listener:
QUESTION
ANSWER
Answered 2022-Feb-03 at 22:05Load the texture, apply the texture to the object you want, then add the model to the scene:
QUESTION
I am stuck at this, I need to generate thumbnails from glb or gltf file to display it in the web browser, so the only active image will be original gltf files and others will be just thumbnails in the gallery, I tried to search it on every forum but I didn't get any idea or solution
...ANSWER
Answered 2022-Jan-25 at 07:48You can load your glb or gltf file into a WebGLRenderer (three.js) and than read the canvas with
QUESTION
I have a problem adding a Bounding Box from an object in a different module. Right now, it is working fine as long as I write everything in my main function, but as soon as I create my function in a different file, and import in in the main file, it's not working anymore.
The error code I get :
...ANSWER
Answered 2022-Jan-24 at 08:15I believe the problem is that I can't create the Bounding Boxes in a separate file, because it needs to be added to the scene in World.js.
Not so. Since a constructed THREE.Mesh
has a shape with extents (from its geometry) and a transform (by default, translated to the origin, with no scaling or rotation), Three.js can and will determine a bounding box from that information as though the mesh were in the scene. I've posted a demo of this on CodePen.
Nor should defining the object in one file and referencing it another make any difference, as long as the object is in scope and initialized at the time it's bound to.
Here, I suspect that you're assigning boule1Obj, boule2Obj, and boule3Obj in World.js. In that case, the imported function is being hoisted before the variables are assigned, and the function is seeingbinding to them as unassignedundefined
.
Try changing camCollision()
to accept the bouleXObj
s as arguments.
QUESTION
I have an AnimationMixer and I wanted to attach some logic to the end of the animation.
As the documentation instructs - I used addEventListener on the mixer, and it worked fine,
BUT when I tried to remove the listener it didn't work.
(I also tried to see if hasEventListener works, but no luck.)
In short-
The log for addEventListener is working
but removeEventListener and hasEventListener do not.
What am I missing? I could not find any explanations for this.
Would appreciate any help...
ANSWER
Answered 2022-Jan-07 at 17:05RemoveEventListener() accepts a second argument to know which event to remove, but that function doesn’t get triggered on removal. Plus, it should be the same function each time, not a new one:
QUESTION
I exported a default cube from Blender 3.0 to gltf+bin. I try to draw it in pure WebGL.
It is just a very simple example. You will see magic numbers in this example like:
...ANSWER
Answered 2021-Dec-14 at 09:38The indices appear to be 16-bit integers instead of 8-bit integers:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install glTF
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