Setting and moving the camera

December 27, 2013

The camera view of MMDAgent can be handled in several ways. At any time, you can see where the camera is focused by pressing the “D” key, and the current focus point will be shown as an orange cube in the scene.

focus_orange_cube

  1. Use the mouse to manually change the camera view:
    • A drag will rotate the view.
    • A drag with “Shift” key will translate the view.
    • Spinning the mouse wheel will change distance from the focus point (zoom in/out).
    • Spinning the mouse wheel while pressing the “Ctrl+Shift” keys will change the fovy (field of view, y).
  2. Use a CAMERA command in the dialog script (.fst) to define a set of camera parameters. The arguments should be given in the format described below, i.e., in the same order and values as in the article “Viewing Log Information,” except for the last argument:
      CAMERA|x,y,z|rx,ry,rz|distance|fovy|time

    Here, “time” is the number of seconds required to move the camera to the specified parameters. A value of “0” will set the parameters immediately, and “−1” will perform a smooth movement.

  3. You can provide a camera motion file (.vmd) created using “MikuMikuDance” to move the camera as programmed:
      CAMERA|camera_motion.vmd

=== Japanese ========================================

カメラ視点を複数の方法で制御することができます.「D」キーを押すことで,カメラの焦点がどこにあるかをシーン内にオレンジの立方体として表示させることができます.

focus_orange_cube

  1. マウスを使って手動でカメラ視点を変更できます.
    • ドラッグで回転
    • 「Shift」キー+ドラッグで平行移動
    • マウスホイールで焦点からの距離を変更(ズームイン・アウト)
    • 「Ctrl+Shift」キー+マウスホイールで画角の調整
  2. 音声対話スクリプト (.fst) 上でCAMERAコマンドでカメラのパラメータを指定できます.「Viewing Log Information」で説明したログの左下の数字を以下のようにオプションとして与えます.
      CAMERA|x座標,y座標,z座標|回転のx成分,y成分,z成分|距離|視野角|所要時間

    最後の所要時間は変更にかける長さ(秒)です.0で即座に変更します.-1を与えるとでスムーズにパラメータが変化します.

  3. MikuMikuDanceで作成したカメラモーションをCAMERAコマンドで与えることでカメラを動かすことができます.
      CAMERA|カメラモーション.vmd

CC-BY-NC Copyright 2009-2013 Nagoya Institute of Technology (MMDAgent Model “Mei”)

Advertisements