POV-Ray : Newsgroups : povray.general : text on plane : Re: text on plane Server Time
29 Apr 2024 16:07:04 EDT (-0400)
  Re: text on plane  
From: Alain
Date: 28 May 2018 15:33:12
Message: <5b0c5978$1@news.povray.org>
Le 18-05-28 à 08:20, Kima a écrit :
> I tried to write on a plane with the code
> 
> #declare text1 =
>      text {
>      ttf "timrom.ttf" "POV-RAY 3.0" 1, 0
>      pigment { Red }
>    }
> 
> 
> plane{<0,-10,-2>,4
>      texture{
>          pigment{
>              object{text1}
>          }
>      }
> }
> 
> but it does not give the result I want.
> 
> 1. The text does not appear (probably appears somewhere, which is not visible).
Your text is declared, but never used. It don't appears anywhere as it 
don't exist at all in the scene.

> 2. I cannot apply color to the pigment of the plane.
> 
> What is the correct way to put a sex on a plane?
> 
> 

You can use the object pigment. This is a block pattern that take an 
object and two pigments/patterns.
Used like this, the texture, if any, of the object is meaningless.

pigment {
   object {
     text1
     color White // outside of the text
     color Red // inside of text, or colour of the letters
     }
   }

You need to properly rotate and translate your text object. It start at 
<0,0,0> and successive letters go to the right and above the X axis. The 
thickness goes toward +Z.
It may be easier to start with :

plane{-z,0
  pigment {
   object {
     text1
     color White // outside of the text
     color Red // inside of text, or colour of the letters
     }
   translate -0.1*z
  //Make the front of the text go in front of the plane
  // otherwise, you may get coincident surface like artefacts
   }
  rotate Your_Rotation
}

Another way would be to place your object on the plane :
union{
  plane{-z,0 }
  object{text1 translate -0.0001*z}
  pigment{rgb 1}
}


Post a reply to this message

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