POV-Ray : Newsgroups : povray.text.scene-files : Egg macros : Egg macros Server Time
24 May 2024 18:40:47 EDT (-0400)
  Egg macros  
From: Thomas de Groot
Date: 7 May 2017 03:11:26
Message: <590ec89e$1@news.povray.org>
See the Egg message in p.b.i.

These are the major macros used for the translucent objects there (you 
may have to do some editing; dragon not included):

//==========================================================Marble cube
#macro JH_Marble (Detail, SS, Translucency) //James Holsenback
material {
   texture {
     #if (Detail)
       pigment {
         marble
         scale 0.5
         turbulence 1 lambda 3
         color_map {
           [0 srgb <0.9570, 0.9570, 0.8594>]
           [1 srgb <0.9570, 0.9570, 0.8594>/2]
         }
       }
       finish {
         specular 0.15
         roughness 1e-1
         #if (SS)
           subsurface {translucency Translucency}
         #end
         reflection { 0.2 fresnel }
         conserve_energy
       }
       normal{
         marble
         scale 0.5
         turbulence 1 lambda 3
       }
     #else
       pigment {srgb 1}
     #end
   }
   interior {ior 1.5}
}
#end

#declare Detail = on; //for JH_Marble only
#declare SS = on;
#declare Translucency = <0.45, 0.38, 0.33>*5;

superellipsoid {
   <0.15, 0.15>
   JH_Marble (Detail, SS, Translucency)
   scale <1, 1, 1>
   rotate <0, -20, 0>
   translate <0, 0, 0>
}

//==========================================================Dragon
#macro TdG_Celadon (SScel, TranslucencyCeladon)
material {
   texture {
     pigment {
       bozo
       pigment_map {
         [0.0 color srgb <0.762025, 0.883775, 0.762025>]
         [0.2 color srgb <0.855688, 0.935979, 0.855688>]
         [0.5 color srgb <0.728519, 0.896481, 0.728519>]
         [0.8 color srgb <0.937467, 1.000000, 0.937467>]
         [1.0 color srgb <0.548054, 0.722746, 0.548054>]
       }
     }
     normal {
       crackle 0.5 solid
       warp {turbulence <0.1, 0.1, 0.1>}
       scale  0.1
     }
     finish {
       diffuse 0.6
       specular 0.5
       roughness 0.005
       conserve_energy
       #if (SScel)
         subsurface {translucency TranslucencyCeladon}
       #end
       reflection {
         0.01 , 0.2
         fresnel  on
         falloff  1.0
         exponent 1.0
       }
     }
   }
   interior {ior 1.5}
}
#end

#include "xyzrgb_dragon90k_POV_geom.inc" //dragon or any other obejct

#declare Dragon =
object {xyzrgb_dragon90k_
   translate 41.2849*y
   scale <1, 1, 1>*0.01
}

#declare SScel = on;
#declare TranslucencyCeladon = <0.728519, 0.896481, 0.728519>*0.5; 
//one of the celadon pigments

object {Dragon
   TdG_Celadon(SScel, TranslucencyCeladon)
   rotate <0, 0, 0>
   translate <0, 1, 0>
}

//=========================================================blackbird egg
#macro TdG_Blackbird_Eggshell (SSegg, TranslucencyEgg)
material {
   texture {
     pigment {
       granite
       pigment_map {
         [0.75 srgb <0.80, 0.92, 1.00>]
         [0.85 srgb <0.50, 0.40, 0.30>]
       }
       scale 0.125
     }
     normal { bumps 0.095 scale 0.008 }
     finish {
       ambient 0.01
       diffuse albedo 0.7
       specular albedo 0.05
       roughness 0.005
       fresnel
       #if (SSegg)
         subsurface {translucency TranslucencyEgg}
       #end
       reflection {0.01, 0.20 fresnel roughness 0.005}
       conserve_energy
     }
   }
   interior {ior 1.5}
}
#end

//blackbird egg
#declare Egg =
ovus {
   1.00, 0.65 // base_radius, top_radius  with: top_radius< base_radius!
   rotate 80*x  //put egg on its side
   translate <0.00, 1.00, 0.00> //origin at base
   scale 0.25
}

#declare SSegg= on;
#declare TranslucencyEgg = <1.00, 0.92, 0.80>*(5*0.25); //one of the 
shell pigments, reversed

object {Egg
   TdG_Blackbird_Eggshell (SSegg, TranslucencyEgg)
   rotate 110*y
   translate <-0.50, 1, -0.50>
   rotate -10*y
}


-- 
Thomas


Post a reply to this message

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