|
|
Here is a scene file that produces a couple of images containing all the
standard T_Stone textures from stones.inc on numbered superellipsoids. Run
it as a single image to get T_Stone1 to T_Stone44 in one file, or run it a
two or three frame animation to get T_Stone1 to T_Stone25 in frame 1,
T_Stone25 to T_Stone44 in frame 2. and T_Stone1 to T_Stone44 in frame 3.
I hope this is useful to someone. :)
//-------------------------------------------------------------
// Persistence of Vision Ray Tracer Scene Description File
// File: Boxes.pov
// Vers: 3.5
// Desc: Show T_Stone textures on numbered superellipsoids in ZX plane
// Date: 24 Apr 2004
// Auth: PM 2Ring
//
// -F +A0.5 +AM2 +R2
// -D +A0.1 +AM2 +R2 +KFF3
//
global_settings {
assumed_gamma 1.0
}
#include "colors.inc"
// T_Stone1 - T_Stone44
#include "stones.inc"
#declare MK=44; //Number of complete stone textures defined in stones.inc
//Build a stone names array. We do this in an include file,
//since we can't manipulate identifiers directly
#declare FileName = "StonesArray0.inc";
#if(!file_exists(FileName))
#debug concat("\n\nBuilding include file, ", FileName, "...\n")
#fopen MyFile FileName write
#write (MyFile, "#declare StonesArray = array[", str(MK,0,0), "]{\n ")
#declare Sep = array[2]{",\n ", ", "} //output separator sequences
#declare K=1;
#while (K<=MK)
#write (MyFile, concat("T_Stone", str(K,0,0), Sep[!!mod(K,5)]))
#declare K=K+1;
#end
#write (MyFile, "\n}\n")
#fclose MyFile
#else
#debug concat("\n\nInclude file, ", FileName, " already exists.\n")
#end
//Load our stone names array
#include FileName
//Rounded box, with cutout in front face
#declare Scale = <3, 2, 1>;
#declare SScale = vlength(Scale)/sqrt(3);
#declare RBox =
difference{
superellipsoid {
<0.4, 0.4>
scale Scale
}
//Cutout
superellipsoid {
<0.1, 0.1>
scale Scale - .5
translate -1.25*z
}
}
#macro TextBox(Str)
union{
object{RBox}
text {
ttf "timrom.ttf" Str .975, 0
scale 3
translate <-1.25, -1.125, -.975>
}
}
#end
#macro BoxGrid(MJ, MI, K0)
union{
#declare K=K0;
#declare I=0;
#while (I<MI)
#declare J=0;
#while (J<MJ)
object{TextBox(str(K+1,2,0))
texture{StonesArray[K] scale SScale}
translate <2*J-MJ+1, 2*I-MI+1, 0> * (Scale * 1.15 * <1, -1.2, 1>)
}
#declare J=J+1;
#declare K=mod(K+1, MK);
#end
#declare I=I+1;
#end
}
#end
//-------------------------------------------------------------
//Select stones based on frame number
#switch(frame_number)
#case(1)
#declare GX = 5;
#declare GY = 5;
#declare K0 = 0;
#break
#case(2)
#declare GX = 5;
#declare GY = 4;
#declare K0 = 24;
#break
#else
#declare GX = 7;
#declare GY = 6;
#declare K0 = 0;
#break
#end
BoxGrid(GX, GY, K0)
camera {
//orthographic
location -10 * max(GX, GY) * z
look_at 0
right x*image_width/image_height up y
direction z
angle 40
}
light_source {<-5, 15, -20>*20 rgb 1}
background{rgb .5}
//-------------------------------------------------------------
Post a reply to this message
Attachments:
Download 'stoneblocksa1s.jpg' (78 KB)
Preview of image 'stoneblocksa1s.jpg'
|
|
|
|
"Mienai" <Mienai> wrote:
> They have something like this already in the scenesportfolio folder in your
> install directory.
Very true, Mienai, although I like the convenience of my simple image files.
The 'soap' shape displays the stone textures well, IMHO, and it's nice to
see how well the different stones work with text. Also, I did the first
versions of this scene before I discovered portfolio.
> It does most all the obects, paterns, colors, finishes,
> textures, shapes that are included. Everything is sorted by it's include
> file and name.
Thanks for reminding me about portfolio, Mienai. I've just had another quick
look at it. It certainly looks quite comprehensive - Ingo has yet again
done an impressive job. It's also not as scary-looking as it was when I
first saw it. :)
I *was* in the process of convincing myself to run the whole portfolio on
this slow old beastie, and then POV 3.6 became available. Now, I'll
probably wait until the official POV 3.7 is out. Then I'll run it on my
fast machine at work and put the results onto my flash drive.
Then I'll have a portable portfolio of POV pieces. :)
Post a reply to this message
|
|