POV-Ray : Newsgroups : povray.binaries.images : My First CGSphere : Re: My First CGSphere Server Time
19 Apr 2024 23:12:07 EDT (-0400)
  Re: My First CGSphere  
From: Robert McGregor
Date: 15 Jul 2008 08:25:01
Message: <web.487c960ee928bccebd1b3ad10@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote:
> Beautiful. Much more impressive than 90% of the CGSphere entries I've seen. The
> textures are wonderfully realistic.
>
> *suspects photography*
>
> :)

LOL, no photography! Well, there are some image_maps, one for the "skateboard
ramp" backdrop and one as an ambient sky. The "orbs" are all procedural.

//---------------------------------------------------------------------------
// skateboard ramp with a grid painted on it

#if (Render_Ramp)
   object { Ground
      texture {
         pigment { uv_mapping
            gradient x
            pigment_map{
               [1/80 rgb 0]
               [1/80
                  gradient y
                  pigment_map{
                     [1/80 rgb 0]
                     [1/80
                        average
                        pigment_map {
                           [2 image_map { png "CrackedPlasterTile.png"
                                interpolate 2} scale 1.37]
                           [1 image_map { png "CrackedPlasterTile.png"
                                interpolate 2} rotate z*10]
                           [1 rgb 0.5]
                        }
                        scale <15, 20, 15>*0.5
                        rotate x*45
                     ]
                  }
               ]
            }
            scale -<1/10,1/20,1>
         }
         normal { uv_mapping
            gradient x
            normal_map{
               [1/80 bumps -0.1 scale 0.1]
               [1/80
                  gradient y
                  normal_map{
                     [1/80 bumps -0.1 scale 0.1]
                     [1/80
                        average
                        normal_map {
                           [2 bump_map { png "CrackedPlasterTile.png"
                                 interpolate 2} scale 1.37]
                           [1 bump_map { png "CrackedPlasterTile.png"
                                 interpolate 2 } rotate z*10]
                        }
                        scale <15, 20, 15>*0.5
                        rotate x*45
                     ]
                  }
               ]
            }
            scale -<1/10,1/20,1>
         }
         finish { diffuse 0.4 ambient 0 specular 0.25 roughness 0.01
            reflection {0, 0.5} conserve_energy }
      }
   }
#end

//---------------------------------------------------------------------------
// Orb textures

// amber glass with turquoise flecks

#declare N_Stucco = normal {
   average
   normal_map {
      [1 bumps 0.075 scale 0.75]
      [1 granite 0.235 scale 4]
      [0.5 granite 0.235 scale 1]
      [0.5 granite 0.235  scale 0.3]
      [0.5 granite 0.4 scale 0.1]
      [0.25 granite 0.65 scale 0.01]
   }
   scale 0.5
}

   #declare P1 = pigment {
      bozo
      turbulence 0.5
      scale 0.1
      color_map {[0 rgb<189,112,40>/255*1.2 transmit 0.8]
         [1 rgb<143,61,5>/255*1.2 transmit 0.9]}
   }

   #declare M_Glass1 =
   material {
      texture {
         pigment {
            bozo
            scale 0.25
            turbulence 0.5
            pigment_map {
               [0.000 P1]
               [0.675 P1]
               [1.000 color (Turquoise+SeaGreen)/2*1.5 ]
            }
         }
         normal { N_Stucco scale 10}
         finish {
            specular 0.15
            roughness 0.005
            brilliance 4
            reflection { 0.0, 0.15 fresnel on }
            conserve_energy
         }
      }
      texture {
         pigment {
            bozo
            scale 0.175
            turbulence 0.45
            pigment_map {
               [0.0 P1]
               [0.7 P1]
               [1.0 SeaGreen*0.75 ]
            }
         }
         normal { N_Stucco scale 20}
         finish {
            specular 0.2
            roughness 0.005
            reflection { 0.0, 0.15 fresnel on }
            conserve_energy
         }   }
      interior {ior 1.1}
   }

// Hammered gold

#declare P_Gold = rgb<124,114,58>/255;

#declare N_Dented1 = normal {
   bumps
   turbulence 0
   normal_map {
      [0.00 dents 1.5 scale 0.3]
      [0.5 dents 1 scale 0.15]
      [0.55 dents 0.125 scale 0.012]
      [0.6 dents 1.25 scale 0.15]
      [1.0 dents 1 scale 0.5]
   }
}

#declare N_Dented2 = normal {
   bumps
   turbulence 0
   normal_map {
      [0.00 dents 0.25 scale 1]
      [0.3 dents 1 scale 0.1]
      [0.4 dents 0.125 scale 0.01]
      [0.5 dents 1.25 scale 0.1]
      [1.0 dents 0.1 scale 1]
   }
   scale 0.75
}

#declare N_Dented3 = normal {
   bumps
   turbulence 0
   normal_map {
      [0.00 dents 0.125 scale 0.8]
      [0.3 dents 0.1 scale 0.12]
      [0.4 bumps 0.25 scale 0.1]
      [0.5 dents 0.125 scale 0.01]
      [1.0 dents 0.1 scale 1.2]
   }
   scale 0.5
}

#declare N_Hammered3 = normal {
   average
   normal_map {
      [1 N_Dented1]
      [1 N_Dented2]
      [1 N_Dented3]
      [0.5 granite 0.5 ]
   }
}

#declare F_MetalX =
finish {
   ambient 0.3
   brilliance 20
   diffuse 1
   metallic
   specular 4
   roughness 0.004
   reflection  { 1 metallic }
}

#declare T_Hammered_Gold =
texture {
   pigment { P_Gold }
   normal { N_Hammered3 }
   finish { F_MetalX }
}

-Rob


Post a reply to this message

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