POV-Ray : Newsgroups : povray.binaries.images : Cratered asteroid for Bleimann & Birch : Re: Cratered asteroid for Bleimann & Birch Server Time
7 Aug 2024 01:25:47 EDT (-0400)
  Re: Cratered asteroid for Bleimann & Birch  
From: EagleSun
Date: 13 Jul 2006 16:55:01
Message: <web.44b6b221b397f055841337530@news.povray.org>
Included is the crater image used for this render.  Below is the modified
source.

// Asteroid
#version 3.6;
// ==============================================================
#default{finish{ambient 0}}
#global_settings{assumed_gamma 1.0 max_trace_level 5}

#declare f_bozo1 = // similar to noise3d
function{pigment{bozo scale 0.5 color_map{[0 color rgb 0] [1 color rgb 1]}}}

#declare f_craters =
function{
/*  pigment{
    crackle form <1.2, 0, 0> // never really played with this one, thaks
Yadgar!
    scale 0.3
    color_map{
      [0.00 color rgb 1.00] // centre of crater, lowest part
      [0.30 color rgb 0.80] //
      [0.35 color rgb 0.40] // rim, higher than surrounding area
      [0.40 color rgb 0.5] // level of area outside the crater
      [1.00 color rgb 0.5]
    }
  }*/
  pigment{
 image_map{
   png "crater-image.png"
   map_type 1
   interpolate 2
  }
 }

}

/*
the f_craters function is subtracted from the basic asteroid shape, so the
lowest points get the highest numbers, since you are subtracting more.
*/

// --------------------------------------------------------------
isosurface{
  function{
    (x*x)+(y*y*1.8)+(z*z*1.5)-1 // basic sphere function, scaled to be more
                                // elliptical
    +f_bozo1(x,y,z).red*0.35 // deforms the ellipse shape
    +f_craters(x,y,z).red*0.5 // adjust the '*0.05' part to change the depth
of
                              //the craters
  }
  contained_by{box{<-1, -1, -1>, <1, 1, 1>}}
  threshold 0
  accuracy 0.001
  #local _grad_value=48.13;
// max_gradient _grad_value
  #local _P1=_grad_value*0.6;
  #local _P2=sqrt(_grad_value/_P1);
  #local _P3=0.7;
  evaluate _P1, _P2, _P3

  texture{
   pigment{
    color rgb 1
   }
   finish{
    diffuse 0.6
    ambient color rgb<0.2, 0.4, 1.0>*0.0625
   }
  }
}

light_source{<-10, 10, -5> color rgb 1}
//light_source{< 10, -10, -5> color rgb<0.2, 0.4, 1.0>*0.25}

camera{
  location <0, 1, -4>
  up y*(image_height/image_width)
  right x
  sky y
  look_at <0, 0, 0>
  angle 36
}


Post a reply to this message


Attachments:
Download 'crater-image.png' (252 KB)

Preview of image 'crater-image.png'
crater-image.png


 

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