 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Hershel Robinson" <her### [at] yahoo com> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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] yahoo com> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 14 Feb 2002 15:14:43 +0200, "Hershel Robinson" <her### [at] yahoo com>
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 14 Feb 2002 08:55:44 -0500, Ron Parker <ron### [at] povray org> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Hershel Robinson" <her### [at] yahoo com> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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] povray org
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3C6BC723.B154333A@gmx.de>,
Christoph Hormann <chr### [at] gmx de> wrote:
> You should really know that object pattern & isosurface are not a very
> good combination.
On the other hand, the HF_Cylinder() macro doesn't have this problem...
And the blur/'proximity' thread in povray.text.scene-files has some code
that should make the object pattern more acceptable to
isosurfaces...though also very, very slow.
--
Christopher James Huff <chr### [at] mac com>
POV-Ray TAG e-mail: chr### [at] tag povray org
TAG web site: http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hershel Robinson <her### [at] yahoo com> wrote in message
news:3c6bb80e@news.povray.org...
The easiest but ugly way would be to subtract tall letters from the column
and then fill in underneath them with a cylinder of smaller diameter than
your column.
-Shay
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 14 Feb 2002 15:14:43 +0200, "Hershel Robinson"
<her### [at] yahoo com> 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.
Type your text in a paint program or render it white-on-black in POV,
then use the resulting image to displace an isosurface. Some blurring
on the image would help as it would decrease the gradient of the
isosurface and will reduce render times. It will probably look better,
too.
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 14 Feb 2002 14:33:19 +0100, W�odzimierz ABX Skiba <abx### [at] babilon org>
wrote:
> 1. split text into letters
> 2. measure width of each letter
Thinking more about above two operations I found that it's not a trivial task
when kerning is considered. I have posted my solution at:
http://news.povray.org/sa6q6u8ic6tt2ntql1kt4mm2fiebtf1pih%404ax.com
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 14 Feb 2002 15:18:11 +0100, Christoph Hormann <chr### [at] gmx de>
wrote:
> object pattern & isosurface are not a very
> good combination.
Well, I have an idea around this problem. In the truth it's even feature
request. What about changing definition of Inside method of objects ?
I mean if it could return not only yes/no to describe object but variable
float value to describe distance (not in units) to surface just like
isosurface does. So positive value means outside, zero means surface, negative
means inside.
In particular:
- for plane it returns linear distance to plane
- for sphere it returns distance to center minus radius
- for cylinders, cones, linear lathes, linear prisms, boxes, disc, separated
triangles, polygons, heighfields, torus etc. it returns obvious combination of
plane and sphere method listed above
- for csg it returns min/max of insides of components (just like method used
in isosurfaces)
- for isosurface and blob it returns value of function modified with threshold
- meshes and other patches has no inside now so no problem with them
I suppose it could be probably possible also for rest of object like: julia,
curved lathe, prism, sor, and sphere_sweep, superellipsoid, ttf, quadrics,
polys etc. They are available with formulas so probably calculation of value
could be possible.
I want to highlight that I don't mean linear distance. I mean value of math
formula used to build shape.
It should allow then recreation of object via object pattern with isosurface
and easy displace of surface of complex CSGs, bending, twisting perhaps even
beveling etc. It could be probably either blur and proximity pattern :-)
What do you think?
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Warp
Subject: Re: Extended object pattern (was Re: Bent text?)
Date: 15 Feb 2002 12:30:02
Message: <3c6d459a@news.povray.org>
|
|
 |
|  |
|  |
|
 |
W³odzimierz ABX Skiba <abx### [at] babilon org> wrote:
: Well, I have an idea around this problem. In the truth it's even feature
: request. What about changing definition of Inside method of objects ?
: I mean if it could return not only yes/no to describe object but variable
: float value to describe distance (not in units) to surface just like
: isosurface does.
I suggested this some time ago (a year or two perhaps). It would make
the proximity pattern much faster.
--
#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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Fri, 15 Feb 2002 18:21:17 +0100, W�odzimierz ABX Skiba <abx### [at] babilon org>
wrote:
> - meshes and other patches has no inside now so no problem with them
I wonder if it could be possible even for patches but returns not negative
values (becouse of no inside). Then with small treshold it could be possible
to rebuild mesh with isosurface and displace its surface.
Also this whole solution makes my old deform patch unnecessary.
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
From: Christoph Hormann
Subject: Re: Extended object pattern (was Re: Bent text?)
Date: 15 Feb 2002 13:00:50
Message: <3C6D4CD0.625A64E8@gmx.de>
|
|
 |
|  |
|  |
|
 |
