POV-Ray : Newsgroups : povray.binaries.images : Sandstone blocks : Re: Sandstone blocks Server Time
7 Aug 2024 09:20:04 EDT (-0400)
  Re: Sandstone blocks  
From: PM 2Ring
Date: 27 Apr 2006 23:45:01
Message: <web.44518e2b1843be3376ba2c900@news.povray.org>
"etrask" <et7### [at] yahoocom> wrote:
> Very cool...

Thanks!

> Can we get the source to the first picture you posted? The code you posted
> is too advanced for me, and I want to render it in 1600x1200 for a
> wallpaper.

Sorry, I've only got modified versions here at home: the original is on my
machine at work. This one is pretty close, though. To get closer, play with
the H variable in the Ground isosurface, & the scale parameter in TStain.
Also play with the gradient vector & turbulence.

Warning: this can be very slow to render with high anti-alias.

// Persistence of Vision Ray Tracer Scene Description File
// File: Sandstone.pov
// Vers: 3.6
// Desc:
// Date: 2006.02.06
// Auth: PM 2Ring
//
//  -F -A0.5 +AM2 +R1
//  -d +W1200 +H900 +A0.1 +AM2 +R3
//  -d +A0.2 +AM2 +R2
//

//#include "colors.inc"
#include "functions.inc"

global_settings {
  assumed_gamma 1.0
}

//---The textures---------------------------------------------------------

#declare Sandy = color rgb<1, .9, .65>;

#declare Transmit = .8;
#declare CM_Sandstone =
colour_map{
  [0.3 rgbt <1, 1, 1, 1.2*Transmit>]
  [0.4 rgbt <1, 0, 0, Transmit>]
  [0.41 rgbt <0.5, 0.3, 0.1, .5*Transmit>]
  [0.42 rgbt <1, 0, 0, .75*Transmit>]
  [0.6 rgbt <1, 0.5, 0, Transmit>]
  [0.7 rgbt <1, 1, 1, .5*Transmit>]
}

#declare FSandstone =
finish{
  diffuse 0.85 ambient 0.05
}

#declare TSandstone =
texture{
  pigment {Sandy}
  finish{FSandstone}
}

#declare TStain = texture{
  pigment{
    //agate
    gradient <.3, 2, .1>//2
    turbulence 0.15
    colour_map{CM_Sandstone}
    scale 0.75
  }
  finish{FSandstone}
}

#declare TSandstone2 =
texture{TSandstone}
texture{TStain}

//---The objects---------------------------------------------------------

#declare f_Height = function{0.5*f_wrinkles(x*.4, y*.4, z*.4)}

#declare H = 0.6;
#declare Ground =
isosurface {
  function {(y - f_Height(x, 0, z))/H}
  max_gradient 2.0
  contained_by {box {<-4,-5,-4>, < 4, 1, 4>}}
  accuracy 1e-3
}

//---The scene---------------------------------------------------------

object{Ground texture{TSandstone2 translate 17.123}}

#declare CamPos = <0.45, 6, -8>* .35;
//#declare CamPos = 4*y;

camera {
  location CamPos
  direction z
  right     x*image_width/image_height up y
  look_at   y* 0.25
  angle 40
}

light_source {
  <-0.5, 1, -1> * 8
  #if(1)
    rgb 1.15 // 1.75
  #else
    rgb 45
    fade_distance 1.25 fade_power 2
  #end
}

//---The end---------------------------------------------------------


Post a reply to this message

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