|
|
Well, I was trying to do this myself, but my math is so weak it'll take
me forever.... :)
Ok. I was trying to make it so that the small text "Copyright 1998 by
Lewis Sellers" would automatically be placed in the bottom left of any
scene I rendered no matter the camera positions. Very handy in
animations, etc.
In the snip of code below, you'll see I declare cam_l for the camera
location value and cam_lat for the camera look_at value. Using those two
positions I try to compute the translate and rotate needed to position
the text properly.
I managed to get the text roughly where it needs to be, but can't figure
out how to rotate it.
If anyone who's mathematically endowed can help, I'd appreciate it. This
could be a neat little piece of code to plug in for everyone to
autoinsert copyrights on our pics during rendering. :-)
--min
//
#declare cam_l = <125,8,-2>;
#declare cam_lat = <0,0,0>;
camera {
location cam_l
look_at cam_lat
angle 90
}
#declare camc=vnormalize(cam_lat-cam_l);
//put up the copyright now matter where the darn camera is!
#debug concat(".x :", str(cam_l.x,5,2), "\n")
#debug concat(".y :", str(cam_l.y,5,2), "\n")
#debug concat(".z :", str(cam_l.z,5,2), "\n")
#debug "\n"
#debug concat("camc.x :", str(camc.x,5,2), "\n")
#debug concat("camc.y :", str(camc.y,5,2), "\n")
#debug concat("camc.z :", str(camc.z,5,2), "\n")
#debug "\n"
text {
ttf "timrom.ttf" "Copyright 1998 by Lewis Sellers" .01, 0
pigment { rgbt<1,0,0,1> }
translate cam_l
translate camc
rotate<camc.x*360,0,0> //camc.y*360,camc.z*360>
no_shadow
}
--
Lewis A. Sellers: writer and contract Multimedia Website Developer
mailto:lse### [at] usitnet (The Fourth Millennium Foundation)
http://www.public.usit.net/lsellers/ & http://www.intrafoundation.com
http://brain-of-pooh.tech-soft.com/users/critters/bios/sellers_lewis.html
You can bug the living bejesus out of me live on ICQ @ 491461
(If I don't get back to you within a month, I'm out of prozac in some
dark corner somewhere screaming things quite unintelligable but -- most
curiously -- thick with a sumerian accent.)
"The comedy is over" -i pagliacci
Post a reply to this message
|
|