|  |  | global_settings {assumed_gamma 2.2}
#include "colors.inc"
camera {
   location <0, 0, -8>
   direction <0, 0,  1.3>
   look_at <0, 0, 0>
} //camera
light_source {<0, 0, -1000> color White * 1.5}
#if (clock <= .5)
   #local NewClock = clock * 2;
#else
   #local NewClock = (clock - .5) * 2;
#end //#if
#local LeftReductionFactor = 1;   //Reduce intensity by this much during
first pass.
#local RightReductionFactor = .2; //0 means no reduction, 1 means total
reduction.
                                  //Switch values to fade from right to
left, or
                                  //use "gradient y" to fade from top to
bottom or
                                  //bottom to top. This method can be
adapted to use
                                  //"radial" to fade in a circular pattern.
Also,
                                  //use the clock value to adjust brightness
of any
                                  //texture, not just plain white.
#local TitleColor = texture {
   pigment {
      gradient x
      color_map {
         #if (clock <= .5)
            [0 color White * (1 - NewClock * LeftReductionFactor)] //Left
            [1 color White * (1 - NewClock * RightReductionFactor)] //Right
         #else
            [0 color White * ((1 - LeftReductionFactor) - NewClock * (1 -
LeftReductionFactor))] //Left
            [1 color White * ((1 - RightReductionFactor) - NewClock * (1 -
RightReductionFactor))] //Right
         #end //#if
      } //color_map
   } //pigment
} //texture
//#local TitleColor = texture {pigment {color White * clock}} //Plain fade
#local TitleText = text {ttf "c:windowsfontsTimes.ttf" "Hi There, Everyone!"
..0001, 0}
#local TitleSize = max_extent (TitleText) - min_extent (TitleText);
#local TitleWidth = TitleSize.x;
#local TitleTextScaleFactor = 7 / TitleWidth;
#local TitleWidth = TitleWidth * TitleTextScaleFactor;
#local TitleText = object {TitleText scale <TitleTextScaleFactor,
TitleTextScaleFactor, 1>}
#local Title = object {
   TitleText
   texture {TitleColor scale <TitleWidth, 1, 1>}
   translate <-TitleWidth / 2, 1, 0>
} //object
object {Title}
Post a reply to this message
 |  |