POV-Ray : Newsgroups : povray.general : How do I work with text? Server Time
12 Aug 2024 17:13:46 EDT (-0400)
  How do I work with text? (Message 1 to 3 of 3)  
From: Anthony Bennett
Subject: How do I work with text?
Date: 7 Feb 1999 19:38:42
Message: <36BE334F.AD45DF52@panama.phoenix.net>
How can I make a group of text always face the camera in the same
position, so I can do like subtitles or something? Can this be done with
POV? Please help me. Thanks in advance.


Post a reply to this message

From: Bob Hughes
Subject: Re: How do I work with text?
Date: 7 Feb 1999 23:23:36
Message: <36BE66A5.2C9F63D2@aol.com>
Search for a text positioner in the povray.binaries.utilities uploaded
there several months ago. There's something that does at least locate a
user defined text string at a corner of the image being rendered. Not
sure of keeping its place (and face forward) for animations but I think
either it does or someone updated it to do so. No harm in looking.

Anthony Bennett wrote:
> 
> How can I make a group of text always face the camera in the same
> position, so I can do like subtitles or something? Can this be done with
> POV? Please help me. Thanks in advance.

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/POVring.htm
=Bob


Post a reply to this message

From: Julius Klatte
Subject: Re: How do I work with text?
Date: 8 Feb 1999 15:56:14
Message: <36bf4f6e.0@news.povray.org>
>How can I make a group of text always face the camera in
the same
>position, so I can do like subtitles or something? Can this
be done with
>POV? Please help me. Thanks in advance.

I've typed some code here. I suppose you can use it for
subtitling, but I think a simple post-rendering text in a
paint program would be easier to read and to accomplish (and
would spare some render time). In the example, I've used a
simple white box, but you can use a text object just as
well. Add another translation get the right spot for the
text on your screen. The object is exactly 1 unit away from
the camera.

(delete the semicolons if you're using POV 3.0x)
==================================================


#declare CamLoc=<50,70,-90>;        /* insert any numbers
here */
#declare CamLook=<40,90,47>;       /* and here */

camera { location CamLoc look_at CamLook }

#declare TextNorm=CamLoc-CamLook;
#declare
Xro=degrees(-atan2(TextNorm.y,sqrt(pow(TextNorm.z,2)+pow(Tex
tNorm.x,2))));
#declare Yro=degrees(atan2(TextNorm.x,TextNorm.z));

box {<-1,-1,-1> , <1,1,1> scale 0.1        /* use text
object here */
rotate <Xro,Yro,0>
translate CamLook+TextNorm-vnormalize(TextNorm)   /* add
translation here */
pigment { rgb 1 }
finish { ambient 1 diffuse 0 }
no_shadow }

==================================================

I hope this helps. I have not really tested the code, so if
you run into trouble using it, be free to ask again and I'll
see what I can do. Maybe I'll write a small macro to do the
trick.

Happy subtitling

Julius

---

http://surf.to/jkhome   -  POV related stuff
http://surf.to/uagalleries   -  United Artists Galleries -
raytraced images by several artists


Post a reply to this message

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