POV-Ray : Newsgroups : povray.text.scene-files : vortex tile 2step Server Time
5 Jul 2024 09:44:37 EDT (-0400)
  vortex tile 2step (Message 1 to 1 of 1)  
From: Pete
Subject: vortex tile 2step
Date: 24 Nov 2000 12:37:51
Message: <2674.363T2145T6865282PeterC@nym.alias.net>
These are the 2 source files for the image I posted on
povray.binaries.images.
        To achieve a vortex tile effect, I actually had to
create two povray scripts.  The first one creates an
intermediate image which is then read by the second povray file
to then generate the final output.
        The first .pov file reads in the image to be tiled and
tiles it on a floor plane.  A panoramic camera is used to get a
360 degree view.  Make this a higher resolution than your
intended final image size.  I used 2048x2048 for the output size
of this first file.
        The second .pov file reads the image outputted by the
first one and uses a cylindrical wrapping to wrap the image
around the interior of a cone.  The camera looks in the cone,
from the open end, pointed at the pointy end.  The output of
this .pov file is the final resultant image.
        Both files are Official POV-Ray 3.1 for maximum
portability between Amiga and PC (and Mac?).



The first .pov file: (zutil_pt1.pov)
~~~~~~~~~~~~~~~~~~~~

camera {
  location 0
  panoramic // 360 degree sweep
  direction <0, 0, 1>
  right <1, 0, 0>
  up <0, 1, 0>
}


background { color rgb 1 } // adjust to taste


fog { // so that we get a white point in the center
  distance 50
  fog_type 2 // ground fog
  fog_offset 0
  fog_alt 1
  color rgb 1
}


plane { // floor
  <0, 1, 0>, -0.5
  pigment {
    image_map {
      tga "zomatile_24.tga"  // your input image map
      interpolate 2
    }
    rotate x*90
    warp {
      repeat <1, 0, 0> flip <1, 0, 0>
    }
    warp {
      repeat <0, 0, 1> flip <0, 0, 1>
    }
    scale <4/3, 1, 1> // proportion to input image size
    scale 1/2
  }
  finish { ambient 1 diffuse 0 }
}


/* actual end of this file */




The second .pov file (zutil_pt2.pov)
~~~~~~~~~~~~~~~~~~~~

/* reads in a cylindrical projection created by
   a panoramic camera and maps it onto a cone shape in such
   a way as to (hopefully) get a vortex tiling effect */


#declare ntsc = false;


camera {
  location 0
  direction <0, 0, 32>
  #if (ntsc = true)
    right <(640/400) * (10/11), 0, 0>
  #else
    right <640/480, 0, 0>
  #end
  up <0, 1, 0>
  rotate z*-17 // to taste
  translate <0, 0, -16>
}


background { color rgb 0.75 } // actually unnecesary


intersection {
  cylinder { <0, 0, 0.001>, <0, 0, 1.999>, 2 }
  cone { <0, 0, 0>, 2, <0, 0, 2>, 0 inverse }
  pigment {
    image_map {
      tga "zutil_pt1.tga"  // output from first .pov file
      map_type 2 // cylindrical
      interpolate 2
    }
    rotate x*90
    scale <1, 1, 4> // we only want to use the bottom half of the image
  }
  finish { ambient 1 diffuse 0 }
}


/* actual end of this file */



Enjoy!


Post a reply to this message

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