POV-Ray : Newsgroups : povray.text.scene-files : My Attempt at a 3d Wood Surface - Source File : Re: My Attempt at a 3d Wood Surface - Source File Server Time
28 Jul 2024 22:19:39 EDT (-0400)
  Re: My Attempt at a 3d Wood Surface - Source File  
From: GrimDude
Date: 27 Oct 1999 16:24:45
Message: <38175f8d@news.povray.org>
Just union two hf's. See the code under "Grim Woods."

--
GrimDude
gri### [at] netzerocom
Eric Freeman <eri### [at] ametronet> wrote in message
news:38160fb4@news.povray.org...
> // Persistence of Vision Ray Tracer Scene Description File
> // File: wood3d.pov
> // Vers: 3.1 SuperPatch
> // Desc: 3d hite_field wood planks
> // Date: 10/24/99
> // Auth: Eric L. Freeman
>
> // INITIAL VARIABLES
> #declare ScX = 2/12;      file://scale the plank
> #declare ScY = 0.05/12;   file://scale the plank
> #declare ScZ = 12/12;     file://scale the plank
> #declare ScPig = 5.7;     file://scale the pigment
> #declare TransPig = 1000; file://for random translating of the texture
> #declare Gapper = 0.025;  file://the gap between the planks
> #include "colors.inc"
> #include "woods.inc"
>
> // LIGHT
> light_source {
>   <-60,100,30>
>   color White*1.23
> }
>
> background {DarkBrown/3}
>
> #declare R1 = seed(123);
>
> #declare Looper1 = 0; file://inner loop control
> #declare Looper2 = 0; file://outer loop control
> #declare NumX = 2;    file://the number of planks in the x direction
> #declare NumZ = 2;    file://the number of planks in the z direction
>
> #while (Looper2 < NumX)
>   #while (Looper1 < NumZ)
>     #declare TransPig = 1000*rand(R1);
>     #declare RotPig = <rand(R1)*4,rand(R1)*4,0>;
>     object {
>       height_field {
>         pattern 200,200 {
>           hf_gray_16
>           // the following 2 pigment definitions are taken
>           // from the T_Wood1 texture definintion in woods.inc
>           // to change woods, change the wood texture below
>           // and the pigment
>           // P_WoodGrain1A color_map {M_Wood1A}
>           P_WoodGrain1B color_map {M_Wood1B}
>           translate <0,0,TransPig>
>           scale <1,1,1/ScZ>
>           scale ScPig
>           rotate RotPig
>         }
>       }
>       texture {
>         T_Wood1
>         translate <0,0,TransPig>
>         scale <1/ScX,1,1/ScZ>
>         scale ScPig
>         rotate RotPig
>       }
>       scale <ScX,ScY,ScZ>
>       translate <Looper2*(ScX+Gapper),0,Looper1*(ScZ+Gapper)>
>       #if ( int(Looper2/2)=Looper2/2 )
>         translate <0,0,(ScZ+Gapper)/2>
>       #end
>     }
>     #declare Looper1 = Looper1+1;
>   #end
>   #declare Looper1 = 0;
>   #declare Looper2 = Looper2+1;
> #end
>
>
> // CAMERA
> camera {
>   location <0,0.15,-0.15>
>   look_at <0,0,0>
>   rotate y*20
>   translate <(ScX+Gapper)*(NumX/2),0,(ScZ+Gapper)*(NumZ/2)>
> }
>
>
>


Post a reply to this message

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