 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3dc568ae$1@news.povray.org>,
> 1. create your cylinder
> 2. create a second cylinder with r=r1+0.0001
> 3. create your text on the right position
> 4. put your text and the cylinder from 2. together
> with intersection{}
This is actually a very clumsy, limited, and unnecessarily slow way of
doing it. Just use the object pattern.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3dc57d2f@news.povray.org>,
"J Tellings" <j_t### [at] hotmail com> wrote:
> Thanks, but ive already got the solution from anyone else.
That "solution" was about as close to the "wrong way" to do it as you
can get. Use the object pattern, it was designed for this.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Christopher James Huff" <chr### [at] mac com> wrote in message
news:chr### [at] netplex aussie org...
> In article <3dc57d2f@news.povray.org>,
> "J Tellings" <j_t### [at] hotmail com> wrote:
>
> > Thanks, but ive already got the solution from anyone else.
>
> That "solution" was about as close to the "wrong way" to do it as you
> can get. Use the object pattern, it was designed for this.
I can get flat text on a cylinder with object pattern, but I can't do it
with 3D-text. I am a beginner, and this is my first image, so can anyone
give more info please.
THanks!
> --
> Christopher James Huff <cja### [at] earthlink net>
> http://home.earthlink.net/~cjameshuff/
> POV-Ray TAG: chr### [at] tag povray org
> http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"J Tellings" <j_t### [at] hotmail com> wrote in message
news:3dc68eea$1@news.povray.org...
>
> I can get flat text on a cylinder with object pattern, but I can't do it
> with 3D-text. I am a beginner, and this is my first image, so can anyone
> give more info please.
> THanks!
You could try something like:
#version 3.5;
#include "colors.inc"
global_settings {
assumed_gamma 1.0
}
// ----------------------------------------
camera {
location <0.0, 0.5, -4.0>
look_at <0.0, 0.0, 0.0>
}
light_source {
<0, 0, 0> // light's position (translated below)
color rgb <1, 1, 1> // light's color
translate <-30, 30, -30>
}
// ----------------------------------------
#macro RotText(Letter, RotY)
text {
ttf
"arial.ttf",
Letter,
2,
0
pigment{Yellow}
scale 0.25
translate z*-1.1
rotate y*RotY
}
#end
cylinder { <0, -1, 0>, <0, 1, 0>, 1 pigment{Red}}
intersection{
union{
RotText("A",40)
RotText("B",30)
RotText("C",20)
RotText("D",10)
RotText("E",0)
RotText("F",-10)
RotText("G",-20)
RotText("H",-30)
RotText("I",-40)
}
cylinder{<0,-1,0>,<0,1,0>,1.05}
pigment{Yellow}
}
The intersection is to give the front of the letters a curve to match the
cylinder. The main drawback of this approach is that the letters themselves
aren't curved. You would only really notice this problem if you were using
relatively large letters.
BTW - keep checking back, I'm sure this method is pretty crappy, but there's
nothing like someone posting a crap way of doing something to provoke some
decent suggestions ;)
Apart from anything else, the macro could be better, in that it should allow you
to input a whole string, rather than having to call it one time for each letter,
but at least this version is easily comprehensible (I hope).
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Tom Melly wrote:
> Apart from anything else, the macro could be better, in that it should
> allow you to input a whole string, rather than having to call it one time
> for each letter, but at least this version is easily comprehensible (I
> hope).
Hmm, using the min_extent and max_extent functions and a little
trigonometry it should be possible to handle even variable-width fonts
automatically... Heh, I just noticed that it is actually already done and
is part of the POV 3.5 standard library - the Circle_Text macro in
shapes.inc. Only problem is that it rotates around the wrong axis, z
instead of y, but it should be possible to modify it relatively easily.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3dc68eea$1@news.povray.org>,
"J Tellings" <j_t### [at] hotmail com> wrote:
> I can get flat text on a cylinder with object pattern, but I can't do it
> with 3D-text. I am a beginner, and this is my first image, so can anyone
> give more info please.
Ah, you want a circular text object...well, shapes.inc includes a
Circle_Text() macro, but it makes a circle in the plane of the text. It
shouldn't be hard to modify to wrap text in this way, though.
The text object is pretty limited though, you might want to just make
your own text from CSG or use a third party mesh editor.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tag povray org
http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
J Tellings <j_t### [at] hotmail com> wrote:
> I can get flat text on a cylinder with object pattern, but I can't do it
> with 3D-text.
Oh, I thought you just wanted to apply text to a cylinder (like if it
was an image map). I didn't understand that you really wanted 3D letters.
In that case the only(?) way would be to rotate and translate individual
letters. This can be pretty much automatized, as can be seen in the
already-mentioned Circle_Text() macro. Looking at how this macro is
done should help you.
--
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}// - Warp -
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Warp" <war### [at] tag povray org> schrieb im Newsbeitrag
news:3dc6d323@news.povray.org...
> In that case the only(?) way would be to rotate and translate individual
> letters.
As there are letters in the IsoCSG Library, it would be possible to bend
the full text, including the letters, not just rotate and translate them.
That would be the "right way", but it is of course overkill to use
isosurfaces for the average 3D text on a cylinder.
Just an answer to the (?) :-).
Regards,
Marc-Hendrik
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Marc-Hendrik Bremer <Mar### [at] t-online de> wrote:
> As there are letters in the IsoCSG Library, it would be possible to bend
> the full text, including the letters, not just rotate and translate them.
> That would be the "right way", but it is of course overkill to use
> isosurfaces for the average 3D text on a cylinder.
Calculating the intersection of the (already rotated+translated) letters
and a cylinder will give a cylindrical surface to them, which should work
rather well inside a specific range (meaning that the angle between adjacent
letter should not be too high, or else the will be some kind of ugly
distortion, as this is not true bending, but just "carving" the outer
part of the letter to be round).
Btw, is it more efficient to calculate the intersection of a cylinder
and the union of the letters, or making a union with the intersections of
individual letters with (identical) cylinders?
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 7 Nov 2002 10:09:00 -0500, Warp <war### [at] tag povray org> wrote:
> Btw, is it more efficient to calculate the intersection of a cylinder
>and the union of the letters, or making a union with the intersections of
>individual letters with (identical) cylinders?
The latter proves to be faster in 99% of the cases, since the
resulting bounding boxes are smaller. , The text object is in its own
right quite slow in CSG, so using single letters reduces the strain a
lot.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vip bg
TAG e-mail : pet### [at] tag povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |