我想加载实体以进行动画处理 [英] I Want To Load Entity To Animate

查看:145
本文介绍了我想加载实体以进行动画处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用AFrame 0.8.2。我想使用FBX格式加载动画模型。

I am using AFrame 0.8.2 . I Want to load an animated model using like FBX Format.

我尝试了所有格式,但是没有用。我导入了带有动画的JSON模型,它可以工作,但是很难获得JSON模型。所以我想加载FBX模型。在这里,我的鳕鱼 GLITCH 。请编辑故障代码并提供解决方案。

I tried all formats but its not working . I Imported JSON model with animation ,It Worked But its Hard to get JSON Model. So I want to Load FBX Model . Here My Cod eIn GLITCH . Please Edit The Code In Glitch And Provide A Solution .

    <a-scene embedded arjs='sourceType: webcam;'>

    <a-marker preset='hiro'>

      <a-entity fbx-model="src: url(https://cdn.glitch.com/c7db968f-5d83-44e4-a392-a5c98687035a%2FNeck_Mech_Walker_by_3DHaupt-(FBX%207.4%20binary%20mit%20Animation).fbx?v=1562244268522);" >
    </a-entity>

    </a-marker>

    <a-entity camera></a-entity>
  </a-scene>

当我执行此代码并悬停HIRO Pattern时,我看不到任何模型。

When I execute this code and hover HIRO Pattern then i am not able to see any model .

感谢提前。

推荐答案

在glitch.com中使用模型有点棘手,因为 assets 文件夹不是单个目录。

Using models with glitch.com is a bit tricky, because the assets folder is not a single directory.

如您所见,您的 .fbx 模型具有一些纹理。

As you can see, your .fbx model has some textures lying around. It means it has some mappings to the texture files.

如果将fbx模型转换为 .gltf ,则表示您对纹理文件有一些映射。可以手动更改这些映射。只需找到:

-纹理文件路径

- .bin 路径

.gltf 文件,并将其更改为来自故障资产的链接。



否则,您需要在本地提供模型或将其上传到github。


这应该是另一个问题,但是:

-模型动画是通过动画混合器

If you convert the fbx model to a .gltf you can change those mappings manually. Just find the:
- texture file paths
- .bin path
in the .gltf file, and change them into links from the glitch assets.


Otherwise you'd need to serve the model locally or upload it to github.
This should be in another question but:
- model animations are handled with the animation-mixer

<a-entity gltf-model="#my-model" animation-mixer="clip: animation-name"></a-entity>

-使用声音组件

<a-entity sound="src: url(music.mp3); autoplay: true"></a-entity>



具有动画模型的故障此处。尽管枢轴出了点问题,但它肯定会加载模型并播放动画


Glitch with an animated model here. Though somethings wrong with the pivot, it definitely loads a model and plays the animation

这篇关于我想加载实体以进行动画处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