POV-Ray : Newsgroups : povray.text.scene-files : Re: Chipboard Texture Server Time
31 Oct 2024 08:16:47 EDT (-0400)
  Re: Chipboard Texture (Message 1 to 1 of 1)  
From: Kontemplator
Subject: Re: Chipboard Texture
Date: 5 Feb 2018 15:50:00
Message: <web.5a78c2aeeeb2419d83e069d80@news.povray.org>
Since I got these OSB virus in my brain I could'nt sleep well. Here is the
result of my texture sickness.

//=================================================================
//    OSB - Chipboard Texture Generator   (jk_osb_texture.pov)
//
//    Run with +kff10000 and let the random generator do the work.
//
//    Author: Kontemplator
//
//    Date: 02/2018
//
//=================================================================

#version 3.7;

global_settings {assumed_gamma 1.0}

#declare R1 = seed(frame_number);
// replace frame_number with a pleasant value

#declare Text = concat("R1 = seed(",str(frame_number,0,0),")")

text { ttf "arial.ttf",Text , 0.02, 0.0
       pigment{rgb 1}
       scale<1,1.25,1>/10
       translate<-2,1,-.06 >
      }


#declare OSB_Colors = spline {
linear_spline
 1/16 ,<58,36,17>/255 ,
 2/16 ,<136,119,91>/255 ,
 3/16 ,<98,77,50>/255 ,
 4/16 ,<174,161,137>/255 ,
 5/16 ,<106,85,64>/255 ,
 6/16 ,<147,129,110>/255 ,
 7/16 ,<118,99,71>/255 ,
 7/16 ,<109,90,56>/255 ,
 9/16 ,<149,133,102>/255 ,
 10/16 ,<190,182,167>/255 ,
 11/16 ,<77,55,27>/255 ,
 12/16 ,<156,141,116>/255 ,
 13/16 ,<177,169,155>/255 ,
 14/16 ,<83,60,38>/255 ,
 15/16 ,<126,106,86>/255 ,
 16/16 ,<165,151,133>/255
}

//--------------------------------------

#macro OSB_Crackle(Brightness)

#local C_0 =   srgb OSB_Colors(rand(R1))*Brightness;
#local C_1 =   srgb OSB_Colors(rand(R1))*Brightness;
#local C_2 =   srgb OSB_Colors(rand(R1))*Brightness;

function {int(abs(sin(x+2*y+3*z)*2.5))}

     color_map { [0.0 C_0 ]
                 [0.5 C_1 ]
                 [1.0 C_2 ]
               }

 scale rand(R1)/7
 turbulence .2

#end

//---------------------------------------

#declare T_Chip =
 texture { crackle scale .05
           turbulence 1
           texture_map {
           #for (I,0,1,.2)
           [ I pigment { OSB_Crackle(1.2)}  ]
           #end
          }
           scale <1,2,1> *3
          }

//-------------------------------------

camera { angle 50
         location  <0.0, 0.0, -5.0>
         look_at   <0.0, 0.0,  0.0>
         right     x*image_width/image_height
}

//-------------------------------------
light_source { <100, 100, -400>
               color srgb 1
             }


box {-1,1 scale <3,2,.05>  texture{T_Chip} }

//== EOF ==========


Post a reply to this message

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