![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Thorsten Froehlich
Subject: Re: Simple 2D text on a cylinder's surface
Date: 14 Oct 2007 05:10:41
Message: <4711dd11$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
M_a_r_c wrote:
> 47113368$1@news.povray.org...
>> Marty Schrader wrote:
>>> The book references you gave me don't point to anything. My POV for
>>> Windows (3.6.1) help file goes up to 3.4.9, but you mention sections
>>> 3.4.11 and 12. The online help is even worse, since Chapter 3 is the
>>> reference in the help file, but it's about windows in the online docs.
>> The first number denotes a "book" not a "chapter". Since there are three
>> platform specific "books", but the online help cannot have three "books"
>> with the same number (yet it makes the most sense to have platform docs
>> first), the order is different, the actual chapter numbers are identical
>> though.
>>
>> Thorsten, POV-Team
>
> I wonder how many dried frog pills were swallowed to keep that cool ;-)
LOL, eventually we should replace the first number with a unique letter (or
drop it altogether), then the complexity will go away :-)
Thorsten
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Samuel Benge <stb### [at] THIShotmail com> wrote:
> Marty Schrader wrote:
> > This subject has been beaten to death on this group, but to no
> > satisfactory conclusion.
>
> Here you go, Marty:
>
Hey Samuel can you tell me why I loose part of the first few characters?
see code below
Leef_me
camera {
// orthographic
location <0,0,-10.5> look_at <0,0,0>
}
light_source { <-10,-7,-40> color rgb 1}
light_source { <1,0,-1.5> color rgb 1}
// Create an infinite sphere around scene and allow any pigment on it
sky_sphere {
pigment {
gradient y
color_map { [0.0 color rgb <0.7,0.7,1.0>] [1.0 color blue 0.5] }
}
}
// using text as a pigment on a plane, original code was in response to text
on a cylinder
//From: Samuel Benge
//Subject: Re: Simple 2D text on a cylinder's surface
//Date: 12 Oct 2007 06:39:40
// begin code
#declare my_text=
text{
ttf"arialbd.ttf"
"Test"
1,0
// translate<1.5,0,0>
}
//**********************************************
//
// Why is part of the first character or two lost?
//
//**********************************************
// flat circular FINITE (no CSG) shape, center hole cutout is optional
disc {
<0, 0, 0> // center position
z, // normal vector
5.0, // outer radius
//0.2 // optional hole radius
pigment{
pigment_pattern{
object{my_text 0,1}
// translate<1.5,0,0>
}
}
}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Leef_me wrote:
> Hey Samuel can you tell me why I loose part of the first few characters?
> see code below
>
> Leef_me
Yes, you are experiencing that old problematic artifact known as
coincident surfaces. The front of the text object occupies the exact
same space as the surface of the disc. Since the text object is 1 unit
deep, change it to this:
#declare my_text=
text{
ttf"arialbd.ttf"
"Test"
1,0
translate -z/2
}
Doing that will allow the text object to intersect the disc correctly,
thus displaying all of the text.
Sam
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Samuel Benge <stb### [at] THIShotmail com> wrote:
> Leef_me wrote:
> > Hey Samuel can you tell me why I loose part of the first few characters?
> > see code below
> >
> > Leef_me
>
> Yes, you are experiencing that old problematic artifact known as
> coincident surfaces. The front of the text object occupies the exact
> same space as the surface of the disc. Since the text object is 1 unit
> deep, change it to this:
>
> #declare my_text=
> text{
> ttf"arialbd.ttf"
> "Test"
> 1,0
> translate -z/2
> }
>
> Doing that will allow the text object to intersect the disc correctly,
> thus displaying all of the text.
>
> Sam
That does indeed <solved> the problem. And in understand the concept of
coincident surfaces. I failed to try translating the text in that axis.
I have experienced coincident surfaces as a random pixelation between the
two surfaces.
What I don't understand and what really through me was that it wasn't the
whole string. Just the top left at the start of the string was cut off at
an angle.
Thanks for the solution, now I start to comprehend the code.
Leef_me
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Samuel Benge
Subject: Re: Simple 2D text on a cylinder's surface
Date: 21 Oct 2007 16:39:07
Message: <471bb8eb@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Leef_me wrote:
> That does indeed <solved> the problem. And in understand the concept of
> coincident surfaces. I failed to try translating the text in that axis.
> I have experienced coincident surfaces as a random pixelation between the
> two surfaces.
>
> What I don't understand and what really through me was that it wasn't the
> whole string. Just the top left at the start of the string was cut off at
> an angle.
Yeah, you would expect the same random pixelation to occur, not the
strange angled cut. It seems to be due to how POV handles object
pigments. I'm getting the same effect with every flat object I try.
> Thanks for the solution, now I start to comprehend the code.
You're welcome. It's nice to see somebody passing through a difficult
problem :)
If you *really* want to make sure it never happens again, you can make
the object pigment infinitely long in the z-axis by changing your object
pigment like so:
pigment_pattern{
object{my_text 0,1}
translate<1.5,0,0>
warp{planar}
}
As long as you made the first 'translate' in the text object's
definition, this should work just fine.
Sam
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Samuel Benge <stb### [at] THIShotmail com> wrote:
> Leef_me wrote:
> > That does indeed <solved> the problem. And in understand the concept of
> If you *really* want to make sure it never happens again, you can make
> the object pigment infinitely long in the z-axis by changing your object
> pigment like so:
>
> pigment_pattern{
> object{my_text 0,1}
> translate<1.5,0,0>
> warp{planar}
> }
>
> As long as you made the first 'translate' in the text object's
> definition, this should work just fine.
>
> Sam
Ok, that works as advertised. But I stumbled upon a new wrinkle.
I want to apply the 2D text to a flat object: disc, plane, sheet of paper,
or im my case a mesh.
(I'm looking the the scroll object at
http://lib.povray.org/searchcollection/index.php }
I've even succeeded in getting the text to run cross-wise or along the
length of the scroll. No code to share yey, it is very rough. Problem is
that the text 'bleeds through' and is visible from both sides of the
object.
Is there some way to apply a pigment to the 2D text and a different pigment
to the surrounding area including the opposite side, or maybe even a 3rd
pigment to the opposite side alone?
Leef_me
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Samuel Benge
Subject: Re: Simple 2D text on a cylinder's surface
Date: 23 Oct 2007 17:42:19
Message: <471e6abb@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Leef_me wrote:
> Ok, that works as advertised. But I stumbled upon a new wrinkle.
>
> I want to apply the 2D text to a flat object: disc, plane, sheet of paper,
> or im my case a mesh.
> (I'm looking the the scroll object at
> http://lib.povray.org/searchcollection/index.php }
>
> I've even succeeded in getting the text to run cross-wise or along the
> length of the scroll.
Good work!
> No code to share yey, it is very rough. Problem is
> that the text 'bleeds through' and is visible from both sides of the
> object.
>
> Is there some way to apply a pigment to the 2D text and a different pigment
> to the surrounding area including the opposite side, or maybe even a 3rd
> pigment to the opposite side alone?
>
> Leef_me
Not having used the scroll object, I cannot say for certain if this will
work with it. You may want to try interior_texture. Since objects in POV
have two sides (inside, outside), there is a provision for texturing
both sides separately.
Try something like this:
object{ my_object
texture{
pigment{ my_text_pigment }
}
interior_texture{
pigment{ no_text_pigment }
}
}
Sam
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Not having used the scroll object, I cannot say for certain if this will
> work with it. You may want to try interior_texture. Since objects in POV
> have two sides (inside, outside), there is a provision for texturing both
> sides separately.
>
> Try something like this:
>
> object{ my_object
> texture{
> pigment{ my_text_pigment }
> }
> interior_texture{
> pigment{ no_text_pigment }
> }
> }
This should work fine, the scroll is a surface without a
clearly defined inside... the back is the interior_texture.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Tim Attwood" <tim### [at] comcast net> wrote:
> > Not having used the scroll object, I cannot say for certain if this will
> > work with it. You may want to try interior_texture. Since objects in POV
> > have two sides (inside, outside), there is a provision for texturing both
> > sides separately.
> >
> > Try something like this:
> >
> > object{ my_object
> > texture{
> > pigment{ my_text_pigment }
> > }
> > interior_texture{
> > pigment{ no_text_pigment }
> > }
> > }
>
> This should work fine, the scroll is a surface without a
> clearly defined inside... the back is the interior_texture.
Thanks Sam and Tim, and also to Gregjohn for his original question
I found out about interior_texture a little while ago by reading and
experiments
I found that I had to use keyword uv_mapping or the text was pixelated as
before
For anyone else, here is an example of a disc with text and background on
one side and background only on the other side
#declare my_text= text{ ttf"arialbd.ttf" "This is a test" 1,0
translate -z/2
// suggested by fellow pover Samuel Benge Date: 21 Oct 2007 20:39:07
// Re: Simple 2D text on a cylinder's surface
scale .2
//rotate <0,0,90>
translate<-.7,0,0>
// when the Z rotation is 90, then these parameters are y,x,z
// when the Z rotation is 0, then these parameters are x,y,z
}
disc {
<0, 0, 0> // center position
y, // normal vector
1.0, // outer radius
uv_mapping
texture { // one side has background and text
pigment{
pigment_pattern{
object{my_text 0,1}
}
pigment_map{
[0 color Black]
[1 color White]
}
}
}
interior_texture { // the other side has another background
pigment {
color Blue
}
}
rotate x*-45
rotate x*90*clock // look at both sides of the disc
}
Leef_me
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
This appears to be the solution I will have to employ. My original intent was to
make use of POV-Ray as a very low (like, zero) cost solution for a complex and
tedious problem. However, POV itself has turned out to be a complex and tedious
system that has more flaws and shortcomings than the manual solution provided by
other tools.
So, it's back to Google to shop for 3D design tools that won't bust the budget.
Thanks for all the help, folks. See you around.
--
Marty Schrader
Embedded Technology Consulting from
Parsec Systems, Inc.
0N107 Cottonwood Drive
Wheaton, IL 60187
(630) 588-0241
www.parsecsystemsinc.com
mar### [at] parsecsystemsinc com
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |