POV-Ray : Newsgroups : povray.general : Bent text? Server Time
7 Nov 2024 15:35:45 EST (-0500)
  Bent text? (Message 1 to 10 of 22)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Hershel Robinson
Subject: Bent text?
Date: 14 Feb 2002 08:13:50
Message: <3c6bb80e@news.povray.org>
I would like to model a column with words engraved or carved into or out of
(i.e. protruding from) the column.  I don't know how to create 3D letters
which are curved to match the column, however.

The hard way would be to use Chris Colefax's Bend include file.  Hard in
terms of render time--I have more than one column with unique text.  I would
like to ask if anyone knows of an easier way to accomplish this.

Thanks,
Hershel


Post a reply to this message

From: Bill DeWitt
Subject: Re: Bent text?
Date: 14 Feb 2002 08:23:56
Message: <3c6bba6c@news.povray.org>
"Hershel Robinson" <her### [at] yahoocom> wrote in message
news:3c6bb80e@news.povray.org...
> I would like to model a column with words engraved or carved into or out
of
> (i.e. protruding from) the column.  I don't know how to create 3D letters
> which are curved to match the column, however.
>
> The hard way would be to use Chris Colefax's Bend include file.  Hard in
> terms of render time--I have more than one column with unique text.  I
would
> like to ask if anyone knows of an easier way to accomplish this.

    I don't think you can bend the individual letters in any easy way, but
there are ways to parse out the text string and rotate out each letter. Here
is the sample file I copied from somewhere...

background {
    color rgb 1
}

#declare Rotation = clock + 55;
#declare CText = "SOPHIE'S WORLD  SOPHIE'S WORLD  SOPHIE'S WORLD  "

camera {
 location <0, 0, -8>
 direction <0, 0, 1.5>
 look_at <0, 0, 0>
}

light_source {
 <-1, 1, -12>
 colour rgb <1.3, 1.3, 1.3>
}

#declare Letter = 1;


union {
 #while (Letter <= strlen (CText))
  text {
   ttf "c:\windows\fonts\courbd.ttf", substr (CText, Letter, 1), 0.1, 0
   translate <0, -0.5, -3>
            scale <0.55, 1.1, 1>
   rotate <0, -360 / strlen (CText) * Letter, 0>
   no_shadow
  }
  #declare Letter = Letter + 1;
 #end
 texture {
  pigment {
   colour rgb 0.9
  }
  finish {
   crand 0.01
  }
 }
 rotate <0, Rotation, 0>
 rotate <15, 0, 20>
}


Post a reply to this message

From: Chaps
Subject: Re: Bent text?
Date: 14 Feb 2002 08:30:55
Message: <3c6bbc0f$1@news.povray.org>
Hi Hershel,

I can propose you something that worked for one of my picture, move and
place each letter individualy. It is painfull when writing the scene, but
efficient at rendering. I used the following macro to place each letter. It
can be automated.

//Macro
#macro MDepTexte(Ax)
#declare DepTexte = transform {
        scale 1.5
        rotate 90*z
        translate <0,0,-4>
        rotate Ax * x
        translate <0,0,4>
        translate <-7,-2,-1>}
transform DepTexte
#end

// usage: to write 3 times the word Spheres
#declare Angle = 16;
#declare AngOff = -120;
#declare i =0;

#while (i<3)

// create a TrueType text shape
text
{
  ttf
  "couri.ttf",
  "S",
  0.5,
  0
  MDepTexte(-3*Angle+AngOff)
  texture { T_Stone27 scale 2 }
}
text
{
  ttf
  "couri.ttf",
  "p",
  0.5,
  0
  MDepTexte(-2*Angle+AngOff)
  texture { T_Stone27 scale 2 }
}
text
{
  ttf
  "couri.ttf",
  "h",
  0.5,
  0
  MDepTexte(-1*Angle+AngOff)
  texture { T_Stone27 scale 2 }
}
text
{
  ttf
  "couri.ttf",
  "e",
  0.5,
  0
  MDepTexte(0*Angle+AngOff)
  texture { T_Stone27 scale 2 }
}
text
{
  ttf
  "couri.ttf",
  "r",
  0.5,
  0
  MDepTexte(1*Angle+AngOff)
  texture { T_Stone27 scale 2 }
}
text
{
  ttf
  "couri.ttf",
  "e",
  0.5,
  0
  MDepTexte(2*Angle+AngOff)
  texture { T_Stone27 scale 2 }
}
text
{
  ttf
  "couri.ttf",
  "s",
  0.5,
  0
  MDepTexte(3*Angle+AngOff)
  texture { T_Stone27 scale 2 }
}

#declare AngOff = AngOff + 120;
#declare i = i + 1;

#end // while

"Hershel Robinson" <her### [at] yahoocom> wrote in message
news:3c6bb80e@news.povray.org...
> I would like to model a column with words engraved or carved into or out
of
> (i.e. protruding from) the column.  I don't know how to create 3D letters
> which are curved to match the column, however.
>
> The hard way would be to use Chris Colefax's Bend include file.  Hard in
> terms of render time--I have more than one column with unique text.  I
would
> like to ask if anyone knows of an easier way to accomplish this.
>
> Thanks,
> Hershel
>
>


Post a reply to this message

