POV-Ray : Newsgroups : povray.general : text on plane Server Time
31 Oct 2024 18:49:11 EDT (-0400)
  text on plane (Message 4 to 13 of 13)  
<<< Previous 3 Messages Goto Initial 10 Messages
From: Stephen
Subject: Re: text on plane
Date: 28 May 2018 08:57:19
Message: <5b0bfcaf$1@news.povray.org>
On 28/05/2018 13:20, Kima wrote:
> 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).
> 2. I cannot apply color to the pigment of the plane.
> 
> What is the correct way to put a sex on a plane?
> 
> 

Other than your typo on the last line.

The text object needs to be called separately and it cannot be used as a 
texture. So you need the plane and text1.
You might want to think of using an image map with writing on it for the 
plane although a thin box might give better results as in PovRay planes 
stretch to infinity.
The text object is a 3D object and has depth as well as height and width.

-- 

Regards
     Stephen


Post a reply to this message

From: Stephen
Subject: Re: text on plane
Date: 28 May 2018 08:58:56
Message: <5b0bfd10$1@news.povray.org>
On 28/05/2018 13:51, Kima wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>> Boy, are we gonna have fun with THIS one.
>>
>> :D
> 
> Where is the fun part? ;)
> My stupidity? :p
> 
> 

> 
> What is the correct way to put a *sex* on a plane?

;-)

-- 

Regards
     Stephen


Post a reply to this message

From: Bald Eagle
Subject: Re: text on plane
Date: 28 May 2018 09:05:01
Message: <web.5b0bfe3753612a8410874a080@news.povray.org>
A couple of things.

Careful with that translator.  ;)
You need to use a pigment_pattern to make the plane patterned with the text.
See how I calculated the string length and used that to scale the repeat warp.
Then you need a color map to pigment the text (which is now formally the parts
of the plane corresponding to the 'inside' of the object pattern), and the plane
(which is now formally the rest of the plane corresponding to the 'outside' of
the object pattern)

The text needs to be scaled to be thick in the z direction, and then shifted
back to center it.
I haven't gotten around to implementing WP's suggestion to infinitely scale it
with a function.

This is also very quick just to show you the basics - you'll probably want to
align the pigment pattern with the plane so the text doesn't look like Star Wars
or Dick Balaska's epic 30-year movie intro.



#version 3.7;
global_settings {assumed_gamma 1.0}

// text on a plane   Bald Eagle  May 2018

#include "colors.inc"
#include "functions.inc"
#include "strings.inc"
sky_sphere {pigment {rgb <1, 1, 1>*0.2}}

camera {
   location <0, 0, -50>    // position & direction of view
  look_at  <0, 0, 0>
  right x*image_width/image_height           // horizontal size of view
  up y // vertical size of view
 }

light_source {<25, 25, -150> color White}

#declare Message = "POV-RAY 3.0";
#declare Length = strlen(Message)/1.9;

#declare text1 =
    text {
    ttf "timrom.ttf" Message 100, 0
    pigment { Red }
    translate -z*50
  }


plane {<0,-10,-2>, 4
 texture{
  pigment{
   pigment_pattern{
    object{text1}
    warp {repeat x*Length}
    warp {repeat y}
   } // end pigment pattern
   color_map {
     [0.0 rgb <0, 1, 0>]
     [1.0 rgb <0, 0, 1>]
     } // end color_map
  } // end pigment
 } // end texture
}


Post a reply to this message

From: Kima
Subject: Re: text on plane
Date: 28 May 2018 09:10:01
Message: <web.5b0bff8953612a843ce674f0@news.povray.org>
Stephen <mca### [at] aolcom> wrote:
> On 28/05/2018 13:51, Kima wrote:
> > "Bald Eagle" <cre### [at] netscapenet> wrote:
> >> Boy, are we gonna have fun with THIS one.
> >>
> >> :D
> >
> > Where is the fun part? ;)
> > My stupidity? :p
> >
> >
>
> >
> > What is the correct way to put a *sex* on a plane?
>
> ;-)
>
> --
>
> Regards
>      Stephen

My unconscious mind had a subtle way of making a typo :D

Sorry about that! :p


Post a reply to this message

From: clipka
Subject: Re: text on plane
Date: 28 May 2018 09:47:18
Message: <5b0c0866$1@news.povray.org>
Am 28.05.2018 um 14:51 schrieb Kima:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>> Boy, are we gonna have fun with THIS one.
>>
>> :D
> 
> Where is the fun part? ;)
> My stupidity? :p

