POV-Ray : Newsgroups : povray.newusers : screen.inc and animation/rotation Server Time
25 Nov 2024 07:45:47 EST (-0500)
  screen.inc and animation/rotation (Message 1 to 5 of 5)  
From: wollinger
Subject: screen.inc and animation/rotation
Date: 20 Apr 2006 15:45:01
Message: <web.4447e4473b0e2653beed6d660@news.povray.org>
Hi all,

how can I rotate an camera which is created by screen.inc (to include text
while moving around in my animation)?

I had before using screen.inc:
#declare My_Camera=<424510, 3000, 279020>;  // Ausgangspos Cam
#declare Object_Center=<423800,   1300,   284860>;  // Rotationszentrum

#declare Cam_Pos=() ;  // zum transferrieren der Positionen
#declare Rot_Angle_Y=-135;

camera {
        location My_Camera
        Rotate_Around_Trans(<0,Rot_Angle_Y,0>, Object_Center)
        look_at Object_Center
        angle 90 // vertical camera aperture
        }

but now I want to include text while changing Rot_Angle_Y (by multiplying
with clock), but something like the following is not working:

 Set_Camera_Location(My_Camera {Rotate_Around_Trans(<0,Rot_Angle_Y,0>,
Object_Center)})
 Set_Camera_Look_At(Object_Center)
 Set_Camera_Aspect(720,576)
 Set_Camera_Angle(90)

Is there a way to calculate the new position before I
"Set_Camera_Location()}?

Thanks
Wolfgang

PS: The ulimative goal would be to have an text blended in (animated text)
while rotating around my object (Cam_Center).


Post a reply to this message

From: Bob H
Subject: Re: screen.inc and animation/rotation
Date: 20 Apr 2006 23:13:20
Message: <44484dd0$1@news.povray.org>
"wollinger" <wol### [at] gmznet> wrote in message 
news:web.4447e4473b0e2653beed6d660@news.povray.org...
>
> how can I rotate an camera which is created by screen.inc (to include text
> while moving around in my animation)?

I might not be giving the best answer but I was able to do what you want by 
adding the rotation into the screen.inc file for the camera{}, Screen_Object 
and Plane_Object. The line added to the end of each: 
Rotate_Around_Trans(Rot_Angle,Object_Center)
Please be aware of the changes I made to the names of identifiers.

Test scene from your example:

#declare My_Camera_Loc=<424510, 3000, 279020>/10;

#declare Object_Center=<423800, 1300, 284860>/10;

#declare Rot_Angle=<0,-135,0>*clock;

#include "transforms.inc" // before calling screen.inc
#include "screen.inc" // settings for this are below

Set_Camera(My_Camera_Loc,Object_Center,90)
Set_Camera_Aspect(4,3)

#declare MyTextObject =
text {
   ttf "crystal.ttf", "your text here", 0.01, <0,0>
   scale 0.08
   pigment {color <1.0,0.5,0.2> transmit clock} // clear first, ending 
opaque
   finish {ambient 1 diffuse 0}
}

Screen_Object ( MyTextObject, <1,0>, <0.04,0.02>, true, 1 )

// now something to see
cone {Object_Center,100,Object_Center+100*y,0 pigment {rgb <1,1,0>}}

light_source {
 <10000,10000,1>,1
}

/* note that the scale of the Screen_Object was increased (last parameter) 
because I was getting broken text until I changed that, possibly a problem 
with the large scene bounds. Which, BTW, you'll notice I divided by 10 here 
just to be sure it was showing okay. About the blending you asked, no idea 
except for using transmit clock. Maybe you were talking about another 
way...? */

-- 
Bob H  www.3digitaleyes.com
http://3digitaleyes.com/imagery/


Post a reply to this message

From: Bob H
Subject: Re: screen.inc and animation/rotation
Date: 20 Apr 2006 23:19:43
Message: <44484f4f$1@news.povray.org>
Heck. I really need to proof read my replies sometimes.

Of course, you might realize I was saying the 
Rotate_Around_Trans(Rot_Angle,Object_Center) goes into the screen.inc file, 
and that I got the transmit clock backward. Opaque first then changes to 
clear. So you'd actually need that to be transmit 1-clock for the opposite 
effect. If this matters at all, since I got the feeling you might have been 
talking about something more than this.


Post a reply to this message

From: wollinger
Subject: Re: screen.inc and animation/rotation
Date: 21 Apr 2006 02:50:00
Message: <web.44487f6a1cd0df8bf9c6e23e0@news.povray.org>
Hi,

thanks for your suggestion. I will try this on the weekend. And just for
explanation why I have a such big translation: I'm rendering a natural
scene (elevation model with overlay) and the files I have are in a
rectangular geographic coordinate system, which usually has such big
values.

Wolfgang


Post a reply to this message

From: Warp
Subject: Re: screen.inc and animation/rotation
Date: 21 Apr 2006 03:54:28
Message: <44488fb3@news.povray.org>
wollinger <wol### [at] gmznet> wrote:
> Is there a way to calculate the new position before I
> "Set_Camera_Location()}?

  You can rotate the location vector of the camera around a point simply with
vrotate(CameraLocation-ObjectCenter, <AngleX, AngleY, angleZ)+ObjectCenter

-- 
                                                          - Warp


Post a reply to this message

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