From:
Subject: Re: Bent text?
Date: 14 Feb 2002 08:33:54
Message: <pren6u0olknsehje4gi23m9i8jn5bnrn65@4ax.com>
On Thu, 14 Feb 2002 15:14:43 +0200, "Hershel Robinson" <her### [at] yahoocom>
wrote:
> I would like to model a column with words engraved or carved into or out of
> (i.e. protruding from) the column.  I don't know how to create 3D letters
> which are curved to match the column, however.
>
> The hard way would be to use Chris Colefax's Bend include file.  Hard in
> terms of render time--I have more than one column with unique text.  I would
> like to ask if anyone knows of an easier way to accomplish this.

If you want bend text but each letter can stay as is then you can use this
method:

1. split text into letters
2. measure width of each letter
3. create spline along  column
4. walk along spline and measure distance to its origin
5. put every next letter when the measured distance = width of previous letter

note: remember to reorient letter according to current dirrection of spline

something similiar was done in circle_text macro in 3.5

ABX


Post a reply to this message

From: Ron Parker
Subject: Re: Bent text?
Date: 14 Feb 2002 08:55:44
Message: <slrna6ngf2.vgm.ron.parker@fwi.com>
On Thu, 14 Feb 2002 15:14:43 +0200, Hershel Robinson wrote:
> I would like to model a column with words engraved or carved into or out of
> (i.e. protruding from) the column.  I don't know how to create 3D letters
> which are curved to match the column, however.

Somebody sit down with the object pattern and a cylinder warp and an 
isosurface and whip something up for the poor chap, eh?  I would, but I
don't happen to have a running copy of POV at the moment.

-- 
#local R=<7084844682857967,0787982,826975826580>;#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's


Post a reply to this message

From:
Subject: Re: Bent text?
Date: 14 Feb 2002 09:14:17
Message: <dmgn6u8f93mc51mqg6g0pbrckt9t82stq2@4ax.com>
On 14 Feb 2002 08:55:44 -0500, Ron Parker <ron### [at] povrayorg> wrote:
> > I would like to model a column with words engraved or carved into or out of
> > (i.e. protruding from) the column.  I don't know how to create 3D letters
> > which are curved to match the column, however.
>
> Somebody sit down with the object pattern and a cylinder warp and an 
> isosurface and whip something up for the poor chap, eh?  I would, but I
> don't happen to have a running copy of POV at the moment.

I have tried isosurfaces bulided from object patter with megapov but it was
explained to me (iirc in p.u-p) that it is impossible to properly calculate
normal (iirc it was connected with gradient)
(my try is at http://www.abx.art.pl/pov/nonlinear/twist.jpg )
so does your reply means it is now possible in 3.5 ?
Is "yes" then great - I'll refresh my scripts probably.

ABX


Post a reply to this message

From: Christoph Hormann
Subject: Re: Bent text?
Date: 14 Feb 2002 09:18:11
Message: <3C6BC723.B154333A@gmx.de>
Ron Parker wrote:
> 
> Somebody sit down with the object pattern and a cylinder warp and an
> isosurface and whip something up for the poor chap, eh?  I would, but I
> don't happen to have a running copy of POV at the moment.
> 

Ron, you disappoint me.

You should really know that object pattern & isosurface are not a very
good combination.

Get back to your source files and don't try solving trivial users'
problems... ;-)

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 06 Feb. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Tom Melly
Subject: Re: Bent text?
Date: 14 Feb 2002 09:24:06
Message: <3c6bc886$1@news.povray.org>
"Hershel Robinson" <her### [at] yahoocom> wrote in message
news:3c6bb80e@news.povray.org...

<snip>

As Bill said, the question is, do you need to bend each individual letter? If
not, Bill's script will probably do it.

Also, you could improve the final appearence by intersecting the text with a
column slightly wider than the column that will hold the letters. This will give
the text a curved surface.


Post a reply to this message

From: Christoph Hormann
Subject: Re: Bent text?
Date: 14 Feb 2002 09:33:25
Message: <3C6BCAB5.4FB2FD22@gmx.de>
Hershel Robinson wrote:
> 
> I would like to model a column with words engraved or carved into or out of
> (i.e. protruding from) the column.  I don't know how to create 3D letters
> which are curved to match the column, however.

There's a fairly elegant and fast method for this using the
'HF_Cylinder()' macro from Povray 3.5 and an object pattern function.

Of course this isn't perfect if you have a close view of the object, but
since it's probably faster than any text object CSG solution it's worth
trying.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 06 Feb. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Ron Parker
Subject: Re: Bent text?
Date: 14 Feb 2002 09:47:40
Message: <slrna6njge.vjg.ron.parker@fwi.com>
On Thu, 14 Feb 2002 15:18:11 +0100, Christoph Hormann wrote:
> 
> 
> Ron Parker wrote:
>> 
>> Somebody sit down with the object pattern and a cylinder warp and an
>> isosurface and whip something up for the poor chap, eh?  I would, but I
>> don't happen to have a running copy of POV at the moment.
>> 
> 
> Ron, you disappoint me.
> 
> You should really know that object pattern & isosurface are not a very
> good combination.

Yeah, what was I thinking, looking at Gilles' spherical text thing and 
then extrapolating.

-- 
#macro R(P)z+_(P)_(P)_(P+1)_(P+1)+z#end#macro Q(C,T)bicubic_patch{type 1u_steps
6v_steps 6R(1)R(3)R(5)R(7)pigment{rgb z}}#end#macro _(Y)#local X=asc(substr(C,Y
,1))-65;<T+mod(X,4)div(X,4)9>-2#end#macro O(T)Q("ABEFUQWS",T)Q("WSXTLOJN",T)#
end O(0)O(3)Q("JNKLCGCD",0)light_source{x 1}// ron### [at] povrayorg


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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