POV-Ray : Newsgroups : povray.general : generating Animation problem. Server Time
1 Nov 2024 05:20:47 EDT (-0400)
  generating Animation problem. (Message 1 to 8 of 8)  
From: Jay
Subject: generating Animation problem.
Date: 31 Jul 2017 22:00:00
Message: <web.597fdfd0580f1569e368119c0@news.povray.org>
i want to generate 25 images by moving camera like this.

this is the sequence of movement of camera i want to make.

(1)  (2)  (3)  (4)  (5)
(6)  (7)  (8)  (9)  (10)
(11) (12) (13) (14) (15)
(16) (17) (18) (19) (20)
(21) (22) (23) (24) (25)

all these cameras are arranged at the same plane and looking at the orthogonal
position.

i know how to make the first line (1)~(5)

but i can't figure out how to move camera(5) to (6) and goes on the movement.

anyone who know how to do this stuff, plz let me know. i appreciate


Post a reply to this message

From: omniverse
Subject: Re: generating Animation problem.
Date: 1 Aug 2017 00:30:01
Message: <web.598002bee19acd759c5d6c810@news.povray.org>
"Jay" <pjy### [at] gmailcom> wrote:
> i want to generate 25 images by moving camera like this.
>
> this is the sequence of movement of camera i want to make.
>
> (1)  (2)  (3)  (4)  (5)
> (6)  (7)  (8)  (9)  (10)
> (11) (12) (13) (14) (15)
> (16) (17) (18) (19) (20)
> (21) (22) (23) (24) (25)
>
> all these cameras are arranged at the same plane and looking at the orthogonal
> position.
>
> i know how to make the first line (1)~(5)
>
> but i can't figure out how to move camera(5) to (6) and goes on the movement.
>
> anyone who know how to do this stuff, plz let me know. i appreciate

Although I am probably the wrong person to answer this I will try, hope you can
figure this out:

/* access array 0 to 24 (25 entries)
and place camera to view 5 X 5 grid */

//cmd:+ki0 +kf1 +kfi0 +kff24


#declare X=25;

#declare X5=array [X] {1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5};

#declare Y=25;

#declare Y5=array [Y] {1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5};


camera {
  orthographic
  location <-0.5+X5[frame_number],0.5-Y5[frame_number],-1>
  look_at  <-0.5+X5[frame_number],0.5-Y5[frame_number],0>
  right x            // horizontal size of view
  up y               // vertical size of view
}

// overview to see all 25 locations at once
//camera {location <5/2,-5/2,-5> look_at <5/2,-5/2,0>}

box {         // this box fits exactly in view
  <0,0,0>, <5,-5,1>
  texture {
  pigment {checker rgb <1, 0, 0> rgb <0, 0, 1>}
  finish {emission 1}
  }
}

#declare XYt=0;

#for (Yt,-1,-5,-1)
#for (Xt,1,5,1)

#declare XYt=XYt+1;

text {ttf "arial" str(XYt,0,0) 1, 0
 pigment {rgb 1}
 finish {emission 1}
 scale 0.5
 translate <-0.75,0.25,0>
 translate <Xt,Yt,-0.1>
 }

#end
#end


Post a reply to this message

From: Bald Eagle
Subject: Re: generating Animation problem.
Date: 1 Aug 2017 07:50:00
Message: <web.59806a66e19acd75c437ac910@news.povray.org>
"Jay" <pjy### [at] gmailcom> wrote:

> i know how to make the first line (1)~(5)

and how are you doing that?

> but i can't figure out how to move camera(5) to (6) and goes on the movement.
> anyone who know how to do this stuff, plz let me know. i appreciate


I would make an array of vectors defining the camera locations, and then based
on the clock/frame value, use that camera array element.

#declare Cameras = array [25] {<x1, y1, z1>, ..., <xn, yn, zn>};

camera {
  location Cameras [frame_number]
  look_at  <LAx, LAy, LAz>
  right 1*x
  up 1*y
}


Post a reply to this message

From: Stephen
Subject: Re: generating Animation problem.
Date: 1 Aug 2017 08:25:34
Message: <5980733e$1@news.povray.org>
On 8/1/2017 12:48 PM, Bald Eagle wrote:
> "Jay" <pjy### [at] gmailcom> wrote:
>
>> i know how to make the first line (1)~(5)
>
> and how are you doing that?
>
>> but i can't figure out how to move camera(5) to (6) and goes on the movement.
>> anyone who know how to do this stuff, plz let me know. i appreciate
>
>
> I would make an array of vectors defining the camera locations, and then based
> on the clock/frame value, use that camera array element.
>
> #declare Cameras = array [25] {<x1, y1, z1>, ..., <xn, yn, zn>};
>
> camera {
>    location Cameras [frame_number]
>    look_at  <LAx, LAy, LAz>
>    right 1*x
>    up 1*y
> }
>

