POV-Ray : Newsgroups : povray.general : effects on z-axis of text Server Time: 15 Sep 2019 22:08:06 GMT
  effects on z-axis of text (Message 1 to 5 of 5)  
From: Kima
Subject: effects on z-axis of text
Date: 17 Aug 2019 16:30:01
Message: <web.5d582aa9523c7657ecc0fada0@news.povray.org>
In the text, the x-y coordinates are drawn by the given font, and the z-axis is
just the depth of the text.

I wonder if there is any possibility to add texture/curvature to the z-axis of a
text object?

For example, something like
https://thumbs.dreamstime.com/z/large-red-3d-text-20104475.jpg


Post a reply to this message

From: Le Forgeron
Subject: Re: effects on z-axis of text
Date: 18 Aug 2019 05:58:19
Message: <5d58e8fb$1@news.povray.org>
Le 17/08/2019 à 18:26, Kima a écrit :
> In the text, the x-y coordinates are drawn by the given font, and the z-axis is
> just the depth of the text.
> 
> I wonder if there is any possibility to add texture/curvature to the z-axis of a
> text object?
> 
> For example, something like
> https://thumbs.dreamstime.com/z/large-red-3d-text-20104475.jpg
> 
> 
Greetings,

On an easy path, the short answer is No.

The long answer: each glyph of the text is made of connected 2D curves
(that the ttf definition) which are extended in the z axis (inside
povray). That extension is simple, it's a straight line..

Your image is showing a mesh made from letters, with rounded corners and
displacement based on curvature of the surface.


Post a reply to this message

From: Bald Eagle
Subject: Re: effects on z-axis of text
Date: 18 Aug 2019 12:25:00
Message: <web.5d5942a8a8a1fcab4eec112d0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

> On an easy path, the short answer is No.
>
> The long answer: each glyph of the text is made of connected 2D curves
> (that the ttf definition) which are extended in the z axis (inside
> povray). That extension is simple, it's a straight line..
>
> Your image is showing a mesh made from letters, with rounded corners and
> displacement based on curvature of the surface.

Yes, I thought about this one for a while.

The part that makes it difficult is that it's not all convex hull, so to speak.
The holes and concave curves make creating an offset surface challenging, and
also involves a lot of detailed work.

See Dave Blandston's excellent Bordered Chars include files to see how much work
he's done to make a single set of characters.

If you don't need _much_ rounding / bulging, you might be able to smooth-union /
blob together a letter and a thinner, slightly scaled up version of the letter
(so it's like a sandwich)  then you might get that bubble effect if you use the
right sign.

Otherwise, you may have to see about creating a mesh, or coming up with some
sort of clever addition / adjustment of the outer surface of the text based on
the surface normal.

Perhaps there's nonlinear scaling matrix transform that could be applied (make
sure the center-line crosses at z=0 or z=1) on the object or an isosurface, or
perhaps some clever fun-house mirror optical illusion that would fake such a
distorted effect.

What you see on the screen is not always what's "there" or actually "happening".


Post a reply to this message

From: Kima
Subject: Re: effects on z-axis of text
Date: 6 Sep 2019 22:45:00
Message: <web.5d72e0b5a8a1fcabecc0fada0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
>
> If you don't need _much_ rounding / bulging, you might be able to smooth-union /
> blob together a letter and a thinner, slightly scaled up version of the letter
> (so it's like a sandwich)  then you might get that bubble effect if you use the
> right sign.
>

How do you use blob for text?


Post a reply to this message

From: Bald Eagle
Subject: Re: effects on z-axis of text
Date: 6 Sep 2019 23:45:01
Message: <web.5d72eeb9a8a1fcabe87cbad00@news.povray.org>
"Kima" <nomail@nomail> wrote:

> How do you use blob for text?

It ain't easy, and it isn't fast.

(And I haven't fiddled with it enough to get it to work very well...)

But the idea is that you use POV-Ray's ability to take objects and turn them
into patterns which can be translated into a sort of function.

Then you use those two functions to make an isosurface that allows you to blob
together functions like in the wiki documentation

http://wiki.povray.org/content/Documentation:Tutorial_Section_3.2#Combining_isosurface_functions

or the way I've been playing with them, with an interpolation function.


Dividing the x and y by 1.1 in the function "scales the function up" - it's the
mathematical equivalent of [scale 1.1].

http://www.econym.demon.co.uk/isotut/substitute.htm#scale

I was hoping it would be faster and work a LOT better....


#version 3.8;
global_settings {assumed_gamma 1.0 }
#include "colors.inc"
#include "functions.inc"
#include "math.inc"



camera {
 //location <0, 0, -2.5>
 location <1.0, 0.5, -20>
 right x*image_width/image_height
 up y
 look_at <0, 0.5, 0>
 //look_at <0, 0, 0.01>
}
light_source {<1, 5, -20> rgb 1}
background {Gray10}

#declare Tan = texture {pigment {rgb <0.92, 0.60, 0.20>} finish {diffuse 0.7
specular 0.2 reflection 0.02}}
#declare Gray = texture {pigment {rgb 0.5}}
#declare Gray2 = texture {pigment {rgb 0.5}finish {diffuse 0.7 specular 0.2
reflection 0.02}}



#declare Mix = function (A, B, C) {(1-C)*A+C*B}
#declare SUa = function (A, B, K) {0.5 + 0.5*(B-A)/K}
#declare SUb = function (A, B, K) {min (max (SUa(A, B, K), 0), 1)}
#declare SmoothUnion = function (A, B, K) {Mix (B, A, SUb(A, B, K)) - K*SUb(A,
B, K)*(1.0-SUb(A, B, K))}

#declare Text_Object_1 =
text { ttf "timrom.ttf", "B", 0.5, 0.0 translate -z*0.25}

#declare _B =
function {
 pigment{
  object{
   Text_Object_1
   color rgb 0 // outside
   color rgb 1  // inside
  }// object
 } // end pigment
} // end function

  isosurface {
    function {SmoothUnion (_B (x, y, z).red, _B (x/1.1, y/1.1, z*2).red, 0.1)}
    open
    threshold 0
    #declare Gradient = 10;
    #declare Min_factor= 0.6;
    max_gradient Gradient
    //evaluate Gradient*Min_factor,  sqrt(Gradient/(Gradient*Min_factor)),  min
(0.7, 1.0)
    accuracy     0.01
    contained_by {box {<-1, -1, -1>, <3, 1, 1>}}
    //all_intersections
    polarity off
      interior_texture {Tan} texture {Tan}
      //rotate y*30
     scale 10
     //translate -x*10
    }


Post a reply to this message

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