|
|
Hi. I'm sending a .pov file that I'm having some trouble with and hoping
that there is someone out there who can tell me what I'm doing wrong.
Basically, I'm trying to create a short animation that would eventually be
converted to an animated .gif for a friend's web site. The basic idea is
that you have the words "View my guestbook" (If I get this to work, I'll
make another saying "Sign my guestbook"). The words are as close to being
centered around the origin as I can get them, and they were created in
Moray. I was planning to animate the camera instead of the actual text.
The animation is divided up into 4 equally timed parts. (so I used a
starting clock value of 0 and a final value of 4 to make my calculations
easier -- or so I thought) The camera should start out looking between two
letters in the center so you originally see only blackness. Then it should
back up behind the text until the text pretty much fills up the view,
backwards. (part 1) Then the camera rotates around to the front of the text.
(part2) Then it should pause there. (part 3) And finally move toward the
text until you are back to the original blackness.(part 4) How ever I must
be doing something wrong because I seem to be getting hung up on the second
part. It starts ok, backs up, but then just keeps rotating. I've never
used the "#if...#else" statement before and thought maybe that was the
problem. I'm also including a file called "view.ini" that I used to render
the file. Please help...
Thanks.
Dave
Post a reply to this message
Attachments:
Download 'view.pov.txt' (3 KB)
Download 'view.ini.txt' (2 KB)
|
|
|
|
Hi Dave
#if (clock<=1)
translate <0, clock*20, 0>
#else
#if (1<clock<=2)
#declare elseclock = clock-1
translate <0, 20, 0>
rotate <0, 0, ((clock-1)*180)>
#else
#if (2<clock<=3)
translate <0, -20, 0>
#else
#if (clock<=4)
#declare elsclock= clock-3
translate (-20+(20*(clock-3)))*y
#end
#end
#end
#end
Why it doesn't work: (or so I believe)
(1<clock<=2)
pov first evaluates 1<clock and returns either false (=0) or true
(=1), then it check the resulting boolean<=2, which is always true...
you should write ((1<clock)&(clock<=2)).
However, there is a simpler way to do this: #switch
#switch (clock) // use clock for all tests
#range (0,1) // if 0<=clock<=1, then...
translate <0, clock*20, 0>
#break //<-- this exit the #switch test, so #range(1,2) isn't used
too when clock=1
#range (1,2)
translate <0, 20, 0>
rotate <0, 0, ((clock-1)*180)>
#break
#range (2,3)
translate <0, -20, 0>
#break
#range (3,4)
translate (-20+(20*(clock-3)))*y
#break // this one isn't necessary... but it is neater this way.
#else
#error "\nClock out of range" // just for fun
#end // close the #switch directive
#switch uses also #case(aValue), but in this case this isn't very
usefull - except if you want subliminal images :-) See the doc.
Hope this helps,
Povingly,
Philippe
Post a reply to this message
|
|