POV-Ray : Newsgroups : povray.binaries.images : Eye macro Server Time
20 Nov 2024 06:26:21 EST (-0500)
  Eye macro (Message 1 to 7 of 7)  
From: Mahalis
Subject: Eye macro
Date: 12 Oct 2001 14:58:27
Message: <3bc73d53@news.povray.org>
I just made a little macro that lets you specify eye location, angle, lids
on/off, and lid angle. Any suggestions? I think the iris texture could
definitely use some improvement but am not exactly sure how to go about it.
Comments, questions and criticism are all welcome.

--
 camera{location<0,0.25,-2> look_at 0.5*y} #declare
T=texture{pigment{crackle scale 0.5 rotate 90 turbulence 0.75 color_map{[0
rgb 1][0.05 rgb 1][0.1 rgb<1,0.25,1>][0.25 rgbf 1][1 rgbf 1]}}
finish{ambient 1}} #declare c=difference{torus{0.5,0.1
rotate -90*x}box{<0.7,0,0.2>,<-0.7,-0.7,-0.2>}}  merge{object{c
translate<0.5,0.5,0>} object{c translate<-0.5,0.5,0>}
cylinder{<1,0.5,0>,<1,0,0>,0.1} cylinder{<-1,0.5,0>,<-1,0,0>,0.1}
cylinder{0.5*y,0,0.1} texture{T}} #end
//Mahalis


Post a reply to this message


Attachments:
Download 'eye.png' (16 KB)

Preview of image 'eye.png'
eye.png


 

From: JRG
Subject: Re: Eye macro
Date: 12 Oct 2001 16:36:04
Message: <3bc75434@news.povray.org>
Try and animate this one!

--
Jonathan.
"Mahalis" <don### [at] fakeycom> ha scritto nel messaggio
news:3bc73d53@news.povray.org...
> I just made a little macro that lets you specify eye location, angle, lids
> on/off, and lid angle. Any suggestions? I think the iris texture could
> definitely use some improvement but am not exactly sure how to go about
it.
> Comments, questions and criticism are all welcome.
>
> --
>  camera{location<0,0.25,-2> look_at 0.5*y} #declare
> T=texture{pigment{crackle scale 0.5 rotate 90 turbulence 0.75 color_map{[0
> rgb 1][0.05 rgb 1][0.1 rgb<1,0.25,1>][0.25 rgbf 1][1 rgbf 1]}}
> finish{ambient 1}} #declare c=difference{torus{0.5,0.1
> rotate -90*x}box{<0.7,0,0.2>,<-0.7,-0.7,-0.2>}}  merge{object{c
> translate<0.5,0.5,0>} object{c translate<-0.5,0.5,0>}
> cylinder{<1,0.5,0>,<1,0,0>,0.1} cylinder{<-1,0.5,0>,<-1,0,0>,0.1}
> cylinder{0.5*y,0,0.1} texture{T}} #end
> //Mahalis
>
>
>


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Eye macro
Date: 12 Oct 2001 16:58:44
Message: <3BC75927.1A8EAD12@aol.com>
Mahalis wrote:

> Any suggestions?

Ultimately, such a macro has the greatest use if there is a point_at vector for
the macro.


Post a reply to this message

From: Mahalis
Subject: Re: Eye macro
Date: 13 Oct 2001 07:59:52
Message: <3bc82cb8$1@news.povray.org>
That's an excellent idea- how would I include that feature?

--
 camera{location<0,0.25,-2> look_at 0.5*y} #declare
T=texture{pigment{crackle scale 0.5 rotate 90 turbulence 0.75 color_map{[0
rgb 1][0.05 rgb 1][0.1 rgb<1,0.25,1>][0.25 rgbf 1][1 rgbf 1]}}
finish{ambient 1}} #declare c=difference{torus{0.5,0.1
rotate -90*x}box{<0.7,0,0.2>,<-0.7,-0.7,-0.2>}}  merge{object{c
translate<0.5,0.5,0>} object{c translate<-0.5,0.5,0>}
cylinder{<1,0.5,0>,<1,0,0>,0.1} cylinder{<-1,0.5,0>,<-1,0,0>,0.1}
cylinder{0.5*y,0,0.1} texture{T}}
//Mahalis
--

"Greg M. Johnson" <"gregj56590[:-0]"@aol.com> wrote in message
news:3BC75927.1A8EAD12@aol.com...
> Mahalis wrote:
>
> > Any suggestions?
>
> Ultimately, such a macro has the greatest use if there is a point_at
vector for
> the macro.
>


Post a reply to this message

From: Redbeard (MDJohnson)
Subject: Re: Eye macro
Date: 20 Oct 2001 19:28:16
Message: <3bd20890$1@news.povray.org>
"Mahalis" <don### [at] fakeycom> wrote in message
news:3bc73d53@news.povray.org...
> I just made a little macro that lets you specify eye location, angle, lids
> on/off, and lid angle. Any suggestions? I think the iris texture could
> definitely use some improvement but am not exactly sure how to go about it.
> Comments, questions and criticism are all welcome.
>

I've used radial for iris's before.  It works pretty well but is too regular.
I've tried adding turbulence, but it moves the center too much.  Maybe f_noise3d
would work better... hmmm

