POV-Ray : Newsgroups : povray.binaries.images : Revisited and more... : Re: Revisited and more... Server Time
19 Apr 2024 00:06:58 EDT (-0400)
  Re: Revisited and more...  
From: Simon J  Cambridge
Date: 5 Jul 2017 07:25:01
Message: <web.595cca7e379f403daa3fb0cc0@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> "LanuHum" <Lan### [at] yandexru> wrote:
> > "Simon J. Cambridge" <nomail@nomail> wrote:
> >
> > >
> > > What I would really like to know is what you folks think?
> > >
> >
> > I liked this
> > http://www.landofthefirst.com/ell/lore/images/water.jpg
>
> Very beautiful
> http://www.landofthefirst.com/prophecy/images/theeye.jpg
> function ridged and warp spherical???

Thank you, LanuHum.

'Water' took a fair amount of time to get right (or to get it to a point where I
liked it). It's interesting that this scene uses radiosity, (gamma 2.2 as well,
I think) and that a number of others I have done don't. I am still investigating
the why's and the wherefore's (as to when to use and when not to).

'TheEye' might surprise you. It's an inverted 'witch_of_agnesi' modified with
granite. Here is the code: (alas the eye itself is a mesh! I used aoi for the
skin and radial for the iris.)

########

#version 3.7;

#include "functions.inc"

#declare AreaOK=0;

#declare sun=2;

global_settings { assumed_gamma 1.0 }

#declare cpos=<0, 100, 0>;

camera {
    location  cpos
    right     x*image_width/image_height
    look_at   <0, 0, 0>
    angle     40
}

light_source {
    cpos
    color rgb 0.1
    shadowless
}

sky_sphere { pigment { rgb 0 } }

#declare Pig01=
pigment {
    granite
    turbulence 0.14
    color_map {
        [0.0 color rgb 0.0]
        [0.5 color rgb 0.2]
        [1.0 color rgb 0.5]
    }
    scale <1, 0.1, 1>
}

#declare Pig02=
pigment {
    granite
    turbulence 0.21
    color_map {
        [0.0 color rgb 0.0]
        [0.5 color rgb 0.2]
        [1.0 color rgb 0.5]
    }
    scale <1, 0.1, 1>
}

#declare fnPig01 = function { pigment { Pig01 translate 1000 } }
#declare fnPig02 = function { pigment { Pig02 translate 2000 } }

#declare fct=0.3;

#declare F1 = function {-f_witch_of_agnesi(x,y,z, 0.5, 0.09) -
(fnPig01(x,0,z).gray*fct*fnPig02(x,0,z).gray)}

#declare T_Upper=
texture {
    pigment
    {
        rgb <0.98, 0.26, 0.16>
    }
    finish {
        diffuse 0.7
        specular 0.1
    }
}

#declare T_Lower=
texture {
    pigment
    {
        rgb 0
    }
    finish {
        ambient 0
        diffuse 0
    }
}

#declare Terrain=
isosurface {
    function {
        F1(x, y, z)
    }

    open

    max_gradient 7

    contained_by{box{<-20, 0, -20>, <20, 2, 20>}}

    texture {
        gradient y
        scale 2
        texture_map
        {
            [0.00 T_Upper]
            [0.45 T_Lower]
        }
    }

    scale <500, 1000, 500>*1.4

    rotate <180, 0, 0>
}

light_group
{
    object { Terrain }

    light_source {
        <0, 200000, 0>
        color rgb <0.9, 0.8, 0.7>*sun
        #if (AreaOK=1)
            area_light 4000*x 4000*y 4, 4
            jitter
            orient
            circular
        #end
    }

    global_lights on
}

#######

As you can see I stripped the code back to the bare minmum. (And the eye itself
has its own light group.)

Cheers,

Simon.


Post a reply to this message

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