POV-Ray : Newsgroups : povray.binaries.images : Black pearl : Re: Black pearl Server Time
7 Aug 2024 21:25:28 EDT (-0400)
  Re: Black pearl  
From:
Date: 26 Nov 2005 17:25:00
Message: <web.4388e014e709fc59d3d39f040@news.povray.org>
"ts" <nomail@nomail> wrote:

> looks as if you didn't use just a sphere ...

  that's the effect of normals.

> post your texture code?

#declare nc = 8 ; // number of levels
#declare ec =.003 ; // thickness of the levels
#declare ds = 12 ; // dispersion samples
#declare rd=seed(1) ;

#macro M_PerleNoire(n,decal) material {
  texture {
    pigment {rgbt <.2,.2,.2,.8>}
    finish {
      ambient .2 diffuse .4
      specular .23 roughness .04
      phong .2 phong_size 350
      brilliance 2
    }
    normal {
      bumps .3+rand(rd)*.1
      scale .4+rand(rd)*.1
      translate decal
    }
  }
  interior {
    ior 1+2*n/nc
    dispersion 10
    dispersion_samples ds
  }
}#end

#declare Perle = union {
  #local ip=0 ;
  #local dec = 0 ;
  #while(ip<nc)
    #local ip=ip+1 ;
    #local dec=dec+<rand(rd),rand(rd),rand(rd)>*ec*2 ;
    sphere {0 1-ec*(nc-ip) M_PerleNoire(ip,dec)}
  #end
}


Post a reply to this message

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