I agree with the look_at vector.  Probably one of the reorient macros would
work.  Hmmm... and have it react to brightness, too?  So the size of the pupil
is smaller for brighter light.  And IIRC, the pupil changes size with the
distance of whatever you're looking at.  I'm not sure how, though.  You could
use the distance to the look_at vector to calculate that.

Well... now I'm gonna have to go and do some research. :-)

Michael

--
#macro M(D)#local J=strlen(D);#local _=""#while(J>0)#local _=concat(_,substr(D
,J,1))#local J=J-1;#end _#end sphere{z*9,5pigment{rgb x}}#macro N(D,J)text{ttf
"timrom.ttf"M(D)1,0 translate-J}#end#macro O(E,K)#local _=N(E,K)light_source{-
z*9rgb 1projected_through{_}}#end O("leahciM"<1.6,-.3.9>)O("nosnhoJ"<1.6.9.9>)


Post a reply to this message

From: Mahalis
Subject: Re: Eye macro
Date: 20 Oct 2001 20:07:33
Message: <3bd211c5$1@news.povray.org>
I might put a pupil_size (from 0 [no pupil] to 1 [all the way open]). Maybe
a layered pigment would work for the iris...

--

//Mahalis
camera{location<0,0.25,-2> look_at 0.5*y} #declare T=texture{pigment{crackle
scale 0.5 rotate 90 turbulence 0.75 color_map{[0 rgb 1][0.05 rgb 1][0.1
rgb<1,0.25,1>][0.25 rgbf 1][1 rgbf 1]}} finish{ambient 1}} #declare
c=difference{torus{0.5,0.1 rotate -90*x}box{<0.7,0,0.2>,<-0.7,-0.7,-0.2>}}
merge{object{c translate<0.5,0.5,0>} object{c translate<-0.5,0.5,0>}
cylinder{<1,0.5,0>,<1,0,0>,0.1} cylinder{<-1,0.5,0>,<-1,0,0>,0.1}
cylinder{0.5*y,0,0.1} texture{T}}
--


"Redbeard (MDJohnson)" <red### [at] wvadelphianet> wrote in message
news:3bd20890$1@news.povray.org...
>
> "Mahalis" <don### [at] fakeycom> wrote in message
> news:3bc73d53@news.povray.org...
> > I just made a little macro that lets you specify eye location, angle,
lids
> > on/off, and lid angle. Any suggestions? I think the iris texture could
> > definitely use some improvement but am not exactly sure how to go about
it.
> > Comments, questions and criticism are all welcome.
> >
>
> I've used radial for iris's before.  It works pretty well but is too
regular.
> I've tried adding turbulence, but it moves the center too much.  Maybe
f_noise3d
> would work better... hmmm
>
> I agree with the look_at vector.  Probably one of the reorient macros
would
> work.  Hmmm... and have it react to brightness, too?  So the size of the
pupil
> is smaller for brighter light.  And IIRC, the pupil changes size with the
> distance of whatever you're looking at.  I'm not sure how, though.  You
could
> use the distance to the look_at vector to calculate that.
>
> Well... now I'm gonna have to go and do some research. :-)
>
> Michael
>
> --
> #macro M(D)#local J=strlen(D);#local _=""#while(J>0)#local
_=concat(_,substr(D
> ,J,1))#local J=J-1;#end _#end sphere{z*9,5pigment{rgb x}}#macro
N(D,J)text{ttf
> "timrom.ttf"M(D)1,0 translate-J}#end#macro O(E,K)#local
_=N(E,K)light_source{-
> z*9rgb 1projected_through{_}}#end
O("leahciM"<1.6,-.3.9>)O("nosnhoJ"<1.6.9.9>)
>
>
>


Post a reply to this message

From: Redbeard (MDJohnson)
Subject: Re: Eye macro [image, ~61kbu]
Date: 20 Oct 2001 23:36:22
Message: <3bd242b6@news.povray.org>
"Mahalis" <don### [at] fakeycom> wrote in message
news:3bd211c5$1@news.povray.org...
> I might put a pupil_size (from 0 [no pupil] to 1 [all the way open]). Maybe
> a layered pigment would work for the iris...
>

How's this for an iris?  The colors may not be right, but otherwise...  Oh...
sorry for the PNG, but JPG mussed the file up too much.

(POV-Ray 3.5b6 used,  MegaPov shouldn't take much modifications, though)

#declare Fnc_IrisBase =
function
{
    pattern
    {
        radial triangle_wave
        scale 0.45 frequency 50
        rotate x * 90
    }
}
#declare Fnc_Iris =
function
{
    mod(Fnc_IrisBase(x,y,z) + f_noise3d(x*100,y*100,z*100) * 0.5, 1)
}
#declare T_Iris =
texture
{
    pigment
    {
        function { Fnc_Iris(x,y,z) }
        color_map
        {
            [0.20 rgb <0.10, 0.30, 0.90>]
            [0.85 rgb <0.12, 0.95, 0.70>]
            [0.99 rgb <0.00, 0.05, 0.10>]
        }
    }
}


Post a reply to this message


Attachments:
Download 'eyeball.png' (61 KB)

Preview of image 'eyeball.png'
eyeball.png


 

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