[Radiance-general] Re: how to specify the animation path
Greg Ward
[email protected]
Wed, 27 Nov 2002 10:04:58 -0800
Hi Gurneet,
There really needs to be a FAQ on generating animation paths. Peter
Apian-Bennewitz wrote a program called rshow that may be used to
interactively walk through a space using OpenGL rendering, and has
options for storing keyframes and generating view sequences, which may
then be rendered in batch mode or using ranimate.
I often choose keyframes myself in rview (or the new rholo program),
utilizing the "view" or 'V' commands to output views at desired points
along the animation path. These may then be constructed into a path
using a spline generator or the spline.cal program that may be found in
ray/src/cal/cal in the radiance distribution. You take the views
output by rview or rholo, which look like so (these are not commands --
they are views stored by rview into a file):
rview -vtv -vp 5.46 15.5 4.2 -vd 0.91674 0.347628 -0.196833 -vu 0 0 1
-vh 60 -vv 49 -vs 0 -vl 0 -t 1
rview -vtv -vp 10.5 15.6 4.2 -vd 0.9896 -0.1408 -0.0294619 -vu 0 0 1
-vh 60 -vv 49 -vs 0 -vl 0 -t 2
rview -vtv -vp 20.4 13.7 4.2 -vd 0.680414 -0.680414 -0.272166 -vu 0 0 1
-vh 60 -vv 49 -vs 0 -vl 0 -t 4
The -t options at the end were added manually, indicating the expected
distance (in seconds) between the previous frame and this one. These
options may be added within rview may appending them to the view
command, like so:
: view key.vf -t 2
Once you have the above file (key.vf), you can create a format file for
rcalc to extract the values you are interested in, and pass these to
the tabfunc program to get them into the form you need for spline.cal.
Create a file called "key.fmt" that contains the following single line:
rview -vtv -vp ${px} ${py} ${pz} -vd ${dx} ${dy} ${dz} -vu 0 0 1 -vh
${vh} -vv ${vv} -vs 0 -vl 0 -t ${t}
Then, run the following command to extract the desired values from your
keyframe file and put them into a form that may be passed to rcalc as a
.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' key.vf
\
| tabfunc Px Py Pz Dx Dy Dz H V T > key.cal
This new file, "key.cal", may then be used with rcalc to generate a set
of desired inbetween views, spaced evenly in time. If your total sum
of times is 30 seconds, for example, and you want to render 10
frames/sec, you might use the following command to generate the
individual frame views for ranimate:
% cnt 300 | rcalc -o key.fmt -f key.cal -f spline.cal -e 't=$1/10' \
-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
In this command, I have used the same "key.fmt" file to generate the
animation views, but you may want to produce something slightly
different, which had only the changing view point and direction, for
example. The above sequence allows you to vary the view position,
direction, and zoom, but does not permit the up vector to change. This
is rarely needed, but if you do have a tilting camera, you can always
modify the commands to include this information.
I hope this is enough to get you started. Another excellent place to
look for tips is Peter's chapter on animation in "Rendering with
Radiance."
-Greg
> From: "gurneet" <[email protected]>
> Date: Fri, 22 Nov 2002 11:13:52 +0530
> Subject: [Radiance-general] how to specify the animation path
>
> hi
> i ahve made a 3d model of our college library in radiance.now i wnat
> to =
> make a walkthrough . but i dont know how to do that ,and what all are =
> the equation i need to give .
> the dimension of library are 796 X 312 X 120 inches.
> could u please help me
> thanking u
> gurneet