"W³odzimierz ABX Skiba" wrote:
>
> Well, I have an idea around this problem. In the truth it's even feature
> request. What about changing definition of Inside method of objects ?
> I mean if it could return not only yes/no to describe object but variable
> float value to describe distance (not in units) to surface just like
> isosurface does. So positive value means outside, zero means surface, negative
> means inside.
>
This would be nice, but for shapes like text a combination of lots of
different functions would be necessary, therefore it would be quite slow,
even though having this internally instead of in user defined functions
would probably be faster.
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Wasn't it W³odzimierz ABX Skiba who wrote:
>On Thu, 14 Feb 2002 15:14:43 +0200, "Hershel Robinson" <her### [at] yahoo com>
>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
It's quite easy to grab a copy of circle_text and just flip the letters
the right way out. If you want the individual letters to actually have
bent surfaces, then invoke the Cylinder_Text macro with a slightly
larger Radius value, and then trim it by intersecting with a cylinder of
the required radius.
#include "shapes.inc"
/* Cylinder_Text( Font, Text, Size, Spacing, Thickness, Radius,
Inverted, Justification, Angle )
Creates a text object with the bottom (or top) of the character cells
aligned with all or part of a circle. This macro should be used inside
an object{...} block.
Font: The font to use (see the documentation for the text object)
Text: The text string to be created
Size: The height of the text string, as you would use to scale a
standard text object
Spacing: The amount of space to add between the letters.
Thickness: The thickness of the letters (see the documentation for
the text object)
Radius: The radius of the cylinder along which the letters are
aligned
Inverted: If this parameter is nonzero, the tops of the letters
will point downwards (not really much point doing that,
I just copied it from Circle_text)
Justification: One of the constants Align_Left, Align_Right, or
Align_Center
Angle: The point on the circle from which rendering will begin.
The +x direction is 0 and the -z direction is 90 */
#macro Cylinder_Text(F, T, S, Sp, Th, R, I, J, A)
#local FW = Text_Width(F, T, S, Sp);
#local TO = text {ttf F T 1 0 scale<S, S, 1>}
#local TH = max_extent(TO).y;
#local C = array[strlen(T)]
#if(FW > 2*pi*R)
#error concat("\n\n**** Text string \"", T,
"\" is too long for a circle of the specified radius.\n\n\n")
#end
#local AW = -FW*180/pi/R;
#local SA = A;
#local EA = A + AW;
#if(((J = Align_Right) & !I)|((J = Align_Left) & I))
#local SA = A - AW;
#local EA = A;
#else
#if(J = Align_Center)
#local SA = A - AW/2;
#local EA = A + AW/2;
#end
#end
#local CI = 1;
#while(CI <= strlen(T))
#local OE = Text_Width(F, substr(T,CI,1), S, Sp);
#local LW = Text_Width(F, substr(T,1,CI), S, Sp) - OE;
#local LA = SA + AW*LW/FW + OE/2/FW*AW;
#if(I)
#local LA = EA - (LA - SA);
#end
#local TO = text {ttf F substr(T, CI, 1) Th 0 scale<S,S,1>}
#if(I)
#local C[CI-1] =
object {TO
rotate 180*z
translate <OE/2, TH, 0>
rotate -90*y
translate R*x
rotate LA*y
}
#else
#local C[CI-1] =
object {TO
translate -OE/2*x
rotate -90*y
translate R*x
rotate LA*y
}
#end
#local CI = CI + 1;
#end
//Create the final object, a union of individual text object letters.
union {
#local CI=0;
#while(CI < strlen(T))
object {C[CI]}
#local CI = CI + 1;
#end
}
#end
// End of macro - start of example code
camera { location <0, 1, -4> look_at <0, 0, 0>}
light_source {<0,200,-100> colour rgb 1}
#declare Radius = 2;
object {
//intersection {
Cylinder_Text("arial.ttf", "This is a test", 1, -0.1, 1, Radius, 0,
Align_Left, 150)
//cylinder {-y,y,Radius}
//}
pigment {rgb 1}
}
cylinder {-y,1.5*y,Radius-0.05 pigment {rgb 1}}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Fri, 15 Feb 2002 19:00:48 +0100, Christoph Hormann <chr### [at] gmx de>
wrote:
> This would be nice, but for shapes like text a combination of lots of
> different functions would be necessary, therefore it would be quite slow,
Not a problem. We are years before 4.0 so faster machines we use to test it.
;-)
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <o1fq6uk3k4bmuu1kqeqd0mmpgu976nlg45@4ax.com>,
W?odzimierz ABX Skiba <abx### [at] babilon org> wrote:
> Well, I have an idea around this problem. In the truth it's even feature
> request. What about changing definition of Inside method of objects ?
> I mean if it could return not only yes/no to describe object but variable
> float value to describe distance (not in units) to surface just like
> isosurface does. So positive value means outside, zero means surface, negative
> means inside.
This is what I've been doing for the updated proximity pattern/glow
patch. (which is on hold until POV 3.5 is complete)
However, it would be a very bad idea to replace the Inside() method with
this, as it would often take much longer to compute proximity than to
figure out inside/outsideness...I just added a new proximity method.
(two actually...one for proximity of a point, another for proximity of a
ray)
--
Christopher James Huff <chr### [at] mac com>
POV-Ray TAG e-mail: chr### [at] tag povray org
TAG web site: http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Fri, 15 Feb 2002 13:14:46 -0500, Christopher James Huff <chr### [at] mac com>
wrote:
> However, it would be a very bad idea to replace the Inside() method with
> this, as it would often take much longer to compute proximity than to
> figure out inside/outsideness...
But I imagine yes/no inside is calculated with real flot and then "booleaned"
with condition. Look at Inside_Plane, Inside_Sphere. Also Inside_Glyph look
complicated enough to think it somehow calculates distance :-)
But of course you can be right. I don't know internal behaviour of all
Inside() methods.
ABX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |