POV-Ray : Newsgroups : povray.animations : Fixed Look_At point? Server Time
23 Nov 2024 08:57:59 EST (-0500)
  Fixed Look_At point? (Message 1 to 3 of 3)  
From: George
Subject: Fixed Look_At point?
Date: 20 Nov 2010 17:15:01
Message: <web.4ce846f0d3b91a0351058cc90@news.povray.org>
I'm using a quadratic spline to move my camera, but the camera looks straight
ahead on the path (like someone just looking ahead as they walk).  I want it to
focus on a specific point the entire way (<-5,-20,-400>).  How would I do that?
I've tried a rotate after the Spline_Trans. Right now the angle from around
where clock~=0.25 is the angle I want for the rest of the spline move, but I'm
not sure how to keep that view (I know the angle is changing; I'm having trouble
coming up with the formula I need to change the angle after the spline
transformation to keep the view angle I want).

This is what I have right now
//+W640 +H360 +A0.3
//initial_frame = 1
//final_frame = 125
//default clock
#include "colors.inc"
#include "transforms.inc"
#declare cameraSpline =
    spline{
        quadratic_spline
        00, <-3,-25,-650>   //start
        11, <800,200,1250>  //end
    }

camera{
    location <0,30,-1000>
    look_at <-5,-20,-400>
    Spline_Trans (cameraSpline, mod( (clock+0/6) ,1)*11, y, 0, 0)
    #if(clock <= 0.25)
        rotate <0,(-(clock*300)),0>
    #else
        rotate <0,-(0.25*300),0>
    #end
}

light_source{
    <-30,20,25>*90
    color White*3.5
}

sphere{
    <-5,-20,-400>,5
    texture{
        pigment { color Red }
        finish { ambient 1  }
    }
}

Thanks for any help!


Post a reply to this message

From: Hugo Arnaut
Subject: Re: Fixed Look_At point?
Date: 20 Nov 2010 18:28:39
Message: <op.vmhst7lbq4w9ih@whitebishop>
This is from the top of my head, but I think you can set the look_at point  
after the camera transformations. So you only need to switch the  
statements order, no calculations required.

Hugo.


Post a reply to this message

From: John VanSickle
Subject: Re: Fixed Look_At point?
Date: 21 Nov 2010 04:46:57
Message: <4ce8ea91@news.povray.org>
On 11/20/2010 6:28 PM, Hugo Arnaut wrote:
> This is from the top of my head, but I think you can set the look_at
> point after the camera transformations. So you only need to switch the
> statements order, no calculations required.

Hugo is entirely correct.  Put the look_at <-5,-20,-400> statement at 
the end of the camera statement, and that point will be in the center of 
the camera view.

Regards,
John


Post a reply to this message

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