POV-Ray : Newsgroups : povray.general : Keep the text oriented toward the camera : Keep the text oriented toward the camera Server Time
28 Jul 2024 22:16:24 EDT (-0400)
  Keep the text oriented toward the camera  
From: YoM
Date: 15 Jan 2014 03:50:00
Message: <web.52d64acd64216e2b21263ef70@news.povray.org>
Hello,


I want to display a text at a given position but I want to keep it oriented
toward the camera.
I really don't know how to do it, which type of transformation I have to do ...

Here is an example of my problem:

#include "colors.inc"
#include "textures.inc"
#include "shapes.inc"

// finish options
#declare ambientCoef = 0.2;
#declare diffuseCoef = 0.8;
#declare specularCoef = 0.8;

camera {
  perspective
  location  <22.424428, 27.372077, 22.881150>
  sky  <-0.190369, 0.724010, -0.663000>
  right -x*image_width/image_height
  angle  30.000000*image_width/image_height
  look_at  <1.214010, 0.842058, 0.000000>
}

light_source {
  <22.424428, 27.372077, 22.881150>
  color  <1.0, 1.0, 1.0>*0.8
}

background {
  color rgb  <1.000000, 1.000000, 1.000000>
}

sphere {
  <-2.311276, -3.133184, 0.000000> 0.100000
  texture
  {
    pigment { rgb <1.000000, 1.000000, 0.188235> }
    finish {ambient ambientCoef diffuse diffuseCoef specular specularCoef}
  }
}


text {
  ttf "cyrvetic.ttf" "TEST" 0, 0
  pigment { Black }
  translate <-2.211276, -3.033184, 0.100000>
}


If someone has an idea.
Thanks,
YoM


Post a reply to this message

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