|
|
ok i've been playing around with the "splinefollow.pov" file, and its a good
example of what im trying to do. But after playing around with it, and
adding some 150 points of my own, i've hit a weird problem i don't
understand, after a certain amount of time, it stops adding "track" to the
scene, but the camera, keeps on flying down the track.
NOTE i am using the following animation variables in the master pov-ray INI
file:
initial_clock=0
final_clock=5
initial_frame=0
final_frame=180
the pov file contains this:
// Persistence Of Vision raytracer version 3.5 sample file.
// File: splinefollow.pov
// Desc: Spline demo animation that shows how to make an object or
// the camera fly along a spline. This is a cyclic animation.
// Date: August 30 2001
// Auth: Rune S. Johansen
#include "math.inc"
#include "transforms.inc"
#declare FirstPerson = yes;
sky_sphere {
pigment {
planar poly_wave 2
color_map {
[0.0, color <0.2,0.5,1.0>]
[1.0, color <0.8,0.9,1.0>]
}
}
}
light_source {< 1,2,-2>*1000, color 1.0}
light_source {<-1,2, 1>*1000, color 0.7 shadowless}
plane { // checkered plane
y, -200
pigment {checker color rgb 1.0, color rgb 0.9 scale 100}
}
// The spline that the aircracfts fly along
#declare MySpline =
spline {
cubic_spline
-2, <-8,-1,99>,
-1, <-17,-1,194>,
0, <-25,-1,288>,
1, <-33,-1,383>,
2, <-50,0,476>,
3, <-83,4,565>,
4, <-133,10,646>,
5, <-196,20,716>,
6, <-271,32,773>,
7, <-353,46,817>,
8, <-438,58,858>,
9, <-529,58,886>,
10, <-622,45,899>,
11, <-714,22,907>,
12, <-803,-8,920>,
13, <-887,-47,941>,
14, <-965,-93,967>,
15, <-1037,-147,997>,
16, <-1102,-208,1031>,
17, <-1159,-276,1066>,
18, <-1212,-345,1102>,
19, <-1268,-413,1138>,
20, <-1326,-480,1174>,
21, <-1386,-544,1209>,
22, <-1449,-607,1243>,
23, <-1511,-676,1264>,
24, <-1568,-751,1270>,
25, <-1616,-833,1264>,
26, <-1659,-917,1254>,
27, <-1702,-1001,1243>,
28, <-1781,-1037,1216>,
29, <-1842,-987,1171>,
30, <-1845,-896,1173>,
31, <-1847,-847,1249>,
32, <-1867,-884,1330>,
33, <-1878,-970,1369>,
34, <-1889,-1057,1405>,
35, <-1899,-1144,1442>,
36, <-1906,-1232,1477>,
37, <-1906,-1322,1509>,
38, <-1901,-1413,1536>,
39, <-1894,-1505,1557>,
40, <-1884,-1598,1573>,
41, <-1875,-1691,1587>,
42, <-1863,-1782,1612>,
43, <-1853,-1868,1651>,
44, <-1851,-1948,1703>,
45, <-1860,-2018,1765>,
46, <-1885,-2079,1833>,
47, <-1926,-2129,1902>,
48, <-1983,-2173,1965>,
49, <-2047,-2223,2013>,
50, <-2116,-2280,2045>,
51, <-2186,-2342,2061>,
52, <-2251,-2411,2063>,
53, <-2311,-2484,2053>,
54, <-2361,-2562,2033>,
55, <-2404,-2641,2002>,
56, <-2447,-2719,1971>,
57, <-2497,-2798,1953>,
58, <-2550,-2877,1946>,
59, <-2602,-2956,1936>,
60, <-2648,-3034,1911>,
61, <-2690,-3113,1878>,
62, <-2736,-3192,1851>,
63, <-2788,-3270,1839>,
64, <-2841,-3349,1833>,
65, <-2891,-3428,1817>,
66, <-2935,-3506,1787>,
67, <-2978,-3585,1755>,
68, <-3027,-3664,1735>,
69, <-3079,-3743,1727>,
70, <-3132,-3821,1718>,
71, <-3180,-3900,1697>,
72, <-3231,-3977,1675>,
73, <-3293,-4047,1658>,
74, <-3363,-4110,1646>,
75, <-3441,-4164,1643>,
76, <-3522,-4212,1635>,
77, <-3606,-4251,1614>,
78, <-3689,-4280,1579>,
79, <-3769,-4299,1530>,
80, <-3841,-4308,1469>,
81, <-3904,-4307,1398>,
82, <-3963,-4301,1324>,
83, <-4017,-4292,1247>,
84, <-4061,-4273,1165>,
85, <-4095,-4246,1080>,
86, <-4118,-4210,996>,
87, <-4131,-4166,913>,
88, <-4134,-4114,833>,
89, <-4130,-4057,757>,
90, <-4131,-4006,678>,
91, <-4140,-3965,592>,
92, <-4158,-3934,504>,
93, <-4184,-3915,415>,
94, <-4220,-3907,328>,
95, <-4264,-3910,244>,
96, <-4314,-3925,165>,
97, <-4371,-3951,93>,
98, <-4428,-3979,22>,
99, <-4485,-4007,-48>,
100, <-4530,-4035,-126>,
101, <-4558,-4062,-212>,
102, <-4571,-4090,-302>,
103, <-4581,-4117,-393>,
104, <-4583,-4142,-485>,
105, <-4575,-4162,-577>,
106, <-4558,-4179,-669>,
107, <-4532,-4193,-759>,
108, <-4496,-4202,-846>,
109, <-4451,-4208,-930>,
110, <-4404,-4213,-1012>,
111, <-4347,-4215,-1088>,
112, <-4283,-4214,-1158>,
113, <-4218,-4213,-1228>,
114, <-4154,-4212,-1297>,
115, <-4089,-4211,-1367>,
116, <-4023,-4208,-1435>,
117, <-3948,-4191,-1491>,
118, <-3869,-4160,-1533>,
119, <-3790,-4116,-1559>,
120, <-3715,-4059,-1571>,
121, <-3649,-3991,-1571>,
122, <-3574,-3935,-1565>,
123, <-3491,-3962,-1543>,
124, <-3469,-4050,-1530>,
125, <-3490,-4119,-1585>,
126, <-3493,-4106,-1675>,
127, <-3489,-4023,-1713>,
128, <-3484,-3946,-1665>,
129, <-3444,-3945,-1584>,
130, <-3392,-4005,-1534>,
131, <-3339,-4068,-1485>,
132, <-3288,-4131,-1437>,
133, <-3242,-4200,-1391>,
134, <-3200,-4275,-1349>,
135, <-3164,-4354,-1311>,
136, <-3133,-4438,-1278>,
137, <-3109,-4525,-1250>,
138, <-3126,-4610,-1277>,
139, <-3148,-4631,-1362>,
140, <-3137,-4567,-1426>,
141, <-3150,-4478,-1413>,
142, <-3215,-4444,-1359>,
143, <-3269,-4496,-1308>,
144, <-3271,-4587,-1313>,
145, <-3264,-4647,-1385>,
146, <-3258,-4671,-1473>,
147, <-3239,-4611,-1539>,
148, <-3250,-4521,-1532>,
149, <-3327,-4483,-1505>,
150, <-3405,-4531,-1504>,
}
// First-person-view camera
// Follows the same path as the first aircraft
#if (FirstPerson=yes)
camera {
location 0
look_at z
translate <0,0.4,0.4>
Spline_Trans (MySpline, clock*11, y, 0.5, 0.5)
}
#end
// The yellow wire that shows the spline path.
union {
#declare C = 0;
#declare Cmax= 150;
#while (C<=Cmax)
#declare Value1 = C/Cmax*11;
#declare Value2 = (C+1)/Cmax*11;
#declare Point1 = -0.5*y+MySpline(Value1);
#declare Point2 = -0.5*y+MySpline(Value2);
//sphere {Point1, 0.1}
cylinder {Point1, Point2, 0.5}
#declare C = C+1;
#end
pigment {color <1,1,0>}
}
I am unable to understand the code fully as i dont know why the "track"
suddenly stops, but think this may have something to do with the maths
after "Value1=" and "Value2=" which i don't understand at all. Can anyone
help?
Also, in rendering, pov-ray takes a long time with the first few frames,
then goes very quickly (i'm using resolution 160x120 for quick results).
Can anyone explain why this is either.
Once again, thanks for any and all info that helps me on the long road to
understanding.
Post a reply to this message
|
|