POV-Ray : Newsgroups : povray.newusers : Identifying animated PNG's by position variables using text Server Time
5 Sep 2024 16:19:12 EDT (-0400)
  Identifying animated PNG's by position variables using text (Message 1 to 6 of 6)  
From: J  Kim
Subject: Identifying animated PNG's by position variables using text
Date: 27 Jan 2000 02:11:45
Message: <388FEFA6.7C63EE3D@mm.ewha.ac.kr>
Dear POV'ers,

 I am raytracing my object by rotating light_source(point) around
X-axis, Y-axis, or Z-axis based on
Chris Colefax's animation utility.
I'd like to identify each output(PNG) by writing the angle values
somewhere in the corner.
For example, ang. 35(X), or ang. 72(Y), and so on.
 I do not know how I could get the value of the variable during the
animation for each output, and pass
the value to the font.
Any help would be appreciated.
=== part of my animation === there are 8 or 13 frames for each axis.==
// light source rotation around Z-axis 0 to -180degree
light_source { <-86.6,0,-50.0> color rgb<1,1,1>*2.5
             rotate
             From(0.0,< 0,0,0>)
             Using("",1,1,"")
             To(1, <  0,0,-180>)
             }

-------
Jong


Post a reply to this message

From: Peter Popov
Subject: Re: Identifying animated PNG's by position variables using text
Date: 27 Jan 2000 09:12:11
Message: <t1GQOCU0os6ZmSE52nVoiW6K4Fnk@4ax.com>
On Thu, 27 Jan 2000 16:11:34 +0900, "J. Kim" <jjk### [at] mmewhaackr>
wrote:

>I'd like to identify each output(PNG) by writing the angle values
>somewhere in the corner.