That is the way I would do it. Maybe using a Conditional Directive. For 
instance; #if, #for, #switch etc. That would give discrete camera 
positions. Smooth translations between the camera positions and the look 
at point can be obtained by using spline curves. It makes it more 
complicated but it looks better.
Spline_Trans in Transforms.inc would be something to look at after Jay 
got the basic transformations working.

-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: generating Animation problem.
Date: 1 Aug 2017 09:45:00
Message: <web.598085b0e19acd75c437ac910@news.povray.org>
Stephen <mca### [at] aolcom> wrote:

> Smooth translations between the camera positions and the look
> at point can be obtained by using spline curves. It makes it more
> complicated but it looks better.
> Spline_Trans in Transforms.inc would be something to look at after Jay
> got the basic transformations working.

Yes, I was going to mention splines, although it looked like he just wanted to
render a bunch of discrete frames.

I'd think about the rate of travel along a hypotenuse vs a linear stretch, an
consider using some sort of sin or cos modifier to slow down / speed up for
smooth transitions, if that's the way he's going with this.


Post a reply to this message

From: Stephen
Subject: Re: generating Animation problem.
Date: 1 Aug 2017 10:18:45
Message: <59808dc5$1@news.povray.org>
On 8/1/2017 2:44 PM, Bald Eagle wrote:
> Stephen <mca### [at] aolcom> wrote:
>
>> Smooth translations between the camera positions and the look
>> at point can be obtained by using spline curves. It makes it more
>> complicated but it looks better.
>> Spline_Trans in Transforms.inc would be something to look at after Jay
>> got the basic transformations working.
>
> Yes, I was going to mention splines, although it looked like he just wanted to
> render a bunch of discrete frames.
>

It does and I was answering the next question. :)

> I'd think about the rate of travel along a hypotenuse vs a linear stretch, an
> consider using some sort of sin or cos modifier to slow down / speed up for
> smooth transitions, if that's the way he's going with this.
>
>

Before you do that. Have a look at this page on Friedrich A. Lohmüller's 
website. I think you have mentioned his site before. No need to 
re-invent the wheel unless it is for your own satisfaction in doing it.

http://www.f-lohmueller.de/pov_tut/animate/anim280e.htm



-- 

Regards
     Stephen


Post a reply to this message

From: Jay
Subject: Re: generating Animation problem.
Date: 1 Aug 2017 21:45:01
Message: <web.59812e95e19acd75fa7320dd0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Jay" <pjy### [at] gmailcom> wrote:
>
> > i know how to make the first line (1)~(5)
>
> and how are you doing that?
>
> > but i can't figure out how to move camera(5) to (6) and goes on the movement.
> > anyone who know how to do this stuff, plz let me know. i appreciate
>
>
> I would make an array of vectors defining the camera locations, and then based
> on the clock/frame value, use that camera array element.
>
> #declare Cameras = array [25] {<x1, y1, z1>, ..., <xn, yn, zn>};
>
> camera {
>   location Cameras [frame_number]
>   look_at  <LAx, LAy, LAz>
>   right 1*x
>   up 1*y
> }


just like this

#declare Move = 10 * clock;

#declare Cam1 = camera { location<15,5,18 + Move>
                         look_at <0,5,18 + Move>
                         angle 120 }


Post a reply to this message

From: Bald Eagle
Subject: Re: generating Animation problem.
Date: 2 Aug 2017 07:45:00
Message: <web.5981ba64e19acd75c437ac910@news.povray.org>
"Jay" <pjy### [at] gmailcom> wrote:

> just like this
>
> #declare Move = 10 * clock;
>
> #declare Cam1 = camera { location<15,5,18 + Move>
>                          look_at <0,5,18 + Move>
>                          angle 120 }

Yes, I figured that was what you were doing.

Check out the docs on the spline, and Friderich Lohmueller's site, and see how
you can define all of the points on your zig-zag camera path.  Don't jump
suddenly from right to left - have as many points on the way back as you did
forward.


Post a reply to this message

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