I can only hope you're not missing out on the fun part - otherwise you'd
certainly be doing _it_ wrong ;)

(And by "it" I obviously mean using POV-Ray ;))


Post a reply to this message

From: Kima
Subject: Re: text on plane
Date: 28 May 2018 10:25:01
Message: <web.5b0c10d253612a843ce674f0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> A couple of things.
>
> Careful with that translator.  ;)
> You need to use a pigment_pattern to make the plane patterned with the text.
> See how I calculated the string length and used that to scale the repeat warp.
> Then you need a color map to pigment the text (which is now formally the parts
> of the plane corresponding to the 'inside' of the object pattern), and the plane
> (which is now formally the rest of the plane corresponding to the 'outside' of
> the object pattern)
>
> The text needs to be scaled to be thick in the z direction, and then shifted
> back to center it.
> I haven't gotten around to implementing WP's suggestion to infinitely scale it
> with a function.
>
> This is also very quick just to show you the basics - you'll probably want to
> align the pigment pattern with the plane so the text doesn't look like Star Wars
> or Dick Balaska's epic 30-year movie intro.
>
>
>
> #version 3.7;
> global_settings {assumed_gamma 1.0}
>
> // text on a plane   Bald Eagle  May 2018
>
> #include "colors.inc"
> #include "functions.inc"
> #include "strings.inc"
> sky_sphere {pigment {rgb <1, 1, 1>*0.2}}
>
> camera {
>    location <0, 0, -50>    // position & direction of view
>   look_at  <0, 0, 0>
>   right x*image_width/image_height           // horizontal size of view
>   up y // vertical size of view
>  }
>
> light_source {<25, 25, -150> color White}
>
> #declare Message = "POV-RAY 3.0";
> #declare Length = strlen(Message)/1.9;
>
> #declare text1 =
>     text {
>     ttf "timrom.ttf" Message 100, 0
>     pigment { Red }
>     translate -z*50
>   }
>
>
> plane {<0,-10,-2>, 4
>  texture{
>   pigment{
>    pigment_pattern{
>     object{text1}
>     warp {repeat x*Length}
>     warp {repeat y}
>    } // end pigment pattern
>    color_map {
>      [0.0 rgb <0, 1, 0>]
>      [1.0 rgb <0, 0, 1>]
>      } // end color_map
>   } // end pigment
>  } // end texture
> }

Thanks! You couldn't explain it clearer.


Post a reply to this message

From: clipka
Subject: Re: text on plane
Date: 28 May 2018 14:07:49
Message: <5b0c4575$1@news.povray.org>
Am 28.05.2018 um 20:01 schrieb Stephen:

> I think we all pretend that we don't look at those sort of pages.
> So bad show old chap.

Two rules to follow please:

(1) If posting such HTML addresses for fun, please make sure they DO NOT
actually work.

(2) If replying to such HTML addresses that DO work, absolutely
positively DO NOT QUOTE them.

Now I have to nuke two messages instead of just one.


Post a reply to this message

From: Stephen
Subject: Re: text on plane
Date: 28 May 2018 14:28:01
Message: <5b0c4a31$1@news.povray.org>
On 28/05/2018 19:07, clipka wrote:
> Am 28.05.2018 um 20:01 schrieb Stephen:
> 
>> I think we all pretend that we don't look at those sort of pages.
>> So bad show old chap.
> 
> Two rules to follow please:
> 
> (1) If posting such HTML addresses for fun, please make sure they DO NOT
> actually work.
> 
> (2) If replying to such HTML addresses that DO work, absolutely
> positively DO NOT QUOTE them.
> 
> Now I have to nuke two messages instead of just one.
> 

Aw! dinkums the link did not work for me.


Rule *1* do it in OT.


-- 

Regards
     Stephen


Post a reply to this message

From: Alain
Subject: Re: text on plane
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

From: dick balaska
Subject: Re: text on plane
Date: 29 May 2018 18:24:33
Message: <5b0dd321$1@news.povray.org>
On 05/28/2018 09:03 AM, Bald Eagle wrote:
>  so the text doesn't look like Star Wars
> or Dick Balaska's epic 30-year movie intro.

Hey...


-- 
dik
Rendered 328976 of 330000 (99%)


Post a reply to this message

<<< Previous 3 Messages Goto Initial 10 Messages

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