Following is a post from irtc.animations (thread "Signature in
animations")

---------------------------------

From: Lewis Sellers

On Wed, 28 Oct 1998 07:13:58 -0800, "Mike Weber"
<mwe### [at] racal-pelagoscom> wrote:

>I plan on entering the current round for the competition.  When I'm done
>with my work, I plan to put it on my web-page.  But I don't want someone
>taking it and using it without some recognition.  This has happened to me
>before - someone put a link from their site to mine and used two of my GIF
>animations.  So, I'd like to put my signature or name into each from of my
>animation.  Does anyone know of a DOS or Windows tool that will allow me to
>easily place text or superimpose an image into the corner of all my images
>for an animation?  Currently my animation is at 360 frames, and I certainly
>don't want to do it by hand!!
>
>Mike

You're sort of in luck. With the help of some of the kind folks in
another povray newsgroup (actually, a LOT of mathemetics help) I have
some povray 3.1 code to place a line of copyright text on the bottom
right of your animation frame no matter where the camera is looking.

Simply put, you put your camera location in the vector cam_l and
look_at in cam_lat. The following will set your camera using those
variable AND, most importantly, compute the translate and rotate for a
text object that it will place just a widget in front of the camera
lense.



//example
#declare cam_l = <.6,5.4,16>;     
#declare cam_lat =  <15,1,24>;
            
#local CamZ = 2; //the amount of camera zoom you want

#local CamD = vnormalize(cam_lat,cam_l);
#local CamR = vnormalize(vcross(y,CamD));
#local CamU = vnormalize(vcross(CamD,CamR));

text { ttf "timrom.ttf","(c) 1998 by Lewis Sellers
http://www.intrafoundation.com",.1,0
    pigment { rgbt<1,.8,.8,.75> }
    finish { ambient .75 diffuse 1}
  scale .05
  translate <-.65,-.48,CamZ>
  matrix < CamR.x,CamR.y,CamR.z,
           CamU.x,CamU.y,CamU.z,
           CamD.x,CamD.y,CamD.z,
           cam_l.x,cam_l.y,cam_l.z >
}

camera {
  location cam_l
  up CamU
  right CamR*4/3
  direction CamD*CamZ
}        

----------------------------

I hope it works for you and please excuse the long post.


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message

From: Ken
Subject: Re: Identifying animated PNG's by position variables using text
Date: 27 Jan 2000 09:19:09
Message: <389052F9.8B7745DF@pacbell.net>
Peter Popov wrote:
> 
> On Thu, 27 Jan 2000 16:11:34 +0900, "J. Kim" <jjk### [at] mmewhaackr>
> wrote:
> 
> >I'd like to identify each output(PNG) by writing the angle values
> >somewhere in the corner.
> 
> Following is a post from irtc.animations (thread "Signature in
> animations")

<snip>
 
> I hope it works for you and please excuse the long post.

I thought of the same thing then dismissed the idea because a person
would have to make a different image file for each frame of the animation
to stamp a different angle number for each frame. Seller's tool is
made to stamp a simple signature onto every image of an animation
using a post processing step.

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Peter Popov
Subject: Re: Identifying animated PNG's by position variables using text
Date: 27 Jan 2000 16:07:14
Message: <ubKQOFn+Omjbu=K8dXAPTBSnDJrX@4ax.com>
On Thu, 27 Jan 2000 06:15:21 -0800, Ken <tyl### [at] pacbellnet> wrote:

>I thought of the same thing then dismissed the idea because a person
>would have to make a different image file for each frame of the animation
>to stamp a different angle number for each frame. Seller's tool is
>made to stamp a simple signature onto every image of an animation
>using a post processing step.

Yes but that's pretty simple with a pre-frame shellout. Just call
another copy of POV and render the appropriate text :)


Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message

From: Bob Hughes
Subject: Re: Identifying animated PNG's by position variables using text
Date: 27 Jan 2000 16:34:08
Message: <3890b9d0@news.povray.org>
/* Printing a Number to Screen */

#declare Rs=seed(clock*1234);

#declare YourGeneratedNumber=int(rand(Rs)*360);

#declare ExtractedNumber=
  concat("N",str(YourGeneratedNumber,0,3)) // YourGeneratedNumber is angle.
 // up to three digits starting from left and no decimal (i think).

#declare PrintedNumber=
 concat("The Angle is: ", substr(ExtractedNumber,2,3))
 // skips "N" from previous concat()

#declare cam_l = <.6,5.4,16>;
#declare cam_lat = <15,1,24>;

#local CamZ = 2; // amount of camera zoom you want

#local CamD = vnormalize(cam_lat)//,cam_l);
#local CamR = vnormalize(vcross(y,CamD));
#local CamU = vnormalize(vcross(CamD,CamR));

 text{ttf "timrom.ttf",PrintedNumber,0.05,0
// use the text placement stuff here.
    pigment { rgb 1 }
    finish { ambient 1 diffuse 0}
  scale .05
  translate <-.65,-.48,CamZ>
  matrix < CamR.x,CamR.y,CamR.z,
           CamU.x,CamU.y,CamU.z,
           CamD.x,CamD.y,CamD.z,
           cam_l.x,cam_l.y,cam_l.z >
}

camera {
  location cam_l
  up CamU
  right CamR*4/3
  direction CamD*CamZ
}

Hopefully this is what you had in mind, and can change it to work okay in the
way you need.
Please ignore my other reply since it was totally wrong.

Bob

"J. Kim" <jjk### [at] mmewhaackr> wrote in message
news:388FEFA6.7C63EE3D@mm.ewha.ac.kr...
| Dear POV'ers,
|
|  I am raytracing my object by rotating light_source(point) around
| X-axis, Y-axis, or Z-axis based on
| Chris Colefax's animation utility.
| I'd like to identify each output(PNG) by writing the angle values
| somewhere in the corner.
| For example, ang. 35(X), or ang. 72(Y), and so on.
|  I do not know how I could get the value of the variable during the
| animation for each output, and pass
| the value to the font.
| Any help would be appreciated.
| === part of my animation === there are 8 or 13 frames for each axis.==
| // light source rotation around Z-axis 0 to -180degree
| light_source { <-86.6,0,-50.0> color rgb<1,1,1>*2.5
|              rotate
|              From(0.0,< 0,0,0>)
|              Using("",1,1,"")
|              To(1, <  0,0,-180>)
|              }
|
| -------
| Jong
|


Post a reply to this message

From: J  Kim
Subject: Re: Identifying animated PNG's by position variables using text
Date: 1 Feb 2000 21:03:16
Message: <3897906D.2FB1FF13@mm.ewha.ac.kr>
Thanks, everyone.

 Now I am learning step by step. Thank you for your help.

Jong

Bob Hughes wrote:

> /* Printing a Number to Screen */
>
> #declare Rs=seed(clock*1234);
>
> #declare YourGeneratedNumber=int(rand(Rs)*360);
>
> #declare ExtractedNumber=
>   concat("N",str(YourGeneratedNumber,0,3)) // YourGeneratedNumber is angle.
>  // up to three digits starting from left and no decimal (i think).
>
> #declare PrintedNumber=
>  concat("The Angle is: ", substr(ExtractedNumber,2,3))
>  // skips "N" from previous concat()
>
> #declare cam_l = <.6,5.4,16>;
> #declare cam_lat = <15,1,24>;
>
> #local CamZ = 2; // amount of camera zoom you want
>
> #local CamD = vnormalize(cam_lat)//,cam_l);
> #local CamR = vnormalize(vcross(y,CamD));
> #local CamU = vnormalize(vcross(CamD,CamR));
>
>  text{ttf "timrom.ttf",PrintedNumber,0.05,0
> // use the text placement stuff here.
>     pigment { rgb 1 }
>     finish { ambient 1 diffuse 0}
>   scale .05
>   translate <-.65,-.48,CamZ>
>   matrix < CamR.x,CamR.y,CamR.z,
>            CamU.x,CamU.y,CamU.z,
>            CamD.x,CamD.y,CamD.z,
>            cam_l.x,cam_l.y,cam_l.z >
> }
>
> camera {
>   location cam_l
>   up CamU
>   right CamR*4/3
>   direction CamD*CamZ
> }
>
> Hopefully this is what you had in mind, and can change it to work okay in the
> way you need.
> Please ignore my other reply since it was totally wrong.
>
> Bob
>
> "J. Kim" <jjk### [at] mmewhaackr> wrote in message
> news:388FEFA6.7C63EE3D@mm.ewha.ac.kr...
> | Dear POV'ers,
> |
> |  I am raytracing my object by rotating light_source(point) around
> | X-axis, Y-axis, or Z-axis based on
> | Chris Colefax's animation utility.
> | I'd like to identify each output(PNG) by writing the angle values
> | somewhere in the corner.
> | For example, ang. 35(X), or ang. 72(Y), and so on.
> |  I do not know how I could get the value of the variable during the
> | animation for each output, and pass
> | the value to the font.
> | Any help would be appreciated.
> | === part of my animation === there are 8 or 13 frames for each axis.==
> | // light source rotation around Z-axis 0 to -180degree
> | light_source { <-86.6,0,-50.0> color rgb<1,1,1>*2.5
> |              rotate
> |              From(0.0,< 0,0,0>)
> |              Using("",1,1,"")
> |              To(1, <  0,0,-180>)
> |              }
> |
> | -------
> | Jong
> |


Post a reply to this message

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