|
|
>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
|
|