POV-Ray : Newsgroups : povray.binaries.images : T_Stones ref charts Server Time
15 Nov 2024 22:24:56 EST (-0500)
  T_Stones ref charts (Message 1 to 8 of 8)  
From: PM 2Ring
Subject: T_Stones ref charts
Date: 11 Sep 2005 09:25:01
Message: <web.43242e97c626dadf77d3bc6c0@news.povray.org>
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'
stoneblocksa1s.jpg


 

From: PM 2Ring
Subject: Re: T_Stones ref charts
Date: 11 Sep 2005 09:35:00
Message: <web.43243152891e529177d3bc6c0@news.povray.org>
And here is frame 2.


Post a reply to this message


Attachments:
Download 'stoneblocksa2s.jpg' (78 KB)

Preview of image 'stoneblocksa2s.jpg'
stoneblocksa2s.jpg


 

From: Henrik Fisch
Subject: Re: T_Stones ref charts
Date: 11 Sep 2005 15:30:00
Message: <web.43248543891e52914d4af1dc0@news.povray.org>
"PM 2Ring" <nomail@nomail> wrote:
> And here is frame 2.

Soaps! Lot's of them! In all flavours! ;-)

Really nice! Thank you!

Regards,
Henrik Fisch


Post a reply to this message

From: Skip Talbot
Subject: Re: T_Stones ref charts
Date: 12 Sep 2005 01:14:40
Message: <43250ec0$1@news.povray.org>
I do like how the stones are specifically numbered.  The original 
include demo scenes would definitely benefit from this.  I find myself 
hunting through the array in the source trying to match up the stone 
texture with the render.

Skip


Post a reply to this message

From: Mienai
Subject: Re: T_Stones ref charts
Date: 12 Sep 2005 18:30:00
Message: <web.4326015a891e529193db03e80@news.povray.org>
They have something like this already in the scenesportfolio folder in your
install directory.  It does most all the obects, paterns, colors, finishes,
textures, shapes that are included.  Everything is sorted by it's include
file and  name.


Post a reply to this message

From: PM 2Ring
Subject: Re: T_Stones ref charts
Date: 14 Sep 2005 08:45:00
Message: <web.43281a92891e5291505e02d50@news.povray.org>
"Henrik Fisch" <hfi### [at] softfischde> wrote:

> Soaps! Lot's of them! In all flavours! ;-)
>
> Really nice! Thank you!

Glad you like them, Henrik. BTW, you're not the first person to say they
look like soaps. :)


Post a reply to this message

From: PM 2Ring
Subject: Re: T_Stones ref charts
Date: 14 Sep 2005 08:50:00
Message: <web.43281b8a891e5291505e02d50@news.povray.org>
Skip Talbot <Ski### [at] aolcom> wrote:

> I do like how the stones are specifically numbered.  The original
> include demo scenes would definitely benefit from this.  I find myself
> hunting through the array in the source trying to match up the stone
> texture with the render.

And I'm sure you can guess that's what motivated me to create this scene,
Skip. I just got sick of matching up the array in the demo source with the
texture in the .inc files. OTOH, it's certainly instructive to browse
through the .inc files themselves.


Post a reply to this message

From: PM 2Ring
Subject: Re: T_Stones ref charts
Date: 14 Sep 2005 09:10:01
Message: <web.43282066891e5291505e02d50@news.povray.org>
"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

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