POV-Ray : Newsgroups : povray.animations : Camera Spline Woes : Camera Spline Woes Server Time
27 Sep 2024 18:27:20 EDT (-0400)
  Camera Spline Woes  
From:
Date: 6 May 2004 22:10:00
Message: <web.409aef27a6f410d525955f790@news.povray.org>
Hey all,

You may slightly remember me from a problem I posted about a while back
(media troubles). I'm baack. :) Let's see if Bob Hughes can crack *this*
one. :)

Now I am attempting to create a single file to take care of one whole
section of a scene (usually I create a new file for each frame...with my
methods, it's much simpler that way). To do so, I'm going to need something
on the order of 73 splines. I expect that creating the file will take me a
nice long time and will just about double my bald spot.

So, the first spline (the one I'm working on now) is for the camera. The
camera goes from it's starting position, moves -z for just a bit, and then
starts following a circle path. This it does beautifully. Here's the
problem.

While the other 72 splines are doing their thing (over a period of 8.15
seconds, 163 frames), the camera will be panning in this circle around the
set - continually focused at dead center (which just happens to be 0).
That's where things go awry. At the beginning of the render it starts out
pointing at 0. But it never shifts focus when it starts moving around the
circle. It keeps pointing in the -z direction, which is decidedly NOT what
I want it to do (gives away all the secrets!). However, I'm not an expert
POV user and I've racked my brain over and over on this. I can't figure out
why in the Milky Way this thing is acting like it is. Thus, you see me now.
You did a bang-up job on my last problem and I hope you can do the same
here.

I'm experienced enough to know that you'll want code. :)

My spline:

#declare CameraSpline =
 spline {
   quadratic_spline
   1, <22,-240,480>
   2, <-18,-240,330>
   3, <-238,-240,180>
   4, <-185,-240,-224>
   5, <16,-240,-313>
   6, <240,-240,-227>
   7, <339,-240,14>
   8, <253,-240,228>
   9, <17,-240,347>
   10, <-217,-240,236>
 }

Camera:

camera {
 #declare PCT = 5; // Percentage further away

 location vaxis_rotate(<0,0,0> + PCT/100.0*<7,-343,480>,
                       <-2401,-230449,-164640>,0) //<22,-240,480>
 sky      -y
 right    -4/3*x
 angle    67.3801  // not sure what this is for, was there at the beginning
 rotate   <0,1e-5,0> // Prevent gap between adjecent quads
 //Spline_Trans (CameraSpline, clock, -y, 0, 0)  /* not used - not sure if
it's the right thing */
 translate CameraSpline(clock)
 look_at <0,0,0> // <15,103,0> // -cla
}

I think that's all you will need. I did have to use transforms.inc - just
fyi. If you need anything else, please don't hesitate to ask!!

Thanks so much for any help you can furnish. You'll get credits for this one
for sure!!

-Mike Thorn
Novice raytracer
Owning a computer has its advantages - I can do the car and my head at the
same time.


Post a reply to this message

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