# creating a good animation view file

**URL:** <https://discourse.radiance-online.org/t/creating-a-good-animation-view-file/3265>\
**Category:** radiance-general\
**Created:** [November 3, 2004, 3:53pm UTC](https://discourse.radiance-online.org/t/creating-a-good-animation-view-file/3265 "2004-11-03T15:53:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tarik\_Rahman](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/t/ba8739/32.png) [@Tarik\_Rahman](https://discourse.radiance-online.org/u/Tarik_Rahman)\
**Post date:** [November 3, 2004, 3:53pm UTC](https://discourse.radiance-online.org/t/creating-a-good-animation-view-file/3265/1 "2004-11-03T15:53:45Z")

</div>

Hi  
For creating animation viewfiles such as the massive anim.vf used in Paul  
Debevec's Rendering with Natural Light, is there a simple or easy way to come  
up with appropriate frame viewpoints and directions for say moving through a  
room and looking at different objects in the room? Or should I just stop being  
lazy and try work out some nice views?!

Tarik

> **···**
>
> --  
> Tarik Rahman  
> PhD student, Institue of Perception, Action and Behaviour  
> School of Informatics  
> University of Edinburgh

---

<div class="post-metadata">

**Author:** ![Fitzsimmons\_Rob1](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/f/e79b87/32.png) [@Fitzsimmons\_Rob1](https://discourse.radiance-online.org/u/Fitzsimmons_Rob1)\
**Post date:** [November 3, 2004, 5:34pm UTC](https://discourse.radiance-online.org/t/creating-a-good-animation-view-file/3265/2 "2004-11-03T17:34:21Z")

</div>

I use rview to do it...  
Start with you initial view, then use a series of move, pivot, aim commands  
to go to another view  
Then set that view.  
v keys.vf -t 2  
move, aim, pivot to another view  
v keys.vf -t 3  
the -t indicates how many seconds after the previous view  
You end up with a keys.vf with several keyframes  
create a text file called key.fmt  
rview -vtv -vp ${px} ${py} ${pz} -vd ${dx} ${dy} ${dz} -vu 0 0 1 \  
-vh ${vh} -vv ${vv} -vo 0 -va 0 -vs 0 -vl 0 -t ${t}  
generate a key.cal file  
rcalc -i key.fmt -e '$1=recno;$2=px;$3=py;$4=pz;$5=dx;$6=dy;$7=dz; \  
$8=vh;$9=vv;$10=t' keys.vf | tabfunc Px Py Pz Dx Dy Dz H V T \> key.cal  
then add up all your -t numbers from keys.vf and muliply that by your frames  
per second (I use an excel spreadsheet)  
In this case, I'm animating 15 fps for 36 seconds  
cnt 540 | rcalc -o key.fmt -f key.cal -f spline.cal -e 't=$1/15' -e \  
'px=s(Px);py=s(Py);pz=s(Pz);dx=s(Dx);dy=s(Dy);dz=s(Dz);vh=s(H);vv=s(V)' \>  
anim.vf

If I were to animate at 30 fps,  
it'd be  
cnt 1080 | rcalc -o key.fmt -f key.cal -f spline.cal -e 't=$1/30' -e \  
'px=s(Px);py=s(Py);pz=s(Pz);dx=s(Dx);dy=s(Dy);dz=s(Dz);vh=s(H);vv=s(V)' \>  
anim.vf

Use anim.vf in a ranimate file

Good luck!  
Rob

BTW thanks to Rob G and Alexa for the help with my Source 4 spotlight

> **···**
>
> -----Original Message-----  
> From: Tarik Rahman  
> To: Radiance general discussion  
> Sent: 11/3/2004 7:53 AM  
> Subject: [Radiance-general] creating a good animation view file
> 
> Hi  
> For creating animation viewfiles such as the massive anim.vf used in  
> Paul  
> Debevec's Rendering with Natural Light, is there a simple or easy way to  
> come  
> up with appropriate frame viewpoints and directions for say moving  
> through a  
> room and looking at different objects in the room? Or should I just stop  
> being  
> lazy and try work out some nice views?!
> 
> Tarik  
> --  
> Tarik Rahman  
> PhD student, Institue of Perception, Action and Behaviour  
> School of Informatics  
> University of Edinburgh
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> Radiance-general mailing list  
> [Radiance-general@radiance-online.org](mailto:Radiance-general@radiance-online.org)  
> [http://www.radiance-online.org/mailman/listinfo/radiance-general](http://www.radiance-online.org/mailman/listinfo/radiance-general)

---

<div class="post-metadata">

**Author:** ![Fitzsimmons\_Rob1](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/f/e79b87/32.png) [@Fitzsimmons\_Rob1](https://discourse.radiance-online.org/u/Fitzsimmons_Rob1)\
**Post date:** [November 5, 2004, 5:23pm UTC](https://discourse.radiance-online.org/t/creating-a-good-animation-view-file/3265/3 "2004-11-05T17:23:13Z")

</div>

Tarik  
Sorry, I left out the -vo 0 and -va 0  
key.fmt should be (all on one line)  
rview -vtv -vp \{px\} {py} \{pz\} \-vd {dx} \{dy\} {dz} -vu 0 0 1 -vh \{vh\} \-vv {vv} -vo 0 -va 0 -vs 0 -vl 0 -t ${t}

the key.cal should look something like this  
Px(x):select(x,-64.7853,-50.0121,-9.8244,10.185,10.185,11,  
18.1985,67.4101,49.2971,33.793);  
Py(x):select(x,-33.2456,4.54799,10.7872,10.5673,10.5673,  
16.8863,15.6925,16.8799,-1.30873,-7.31969);  
Pz(x):select(x,12,13,9.5,9.5,9.5,9.5,10.5478,10.5,9.59094,  
10.1661);  
Dx(x):select(x,0.844167,0.897459,0.970004,0.839548,-0.245395,  
-0.845484,-0.990763,-0.913368,0.956497,0.800968);  
Dy(x):select(x,0.500454,0.404528,0.226646,-0.54133,-0.968567,  
-0.531364,-0.0175715,0.0300529,0.28554,0.587995);  
Dz(x):select(x,-0.192164,-0.17585,-0.0878825,-0.046062,  
-0.0407428,-0.0529912,-0.134459,-0.406025,-0.0598303,-0.112747);  
H(x):select(x,50,50,50,50,50,50,50,50,50,50);  
V(x):select(x,50,50,50,50,50,50,50,50,50,50);  
T(x):select(x,1,3,6,3,2,2,2,5,3,5);

Rob

> **···**
>
> -----Original Message-----  
> From: Tarik Rahman  
> To: Rob.Fitzsimmons@Summit.Fiserv.com  
> Sent: 11/5/2004 6:46 AM  
> Subject: RE: [Radiance-general] creating a good animation view file
> 
> Hi Rob  
> Thanks very much for your help.  
> When I get to  
> ./cnt 435 | ./rcalc -o key.fmt -f key.cal -f spline.cal -e 't=$ 1/15'  
> -e  
> 'px=s(Px);py=s(Py);pz=s(Pz);dx=s(Dx);dy=s(dy);dz=s(Dz);vh=s(H);vv=s(V)'
> 
> > 
> 
> animate.vf
> 
> I get this error
> 
> key.cal, line 1:  
> Px(x):select(1,);  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^ unexpected character
> 
> here is my key.cal as you specified  
> more key.cal  
> Px(x):select(1,);  
> Py(x):select(1,);  
> Pz(x):select(1,);  
> Dx(x):select(1,);  
> Dy(x):select(1,);  
> Dz(x):select(1,);  
> H(x):select(1,);  
> V(x):select(1,);  
> T(x):select(1,);
> 
> Do you know what the problem is?
> 
> Thanks
> 
> Tarik
> 
> Quoting "Fitzsimmons, Rob" \<Rob.Fitzsimmons@Summit.Fiserv.com\>:
> 
> > I use rview to do it...  
> > Start with you initial view, then use a series of move, pivot, aim
> 
> commands
> 
> > to go to another view  
> > Then set that view.  
> > v keys.vf -t 2  
> > move, aim, pivot to another view  
> > v keys.vf -t 3  
> > the -t indicates how many seconds after the previous view  
> > You end up with a keys.vf with several keyframes  
> > create a text file called key.fmt  
> > rview -vtv -vp \{px\} {py} \{pz\} \-vd {dx} \{dy\} {dz} -vu 0 0 1 \  
> > -vh \{vh\} \-vv {vv} -vo 0 -va 0 -vs 0 -vl 0 -t ${t}  
> > generate a key.cal file  
> > rcalc -i key.fmt -e '$1=recno;$2=px;$3=py;$4=pz;$5=dx;$6=dy;$7=dz; \  
> > $8=vh;$9=vv;$10=t' keys.vf | tabfunc Px Py Pz Dx Dy Dz H V T \> key.cal  
> > then add up all your -t numbers from keys.vf and muliply that by your
> 
> frames
> 
> > per second (I use an excel spreadsheet)  
> > In this case, I'm animating 15 fps for 36 seconds  
> > cnt 540 | rcalc -o key.fmt -f key.cal -f spline.cal -e 't=$1/15' -e \
> 
> 'px=s(Px);py=s(Py);pz=s(Pz);dx=s(Dx);dy=s(Dy);dz=s(Dz);vh=s(H);vv=s(V)'
> 
> > anim.vf
> > 
> > If I were to animate at 30 fps,  
> > it'd be  
> > cnt 1080 | rcalc -o key.fmt -f key.cal -f spline.cal -e 't=$1/30' -e \
> 
> 'px=s(Px);py=s(Py);pz=s(Pz);dx=s(Dx);dy=s(Dy);dz=s(Dz);vh=s(H);vv=s(V)'
> 
> > anim.vf
> > 
> > Use anim.vf in a ranimate file
> > 
> > Good luck!  
> > Rob
> > 
> > BTW thanks to Rob G and Alexa for the help with my Source 4 spotlight
> > 
> > -----Original Message-----  
> > From: Tarik Rahman  
> > To: Radiance general discussion  
> > Sent: 11/3/2004 7:53 AM  
> > Subject: [Radiance-general] creating a good animation view file
> > 
> > Hi  
> > For creating animation viewfiles such as the massive anim.vf used in  
> > Paul  
> > Debevec's Rendering with Natural Light, is there a simple or easy way
> 
> to
> 
> > come  
> > up with appropriate frame viewpoints and directions for say moving  
> > through a  
> > room and looking at different objects in the room? Or should I just
> 
> stop
> 
> > being  
> > lazy and try work out some nice views?!
> > 
> > Tarik  
> > --  
> > Tarik Rahman  
> > PhD student, Institue of Perception, Action and Behaviour  
> > School of Informatics  
> > University of Edinburgh
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Radiance-general mailing list  
> > Radiance-general@radiance-online.org  
> > [http://www.radiance-online.org/mailman/listinfo/radiance-general](http://www.radiance-online.org/mailman/listinfo/radiance-general)
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Radiance-general mailing list  
> > Radiance-general@radiance-online.org  
> > [http://www.radiance-online.org/mailman/listinfo/radiance-general](http://www.radiance-online.org/mailman/listinfo/radiance-general)
> 
> --  
> Tarik Rahman  
> PhD student, Institue of Perception, Action and Behaviour  
> School of Informatics  
> University of Edinburgh

---

<div class="post-metadata">

**Author:** ![Tarik\_Rahman](https://discourse.radiance-online.org/letter_avatar_proxy/v4/letter/t/ba8739/32.png) [@Tarik\_Rahman](https://discourse.radiance-online.org/u/Tarik_Rahman)\
**Post date:** [November 5, 2004, 7:46pm UTC](https://discourse.radiance-online.org/t/creating-a-good-animation-view-file/3265/4 "2004-11-05T19:46:05Z")

</div>

I think that's what you had before because I have the same error. I have my  
keys.vf file but where does that come into when processing the frames because  
in all the commands you've written below, none of them use keys.vf. Or am I  
just being stupid and missing a simple point here?

Tarik

Quoting "Fitzsimmons, Rob" \<Rob.Fitzsimmons@Summit.Fiserv.com\>:

> **···**
>
> > Tarik  
> > Sorry, I left out the -vo 0 and -va 0  
> > key.fmt should be (all on one line)  
> > rview -vtv -vp \{px\} {py} \{pz\} \-vd {dx} \{dy\} {dz} -vu 0 0 1 -vh \{vh\} \-vv {vv} -vo 0 -va 0 -vs 0 -vl 0 -t ${t}
> > 
> > the key.cal should look something like this  
> > Px(x):select(x,-64.7853,-50.0121,-9.8244,10.185,10.185,11,  
> > 18.1985,67.4101,49.2971,33.793);  
> > Py(x):select(x,-33.2456,4.54799,10.7872,10.5673,10.5673,  
> > 16.8863,15.6925,16.8799,-1.30873,-7.31969);  
> > Pz(x):select(x,12,13,9.5,9.5,9.5,9.5,10.5478,10.5,9.59094,  
> > 10.1661);  
> > Dx(x):select(x,0.844167,0.897459,0.970004,0.839548,-0.245395,  
> > -0.845484,-0.990763,-0.913368,0.956497,0.800968);  
> > Dy(x):select(x,0.500454,0.404528,0.226646,-0.54133,-0.968567,  
> > -0.531364,-0.0175715,0.0300529,0.28554,0.587995);  
> > Dz(x):select(x,-0.192164,-0.17585,-0.0878825,-0.046062,  
> > -0.0407428,-0.0529912,-0.134459,-0.406025,-0.0598303,-0.112747);  
> > H(x):select(x,50,50,50,50,50,50,50,50,50,50);  
> > V(x):select(x,50,50,50,50,50,50,50,50,50,50);  
> > T(x):select(x,1,3,6,3,2,2,2,5,3,5);
> > 
> > Rob
> > 
> > -----Original Message-----  
> > From: Tarik Rahman  
> > To: Rob.Fitzsimmons@Summit.Fiserv.com  
> > Sent: 11/5/2004 6:46 AM  
> > Subject: RE: [Radiance-general] creating a good animation view file
> > 
> > Hi Rob  
> > Thanks very much for your help.  
> > When I get to  
> > ./cnt 435 | ./rcalc -o key.fmt -f key.cal -f spline.cal -e 't=$ 1/15'  
> > -e  
> > 'px=s(Px);py=s(Py);pz=s(Pz);dx=s(Dx);dy=s(dy);dz=s(Dz);vh=s(H);vv=s(V)'  
> > \>  
> > animate.vf
> > 
> > I get this error
> > 
> > key.cal, line 1:  
> > Px(x):select(1,);  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^ unexpected character
> > 
> > here is my key.cal as you specified  
> > more key.cal  
> > Px(x):select(1,);  
> > Py(x):select(1,);  
> > Pz(x):select(1,);  
> > Dx(x):select(1,);  
> > Dy(x):select(1,);  
> > Dz(x):select(1,);  
> > H(x):select(1,);  
> > V(x):select(1,);  
> > T(x):select(1,);
> > 
> > Do you know what the problem is?
> > 
> > Thanks
> > 
> > Tarik
> > 
> > Quoting "Fitzsimmons, Rob" \<Rob.Fitzsimmons@Summit.Fiserv.com\>:
> > 
> > \> I use rview to do it...  
> > \> Start with you initial view, then use a series of move, pivot, aim  
> > commands  
> > \> to go to another view  
> > \> Then set that view.  
> > \> v keys.vf -t 2  
> > \> move, aim, pivot to another view  
> > \> v keys.vf -t 3  
> > \> the -t indicates how many seconds after the previous view  
> > \> You end up with a keys.vf with several keyframes  
> > \> create a text file called key.fmt  
> > \> rview -vtv -vp \{px\} {py} \{pz\} \-vd {dx} \{dy\} {dz} -vu 0 0 1 \  
> > \> -vh \{vh\} \-vv {vv} -vo 0 -va 0 -vs 0 -vl 0 -t ${t}  
> > \> generate a key.cal file  
> > \> rcalc -i key.fmt -e '$1=recno;$2=px;$3=py;$4=pz;$5=dx;$6=dy;$7=dz; \  
> > \> $8=vh;$9=vv;$10=t' keys.vf | tabfunc Px Py Pz Dx Dy Dz H V T \> key.cal  
> > \> then add up all your -t numbers from keys.vf and muliply that by your  
> > frames  
> > \> per second (I use an excel spreadsheet)  
> > \> In this case, I'm animating 15 fps for 36 seconds  
> > \> cnt 540 | rcalc -o key.fmt -f key.cal -f spline.cal -e 't=$1/15' -e \  
> > \>  
> > 'px=s(Px);py=s(Py);pz=s(Pz);dx=s(Dx);dy=s(Dy);dz=s(Dz);vh=s(H);vv=s(V)'  
> > \>  
> > \> anim.vf  
> > \>  
> > \> If I were to animate at 30 fps,  
> > \> it'd be  
> > \> cnt 1080 | rcalc -o key.fmt -f key.cal -f spline.cal -e 't=$1/30' -e \  
> > \>  
> > 'px=s(Px);py=s(Py);pz=s(Pz);dx=s(Dx);dy=s(Dy);dz=s(Dz);vh=s(H);vv=s(V)'  
> > \>  
> > \> anim.vf  
> > \>  
> > \> Use anim.vf in a ranimate file  
> > \>  
> > \> Good luck!  
> > \> Rob  
> > \>  
> > \> BTW thanks to Rob G and Alexa for the help with my Source 4 spotlight  
> > \>  
> > \> -----Original Message-----  
> > \> From: Tarik Rahman  
> > \> To: Radiance general discussion  
> > \> Sent: 11/3/2004 7:53 AM  
> > \> Subject: [Radiance-general] creating a good animation view file  
> > \>  
> > \>  
> > \> Hi  
> > \> For creating animation viewfiles such as the massive anim.vf used in  
> > \> Paul  
> > \> Debevec's Rendering with Natural Light, is there a simple or easy way  
> > to  
> > \> come  
> > \> up with appropriate frame viewpoints and directions for say moving  
> > \> through a  
> > \> room and looking at different objects in the room? Or should I just  
> > stop  
> > \> being  
> > \> lazy and try work out some nice views?!  
> > \>  
> > \> Tarik  
> > \> --  
> > \> Tarik Rahman  
> > \> PhD student, Institue of Perception, Action and Behaviour  
> > \> School of Informatics  
> > \> University of Edinburgh  
> > \>  
> > \> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > \> Radiance-general mailing list  
> > \> Radiance-general@radiance-online.org  
> > \> [http://www.radiance-online.org/mailman/listinfo/radiance-general](http://www.radiance-online.org/mailman/listinfo/radiance-general)  
> > \>  
> > \> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > \> Radiance-general mailing list  
> > \> Radiance-general@radiance-online.org  
> > \> [http://www.radiance-online.org/mailman/listinfo/radiance-general](http://www.radiance-online.org/mailman/listinfo/radiance-general)  
> > \>
> > 
> > --  
> > Tarik Rahman  
> > PhD student, Institue of Perception, Action and Behaviour  
> > School of Informatics  
> > University of Edinburgh
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
> > Radiance-general mailing list  
> > Radiance-general@radiance-online.org  
> > [http://www.radiance-online.org/mailman/listinfo/radiance-general](http://www.radiance-online.org/mailman/listinfo/radiance-general)
> 
> --  
> Tarik Rahman  
> PhD student, Institue of Perception, Action and Behaviour  
> School of Informatics  
> University of Edinburgh
