Translation animation

11 сентября 2012 - Админ

    You can define a camera path using clock. To do so, the Ini file and the POV file have to be changed. Instead of the camera rotation you can change the camera location using the clock parameter. In the following example we change the POV file of the first example. The Ini is already changed. The POV file will be changed by adding the clock variable to the X position of the camera location.

#declare GAMMA=1.4;
#declare AMBIENTLIGHT=0.0;
#declare LIGHTCORRECTIONVALUE=1.0;
#declare CAMLOCATION=<1.23+clock*11,1.15,3.11>;
#declare CAMLOOKAT=<12.4,1.5,-1.0>;

    In DIALux the 3D view was turned in that way to enable the camera path to go through the whole room. In the beginning clock=0, that means the position X is 1.23m. Clock will be counted up in 25 steps from 0 to 1(value from the Ini file). The X position of the camera changes from 1.23m in the first step to 1.23m + 1/25 x 11m = 1.67m in the second step. The last X position is 1.23m + 25/25 x 11m = 12.23m.
    The clock variable can be used a number of times in one file. It can be used for translation and rotation in the same animation. So the camera moves along a path turning the viewing direction around its up axis. For example:

#declare GAMMA=1.4;
#declare AMBIENTLIGHT=0.0;
#declare LIGHTCORRECTIONVALUE=1.0;
#declare CAMLOCATION=<1.18+clock*11,1.15,3.13>;
#declare CAMLOOKAT=<12.4,1.56,-1.02>;

global_settings
{
  ambient_light AMBIENTLIGHT
  assumed_gamma GAMMA
  tonemapper
  {
    low_value 1e-005
    high_value 0.8
  }
}

camera
{
  location CAMLOCATION
  right <1.33333,0,0>
  up <0,1,0>
  sky <0,1,0>
  angle 77
  look_at CAMLOOKAT
  translate -CAMLOCATION
  rotate<0,180*clock,0>
  translate CAMLOCATION
}

    In this example the rotation is reduced to 180 degree and it is added to the POV file which already includes the movement of the camera.

Movement of the camera
    Fig. 467 Movement of the camera

Рейтинг: 0 Голосов: 0 3313 просмотров
Комментарии (0)