简体   繁体   English

AR.js和A框架的模型问题

[英]Model issues with AR.js and A-frame

So I am working on a tutorial with A-frame and AR.js, and I've just copied in the code and subbed in my own model but the model will not load into the scene, I've played around with the scale and lighting of the model in Blender to try different sizes and configurations but the model will just not load in. I've been having a hard time figuring out how to format the model because I am certain the problem is with my model because the code works fine. 因此,我正在使用A-frame和AR.js编写教程,我只是复制了代码并嵌入了自己的模型中,但是该模型不会加载到场景中,因此我一直在研究比例尺和在Blender中点亮模型以尝试不同的大小和配置,但模型不会加载。我一直很难弄清楚如何格式化模型,因为我确定问题出在我的模型上,因为代码可以工作精细。

Does anyone know how to troubleshoot/modify models so that they will actually load in? 有谁知道如何对模型进行故障排除/修改,以便将其实际加载?

Here's the code with my not-working model for reference, Thanks in advance! 这是我无法正常工作的模型的代码,以供参考,谢谢!

 <script src="https://aframe.io/releases/0.8.0/aframe.min.js"></script> <script src="https://jeromeetienne.github.io/AR.js/aframe/build/aframe-ar.js"></script> <body style='margin : 0px; overflow: hidden;'> <a-scene embedded arjs> <a-gltf-model src="https://cdn.rawgit.com/3164255/AR_TEST/master/ROCK_TEST_2.gltf" scale="1 1 1"></a-> <a-marker-camera preset='hiro'></a-marker-camera> </a-scene> </body> 

Your glTF file calls for a .bin file that's not present in the same folder. 您的glTF文件需要一个不在同一个文件夹中的.bin文件。 Specifically, on line 112 , it asks for a file named buffer_ROCK_TEST_2.bin , but this file isn't present. 具体来说,在第112行 ,它要求一个名为buffer_ROCK_TEST_2.bin的文件,但是该文件不存在。

glTF files typically come in two forms. glTF文件通常以两种形式出现。 The *.gltf form is a plain-text JSON formatted file that often refers to external files such as .bin , .jpg , and .png files. *.gltf格式是纯文本JSON格式的文件,通常引用外部文件,例如.bin.jpg.png文件。 The mesh data is all stored in the bin file, and the model cannot render without it. 网格数据全部存储在bin文件中,如果没有该模型,则无法渲染模型。

The other form of glTF is stored in a .glb file. glTF的另一种形式存储在.glb文件中。 This is a binary bundle that includes the JSON and images and mesh data all in a single file. 这是一个二进制捆绑包,在一个文件中包含JSON和图像以及网格数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM