POV-Ray : Newsgroups : povray.animations : any proggrammers? : any proggrammers? Server Time
28 Jul 2024 18:13:29 EDT (-0400)
  any proggrammers?  
From: Jason Krah
Date: 16 Apr 1999 03:55:55
Message: <3716DEF9.EC4CCB7F@fan.net.au>
I have been playing around with Pov/Moray for a while now and
was thinking about animataion. I then set out to write a simple
program. Im only learning C so I haven managed to work it out
(completely) yet.

The idea is the basic idea behind keyframing, but using moray..
What you do is create your static scene, save as scene1 and export to
sc1.pov file.
Move the objects around a bit. (dont create anything "new" as such) and
save as
scene 2 and export to sc2.pov.

The programm (I am still writtng) then scans each file and looks for
"differences".
Every char that is the same in sc1 and sc2 gets piped straight throught
to the output file.
If a "difference" is purely numerical it can be "interpolated" via the
clock variable.
any other differences (non numerical) are found the prog would prob.
have to abort.
(hey that description sucked I know).. heres an eg.

eg. save scene one with an object at <0,0,0>
move object to <10,0,0> save as scene two.

The program would scan the two pov files (since they came from the same
Moray
scane but with different positions of  the object) the only character
difference should end up being
in sc1.pov...        <0,0,0>
in sc2.pov...       <10,0,0>

the program would then generate scene3
out.pov..:        < ( 0 + (10-0)*clock , 0, 0)

I have written my first version of this and it sort of worked..  this
shoould not be hard for any
half competent programmer to whip up. My version keeps "gobbling up"
trailing puctuation
(ie brackets and commas etc). eg <10,10,10> goes to <10,10,10 I have
tried it a few
times and after tweaking my outp;ut file (putting th bloody brakects
back in) it worked..
Fute versions could handle more that 2 files i.e
animation1 = sc1 -> sc2 (-> = interpolate via the program)
animation2 = sc2 -> sc3
animation3 = sc3 -> sc4 etc...
where animation is the pov animation file that you feed clock 0-1 values
to generate animation

Maybe someone really clever (and with the time!) could incorporate
keyframe stuff directly into Moray..
Then who needs 3DMAX or Lightwave.. POV is just as good. (well almost..
better value for money anyway!)

If you made it to the end of my epic post I thank you for your time..
If you can (and am willy to try to) write this _EASY_ programming task
please let us all know how you go.
Thanks agin for your time..keep povin'


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.