POV-Ray : Newsgroups : povray.newusers : Placement of Text Object : Placement of Text Object Server Time
6 Sep 2024 15:48:19 EDT (-0400)
  Placement of Text Object  
From: Mandrake
Date: 17 Nov 2002 14:34:20
Message: <3dd7ef3a@news.povray.org>
Hi guys. I'm a glaring newbie here when it comes to scripting for Povray, 
but so far I'm really liking it. I've run across a tad bit of a difficult 
problem though. What I am trying to do is figure out an easy way to 
position the text string straight ahead of the camera (as if that was your 
focal point), so that it can easily be read (and changed if necessary). The 
problem is, with the camera angle as such, I'm finding it near about 
impossible to line up the text correctly. Anybody have any ideas on how 
this can be done?

Any suggestions are appreciated...

-- 
Take care,
Randall

global_settings {
  assumed_gamma 1.0
  max_trace_level 15
}

#include "colors.inc"

#default { finish { ambient 0.07 }}

camera {
  location  <-1.1,  -0.6,  0.15>
  direction y
  sky       z
  up        z
  right     (4/3)*x
  look_at   <0.0, 0.0, 0.05>
  angle 43
}


light_source {
  <-8.0,   6.2,   4.5>
  color rgb 1.3
}

#declare Test =   text { ttf "/home/fonts/Aladdin.ttf", "Text String", .15, 
0.0 }

#declare Text =
  union
  {
    object { Test rotate <0,0,0> translate <0,0,0> }
        texture{pigment { BrightGold }
                finish {        ambient 0.35
                diffuse 0.0
                specular 1.0
                roughness 0.0005
                reflection { 1.0 metallic 1.0 }
                reflection <.4,.4,.5>
                brilliance 5.0
                metallic }}
  }

object
{
  Text rotate <0,0,0> 
  translate <-1,0,0>
}


Post a reply to this message

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