POV-Ray : Newsgroups : povray.general : text on plane Server Time
23 Dec 2024 11:01:28 EST (-0500)
  text on plane (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Kima
Subject: text on plane
Date: 28 May 2018 08:25:01
Message: <web.5b0bf4232e05057b3ce674f0@news.povray.org>
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?


Post a reply to this message

From: Bald Eagle
Subject: Re: text on plane
Date: 28 May 2018 08:45:02
Message: <web.5b0bf94253612a8410874a080@news.povray.org>
Boy, are we gonna have fun with THIS one.

:D


Post a reply to this message

From: Kima
Subject: Re: text on plane
Date: 28 May 2018 08:55:01
Message: <web.5b0bfb5253612a843ce674f0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Boy, are we gonna have fun with THIS one.
>
> :D

Where is the fun part? ;)
My stupidity? :p


Post a reply to this message

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

Goto Latest 10 Messages Next 3 Messages >>>

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