Cinema 4D 导出 GLTF 动画到 Three.js 引擎

  1. 参考 eyedesyn 频道,基于 JointPose Mogph 制作关键帧动画:

  1. R20/R21 下载并安装 https://labs.maxon.net/?p=3360 里官方的 GLTF Exporter(R22 已内置)

  1. 导出 gltf/glb 格式,设置如下:

  1. 创建html,代码如下
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>C4D - Aframe</title>
    <script src="https://cdn.jsdelivr.net/npm/aframe@1.0.4/dist/aframe-master.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/donmccurdy/aframe-extras@v6.1.0/dist/aframe-extras.min.js"></script>
</head>
<body>
    <a-scene background="color: #eee">
        <a-assets>
            <a-asset-item id="model" src="./model/my_model.glb"></a-asset-item>
        </a-assets>
        <a-entity rotation="10 0 0">
            <!-- <a-entity gltf-model="#model" scale="1 1 1" animation="property: rotation; to: 0 360 0; dur: 2000; easing: linear; loop: true"></a-entity> -->
            <a-entity gltf-model="#model" scale="1 1 1" animation-mixer="loop: pingpong"></a-entity>
        </a-entity>
        <a-entity camera look-controls wasd-controls position="0 0 5"></a-entity>
    </a-scene>
</body>
</html>