POV-Ray : Newsgroups : povray.general : effects on z-axis of text : Re: effects on z-axis of text Server Time
23 May 2024 12:17:56 EDT (-0400)
  Re: effects on z-axis of text  
From: Bald Eagle
Date: 6 Sep 2019 19: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-2023 Persistence of Vision Raytracer Pty. Ltd.