POV-Ray : Newsgroups : povray.binaries.images : Problem(s) with object pattern using text object Server Time
5 Nov 2024 22:22:41 EST (-0500)
  Problem(s) with object pattern using text object (Message 1 to 3 of 3)  
From: Jörg 'Yadgar' Bleimann
Subject: Problem(s) with object pattern using text object
Date: 8 Oct 2008 17:38:18
Message: <48ed284a$1@news.povray.org>
High!

I would like to render a brushed aluminium manufacturing plane on the 
back side of a wall clock and so decided to do it fully procedurally, i. 
e. using an object pattern with text object(s) rather than just an 
image_map.

But obviously, object patterns cannot use textures, but only pigments or 
colors - at least when I try to use textures, I get the error message
"Missing } in object, texture found instead, which is not the case if I 
used pigments or colors.

Then, irrespective of that, regardless whatever I do to get the text 
line in correct position, the text object shape simply doesn't show up a 
all on the plate... here's the code:

#declare Clock_Manufacturing_Plate =
box
{
   0, <0.142, 0.0001, 0.062>
   texture
   {
     pigment
     {
       object
       {
         sphere { <0.03, 0.0001, 0.028>, 0.0094 }
         /* text
         {
           ttf "verdana.ttf"
           "THE HAMMOND CLOCK COMPANY", 1, 0
           scale 0.03
           rotate x*90
           translate y*0.05


         } */
         texture { pigment {color rgb 0.76 } finish { ambient 0.15 
diffuse 1 brilliance 0.7 phong 1 phong_size 120 } }
         texture { pigment {color rgb 0 } finish {ambient 0.15 diffuse 1 
brilliance 0.15 } }
        // pigment { color rgb 0.76 }
        // pigment { color rgb 0 }
       }
     }
   }
}


See you in Khyberspace!

Yadgar


Post a reply to this message

From: Chris B
Subject: Re: Problem(s) with object pattern using text object
Date: 8 Oct 2008 18:24:32
Message: <48ed3320@news.povray.org>

news:48ed284a$1@news.povray.org...
> High!
>
> I would like to render a brushed aluminium manufacturing plane on the back 
> side of a wall clock and so decided to do it fully procedurally, i. e. 
> using an object pattern with text object(s) rather than just an image_map.
>
> But obviously, object patterns cannot use textures, but only pigments or 
> colors - at least when I try to use textures, I get the error message
> "Missing } in object, texture found instead, which is not the case if I 
> used pigments or colors.

Object patterns use colors, but textures incorporating object patterns can 
be overlayed on textures using other pigments, normals and finishes. The 
code below illustrates this with a plain red texture and a texture using an 
object pigment where the text is black and the surrounding color setting is 
transparent.

> Then, irrespective of that, regardless whatever I do to get the text line 
> in correct position, the text object shape simply doesn't show up a all on 
> the plate... here's the code:

That was just a problem of scale. You had scaled the text by 0.03 and 
translated by 0.05, bringing what was originally a 1 unit thick text block 
completely clear of the surface you were attempting to display it onto. 
Translating by 0.005 or translating by a small amount before you scale 
solves this.

I think the following is more or less what you want to do:

camera {location <0.142/2,0.1,-0.010> look_at <0.142, 0.0001, 0.062>/2}
light_source {<-10,20,-50>, rgb 1}

#declare Clock_Manufacturing_Plate = box { 0, <0.142, 0.0001, 0.062>
   texture { pigment {color rgb <1,0,0> }}
   texture  {
     pigment {
       object {
         text {
           ttf "verdana.ttf"
           "THE HAMMOND CLOCK COMPANY", 1, 0
           scale 0.03
           rotate x*90
           translate y*0.005
         }
         color rgbt 1
         color rgb 0
       }
     }
   }
}

object {Clock_Manufacturing_Plate}

Regards
Chris B.

ps. This group is for binary images. You should've really posted this 
question on povray.general, povray.newusers, or even 
povray.binaries.scene-files.


Post a reply to this message

From: Warp
Subject: Re: Problem(s) with object pattern using text object
Date: 9 Oct 2008 07:43:18
Message: <48edee56@news.povray.org>

> But obviously, object patterns cannot use textures, but only pigments or
> colors

  I don't know where you got that idea, but it's wrong. A pattern is
just a pattern. You can use a pattern anywhere where a pattern is
expected. It has nothing to do with being able to use textures, pigments
or colors.

> - at least when I try to use textures, I get the error message
> "Missing } in object, texture found instead, which is not the case if I
> used pigments or colors.

  Well, you are specifying your textures *inside a pigment block*, so
obviously that won't work. You have to specify it inside a texture block
if you want to specify textures.


Post a reply to this message

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