-
Notifications
You must be signed in to change notification settings - Fork 189
Spinning Cube Won't Animate in Three.js and No Materials #10
Comments
@pweingar — testing your model here, I do see the animation: https://gltf-viewer.donmccurdy.com/. You may need to use a more recent version of THREE.GLTF2Loader (which in turn may require the Regarding the material, see the discussion here: #8. At minimum, you will probably want to set one of the experimental "common materials" options before export. |
I am closing this issue, as it is not an issue with the Blender glTF 2.0 exporter: A glTF 2.0 scene is valid, even it does not have any material assigned. As Don mentioned, you can enable the experimental common materials export. The export works fine and is just mentioned experimental, as the extension is not 100% finalized: What happened in your case: |
And a side note @pweingar — if you are rendering with three.js, it does indeed support PBR. |
I tried the dev branch of Three.js yesterday afternoon, and it did indeed fix my animation problem. I'll give the PBR material a try next. Thanks for your assistance. |
I am trying to test out creating animated objects in Blender and exporting them to GLTF to use in WebVR scenes, but I am having two problems with the export. I created a simple spinning cube by adding an animation to the default cube and setting up a simple colored material. When I export this to GLTF and try to load it into a Three.js test web-page, the cube does not have its material applied and does not spin. If I add another object to the scene (say a plane), the cube will spin but is still not textured. When I examine the GLTF files, I see animation tags in both cases... but I do not see material tags in either case.
I do not know if I am setting things up wrong in Blender, the export, or if my JavaScript is wrong. I am attaching the GLTF and Blender files for both cases as well as the HTML file for the test harness.
SpinCube.zip
The text was updated successfully, but these errors were encountered: