POV-Ray : Newsgroups : povray.text.scene-files : winlogo : winlogo Server Time
1 Jun 2024 08:29:56 EDT (-0400)
  winlogo  
From: Piotr 'utak3r' Borys
Date: 29 Mar 2006 16:45:30
Message: <442afffa$1@news.povray.org>
Hi all,

I'm a rather newbie in povray so... ;)

Here's some scene with simple winlogo. It's in two versions to render: 
one with metallic textures and one with glass. The first one renders in 
a few minutes :) and the second one in a few hours... Is there a way to 
make it a little bit faster?
The biggest problem I had with textures was the environment - I've 
chosen some bitmap which had to act as an environment for reflections. 
Every render I tried ended with strange and obvious patterns on the 
surfaces :[ I've spent hours before I've decided to change the bitmap - 
and that was it :) Patterns gone away.
Then with the glassy version I had problems with the transmission 
colours I wanted to achieve, I tried zillions of 
fade_distance/fade_power combinations ;) in addition, I've suddenly 
after next few hours I discovered that the very strong influence on that 
has the roughness parameter. And thus I've found the proper values :)
The objects itself are isosurfaces. For the first time I've built them 
from an extruded surface and wanted to make them have rounded edges... 
but had no idea how to make for example f_rounded_box bended with sin(x) 
function - one question on p.newusers and I know it already :) btw, is 
there a really good tutorial on all those substitutions and so on with 
isosurfaces? I'd really like to learn it thoroughly...

After making it looking good, I wanted to put some photons. Never 
succeeded to make it good :( Any good tutorial somewhere?

OK, so here it goes, the scene itself:

// Persistence of Vision Ray Tracer Scene Description File
// File: MSWindows.pov
// Vers: 3.6
// Desc: MS Windows logo variation
// Date: 2006-03-23
// Auth: Piotr Borys
//
// +AM2 +A0.3 +R2 +FN +UA
//


#version 3.6;

#include "functions.inc"
#include "rad_def.inc"

#declare Photons   = off;
#declare Radiosity = on;
#declare Glass     = off;

global_settings {
   max_trace_level 16
   #if (Radiosity)
   radiosity {
     Rad_Settings(Radiosity_Normal, off, off)
   }
   #end
   #if (Photons)
     photons {
       spacing 0.01
       autostop 0
     }

   #end
}

// --------------------------------------------------------------------

camera {
   right x*image_width/image_height
   location  <0.6, 1, -1>*5
   look_at   <-0.25, 0.2, 0>
   angle 50
}

light_source {
   <8, 16, -4>
   color rgb 1.2
   spotlight
   radius 50
   falloff 70
   tightness 10
   point_at <0, 0, 0>
   area_light
   <1.8, 0, 0> <0, 0, 1.8>
   6, 6
   adaptive 1
   #if (Photons)
   photons {
     refraction on
     reflection on
   }
   #end
}

light_source {
   <-10, 2, -10>
   color <0.7, 0.8, 0.9>*0.5
}

// --------------------------------------------------------------------

sphere {
   <0, 0, 0> 20
   texture {
     pigment {
       image_map {
         jpeg "../lighting/lighting-04.jpg"
         map_type 1
       }
     }
     finish {
       ambient 0.3
       diffuse 0.9
       specular 0.0
       roughness 0.01
     }
   }
   #if (Photons)
   photons {
     collect off
   }
   #end
   hollow
}

plane {
   y, 0
   texture {
     pigment {
       color rgb <0.7, 0.8, 0.9>
     }
     finish {
       ambient 0.1
       diffuse 0.7
       specular 0.15
       roughness 0.001
     }
   }
}


// --------------------------------------------------------------------

#declare T_Chrome =
texture {
     pigment { rgb <0.2, 0.2, 0.2> }
     finish {
       metallic
       ambient 0.1
       diffuse 0.6
       specular 0.9
       roughness 0.01
       reflection {
         0.35, 1.0
         fresnel on
       }
       conserve_energy
       brilliance 1.5
     }
}

#declare T_Glass =
   texture {
     pigment {rgbt 1}
     finish {
       ambient 0.0
       diffuse 0.0
       specular 0.8
       roughness 0.0005
       reflection {
         0.4, 1.0
         fresnel on
       }
       conserve_energy
     }
   }

#declare I_Glass =
   interior {
     ior 1.5
     fade_power 8
     fade_distance 0.02
     fade_color <0.7, 0.8, 0.9>
   }

#declare M_RGlass =
material {
   texture { T_Glass }
   interior {
     I_Glass
     fade_color <1.0, 0.0, 0.0>
   }
}

#declare M_GGlass =
material {
   texture { T_Glass }
   interior {
     I_Glass
     fade_color <0.0, 1.0, 0.0>
   }
}

#declare M_BGlass =
material {
   texture { T_Glass }
   interior {
     I_Glass
     fade_color <0.0, 0.0, 1.0>
   }
}

#declare M_YGlass =
material {
   texture { T_Glass }
   interior {
     I_Glass
     fade_color <1.0, 1.0, 0.0>
   }
}
 

// --------------------------------------------------------------------

#declare Thickness = 0.07;
#declare WaveHeight = 0.15;
#declare Roundness = 0.1;

#declare wave_box =
isosurface {
    function { f_rounded_box(x, (y - sin(x*pi)*WaveHeight), z, 
Roundness, 1, Thickness, 1) }
    contained_by { box { <-1,-0.5,-1>, < 1, 0.5, 1> } }
    max_gradient 1.1
}


isosurface {
   wave_box
   #if (Glass)
   material { M_YGlass }
   #else
   texture {
     T_Chrome
     pigment { rgb <0.5, 0.5, 0.0> }
   }
   #end
   #if (Photons)
   photons {
     target
     reflection on
     refraction on
     //collect off
   }
   #end
   translate <1.1, 1.0, -1.1>
}

isosurface {
   wave_box
   #if (Glass)
   material { M_BGlass }
   #else
   texture {
     T_Chrome
     pigment { rgb <0.0, 0.0, 0.5> }
   }
   #end
   #if (Photons)
   photons {
     target
     reflection on
     refraction on
     //collect off
   }
   #end
   translate <-1.1, 1.0, -1.1>
}

isosurface {
   wave_box
   #if (Glass)
   material { M_GGlass }
   #else
   texture {
     T_Chrome
     pigment { rgb <0.0, 0.5, 0.0> }
   }
   #end
   #if (Photons)
   photons {
     target
     reflection on
     refraction on
     //collect off
   }
   #end
   translate <1.1, 1.0, 1.1>
}

isosurface {
   wave_box
   #if (Glass)
   material { M_RGlass }
   #else
   texture {
     T_Chrome
     pigment { rgb <0.5, 0.0, 0.0> }
   }
   #end
   #if (Photons)
   photons {
     target
     reflection on
     refraction on
     //collect off
   }
   #end
   translate <-1.1, 1.0, 1.1>
}


Post a reply to this message

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