POV-Ray : Newsgroups : povray.general : text on superellipsoid Server Time
22 Dec 2024 07:45:25 EST (-0500)
  text on superellipsoid (Message 1 to 3 of 3)  
From: Kima
Subject: text on superellipsoid
Date: 28 May 2018 10:30:00
Message: <web.5b0c117642f2269f3ce674f0@news.povray.org>
Sorry for too many questions. I am practising different possibilities of
POV-Ray, and text is very handy when combined with other objects.

I assume superellipsoid is similar to box in nature. Therefore, this code should
work


difference {

superellipsoid{ <1.00,0.25>
  texture{ pigment{ color rgb<0.65,1,0.1>}
           finish { phong 1}
         }
}

text{ ttf "timrom.ttf", "text",0.3, 0
      texture{ pigment{ color rgb<1,0.9,0.5>}
               finish { phong 1 reflection 0.1}}
}
}

The render completes with no error and superellipsoid is drawn but not the text.


Post a reply to this message

From: Bald Eagle
Subject: Re: text on superellipsoid
Date: 28 May 2018 11:10:01
Message: <web.5b0c1ae9e3ae2cc710874a080@news.povray.org>
You need to scale it thicker to extend past the outer surface of the
superellipsoid

Then scale smaller in x/y and translate to center.

As a useful tool for future difference{}

make the "parent" object transparent (t~0.95)
make the subtractive child object a bright contrasting solid color.

Calculate the bounding boxes of the two objects and keep track of where they
truly are.

Make a union of the two objects to see that they will "work" in the difference
you envision.

THEN rewrite the scene as a difference, rather than a union.

(or do both, side-by-side)


{It would also be helpful to debug faster if you provide a completely renderable
scene - with camera location, etc.}

try this:

difference {

superellipsoid{ <1.00,0.25>
  texture{ pigment{ color rgb<0.65,1,0.1>}
           finish { phong 1}
         }
}

text{ ttf "timrom.ttf", "text", 2, 0
      texture{ pigment{ color rgb<1,0.9,0.5>}
               finish { phong 1 reflection 0.1}}
               scale 0.5
               translate -x*0.3
               translate -z*1
}

}


Post a reply to this message

From: Kima
Subject: Re: text on superellipsoid
Date: 28 May 2018 11:20:00
Message: <web.5b0c1d4ce3ae2cc73ce674f0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> You need to scale it thicker to extend past the outer surface of the
> superellipsoid
>
> Then scale smaller in x/y and translate to center.
>
> As a useful tool for future difference{}
>
> make the "parent" object transparent (t~0.95)
> make the subtractive child object a bright contrasting solid color.
>
> Calculate the bounding boxes of the two objects and keep track of where they
> truly are.
>
> Make a union of the two objects to see that they will "work" in the difference
> you envision.
>
> THEN rewrite the scene as a difference, rather than a union.
>
> (or do both, side-by-side)
>
>
> {It would also be helpful to debug faster if you provide a completely renderable
> scene - with camera location, etc.}
>
> try this:
>
> difference {
>
> superellipsoid{ <1.00,0.25>
>   texture{ pigment{ color rgb<0.65,1,0.1>}
>            finish { phong 1}
>          }
> }
>
> text{ ttf "timrom.ttf", "text", 2, 0
>       texture{ pigment{ color rgb<1,0.9,0.5>}
>                finish { phong 1 reflection 0.1}}
>                scale 0.5
>                translate -x*0.3
>                translate -z*1
> }
>
> }

Wonderful! Works perfectly. Thank you very much.


Post a reply to this message

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