POV-Ray : Newsgroups : povray.general : location dependant refractive index Server Time
30 Jul 2024 22:18:17 EDT (-0400)
  location dependant refractive index (Message 5 to 14 of 24)  
<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Alain
Subject: Re: location dependant refractive index
Date: 31 Oct 2008 19:10:25
Message: <490b9061$1@news.povray.org>
stbenge nous illumina en ce 2008-10-31 15:25 -->
> feestje wrote:
>> hi all,
>>
>> I want to make an animation about the so-called "mirage effect" on a 
>> heated
>> surface with a sphere present. (what is the mirage effect:
>> http://www.physlink.com/Education/askExperts/ae428.cfm)
>>
>> Basicly the effect is created by a difference in refractive indix of a 
>> hot and a
>> cold medium (water). Is it possible in PORAY to create a location 
>> dependant
>> refractive index?
>>
>> Regards, Ruud
> 
> You cannot give an object a variable index of refraction, sorry. But you 
> *can* stack many transparent objects onto each other, each having a 
> different ior. It might work for the mirage effect. The render times 
> using this method are slooow, even on faster computers.
> 
> Or you could try modeling a microsphere atmosphere, but this would 
> render even more slowly, I'm pretty sure.
> 
> Sam

You may not need many stacked objects. Just one or two thin boxes, or strongly 
flattened spheres or cylinders, with a clever normal may be enough. Just 
remember to keep the ior close to 1.
Start with 1. Do some test renders altering the ior and normal. Then, if needed, 
add a second one. Tewak only that added object to adjust as needed. The second 
object should have an ior closer to 1 than the first.

-- 
Alain
-------------------------------------------------
'hAS ANYONE SEEN MY cAPSLOCK KEY?'


Post a reply to this message

From: feestje
Subject: Re: location dependant refractive index
Date: 2 Nov 2008 07:30:01
Message: <web.490d9c83a1a1577518112fe00@news.povray.org>
hi all,

thank you for your responses! I thought of the stacked box methos myself but I
hoped ther ewould be something much more easier! well anyway: he is what I
accomplished so far:

 #include  "colors.inc"




sphere {   // IOR < 1
     <0,0,0> ,1.5
     pigment {
          color Black
     }
   }

plane{
     < 0, -1, 0>,           2
     pigment {
          color White

     }
     finish {
          ambient 0.7
          diffuse 0.7
     }
}










             box {
     < -20, -2, 15 >,
     < 20, -1.9,    -15 >
          pigment {
          color White filter 1
     }
     finish {
          phong 1
          refraction 1.0
     }
     interior {
          ior        1.1
                     }}

                                      box {
     < -20, -1.9, 15 >,
     < 20, -1.8,    -15 >
          pigment {
          color White filter 1
     }
     finish {
          phong 1
          refraction 1.0
     }
     interior {
          ior        1.2
                     }}


             box {
     < -20, -1.8, 15 >,
     < 20, -1.7,    -15 >
          pigment {
          color White filter 1
     }
     finish {
          phong 1
          refraction 1.0
     }
     interior {
          ior        1.3
                     }}


             box {
     < -20, -1.7, 15 >,
     < 20, -1.6,    -15 >
          pigment {
          color White filter 1
     }
     finish {
          phong 1
          refraction 1.0
     }
     interior {
          ior        1.4
                     }}


             box {
     < -20, -1.6, 15 >,
     < 20, -1.5,    -15 >
          pigment {
             color White filter 1
     }
     finish {
          phong 1
          refraction 1.0
     }
     interior {
          ior        1.5





                   }     }
              box {
     < -20, -1.5, 15 >,
     < 20, 100,    -15 >
          pigment {
          color White filter 1
     }
     finish {
          phong 1
          refraction 1.0
     }
     interior {
          ior        1.6
                     }}



                     background {
     color  SkyBlue
}





camera {
     location  -1.5*y - 20*z
     direction 1.3*z
     up        y
     right 4/3*x
     look_at   0*x
}


light_source {
    20*z
     color White
}



------------------------------------------
I know it doesn't look pretty yet! :(I'll keep trying to improve it. especially
the lighting; is there a trick for making a diffuse light source? If someone
has any suggestions I would appriciate it!


Post a reply to this message

From: Dan Connelly
Subject: Re: location dependant refractive index
Date: 2 Nov 2008 08:25:03
Message: <490daa2f$1@news.povray.org>
feestje wrote:
> hi all,
> 
> thank you for your responses! I thought of the stacked box methos myself but I
> hoped ther ewould be something much more easier! well anyway: he is what I
> accomplished so far:
> 


I'd use a loop for the slices.


Post a reply to this message

From: feestje
Subject: Re: location dependant refractive index
Date: 3 Nov 2008 04:25:00
Message: <web.490ec2e3a1a15775934be4af0@news.povray.org>
I dind't know using loops was an option. I will look for a tutorial somewhere
and try it. unless someone wants te show me how to do it offcourse ;)


Post a reply to this message

From: feestje
Subject: Re: location dependant refractive index
Date: 3 Nov 2008 07:10:01
Message: <web.490ee8fda1a15775934be4af0@news.povray.org>
I made a version with loop. I believe it will work. only problem i heve is with
the lighting. I want to use a plane that emits light. This is the codeI am
using:

light_source
{ <0,0,0>, 1
  looks_like {
  plane {
     z, 1000
     pigment {
         color White  }
             finish {
          ambient 1 }

}  }}


it seems the only light production from this code is because of the ambient
statement.

is it even possible to have a plane emit light?

Regards, Ruud


Post a reply to this message

From: feestje
Subject: Re: location dependant refractive index
Date: 3 Nov 2008 07:10:02
Message: <web.490ee945a1a15775934be4af0@news.povray.org>
btw: the entire code is:

#include "colors.inc"

global_settings { max_trace_level 100 }


object {
 sphere { <0,0,0>,10 }
 pigment {
  color  Black
 }
 finish {
  phong 1
  phong_size 10
 }
}







#declare Index = 1;
#declare Indexmax=20;
#declare lower_ior = 1;
#declare upper_ior = 2;
#declare hight_boundarylayer = 7;
#declare surface=15;




#while(Index <= Indexmax)


// hotter medium
box {
     < -50,(-surface+(Index-1)*hight_boundarylayer/Indexmax) , -20 >,    //
lower-left corner
     <  50, (-surface+(Index)*hight_boundarylayer/Indexmax) ,  20 >     //
upper-right corner


          pigment {
          color White filter 1
     }

     interior {
          ior (lower_ior+((upper_ior-lower_ior)/Indexmax)*Index)
     }
}
      #declare Index = Index + 1;
#end


//normal medium
box{
<-50,-20+hight_boundarylayer,-20>
<50,50,20 >

          pigment {
          color White filter 1
     }

     interior {
          ior upper_ior
     }
}

//surface (heater)
 box{
<-50,-surface,-20>
<50,-50,20 >

          pigment {
          color Blue      }
           finish {
          ambient 0.3 }

}


light_source
{ <0,0,0>, 1
  looks_like {
  plane {
     z, 1000
     pigment {
         color White  }
             finish {
          ambient 1000 }

}  }}










camera {
     location  -10*y- 1000*z
     direction 50*z
     up        y
     right 4/3*x

}


Post a reply to this message

From: Chris B
Subject: Re: location dependant refractive index
Date: 3 Nov 2008 09:50:25
Message: <490f0fb1$1@news.povray.org>
"feestje" <fee### [at] gmailcom> wrote in message 
news:web.490ee8fda1a15775934be4af0@news.povray.org...
> I want to use a plane that emits light. This is the codeI am
> using:
>
> light_source
> { <0,0,0>, 1
>  looks_like {
>  plane {
>     z, 1000
>     pigment {
>         color White  }
>             finish {
>          ambient 1 }
>
> }  }}
>
>
> it seems the only light production from this code is because of the 
> ambient
> statement.
>
> is it even possible to have a plane emit light?

The 'looks_like' keyword adds an object with no shadow that represents what 
the light_source (which is normally invisible) looks like from the outside. 
A plane has an inside and an outside, as determined by the surface normal 
specified, so, in this case, unless your camera is at a position where 
z>1000 then it's going to be inside the plane along with the light_source, 
which gives you your first problem. Secondly the object specified using the 
'looks_like' keyword doesn't change the way the light_source illuminates the 
rest of the scene, so you'll still get light of the color specified in the 
light_source definition eminating from the location specified (ie a point 
source).

If your camera is somewhere near the origin then I suspect you need to 
adjust your plane to -z,-1000, so that the front surface is in the same 
place but so that everything beyond z*1000 is inside it, then move your 
light_source inside it (e.g. to <0,0,1001>).
To get the light to come from a broader area than a single point source you 
might want to look at using an area_light. If you want the rays to come in 
parallel you may want to check out the 'parallel' keyword in the help.

Regards,
Chris B.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: location dependant refractive index
Date: 4 Nov 2008 04:29:55
Message: <49101613$1@news.povray.org>
feestje wrote:

> is it even possible to have a plane emit light?

you need to use radiosity if you wish the high ambient of
your plane to actually light other objects. However, that can
be quite painful to use, especially for your outdoor scene
which may have enough other issues with all those stacked
refracting planes. You could also try MCPov, which uses a
different (easier to use) technique for global illumination.


Post a reply to this message

From: Chris B
Subject: Re: location dependant refractive index
Date: 4 Nov 2008 05:15:30
Message: <491020c2$1@news.povray.org>
Hi Ruud,
I'm guessing that the newsgroup server went down yesterday and that you may 
not have seen my response to your posting. By the same measure, my newreader 
doesn't show your second posting (the full SDL listing). If I'm right you 
can see my response here:

http://news.povray.org/povray.general/thread/%3Cweb.490b1bcd2c217504934be4af0%40news.povray.org%3E/?mtop=288261&moff=10

Regards,
Chris B.


Post a reply to this message

From: Chris B
Subject: Re: location dependant refractive index
Date: 4 Nov 2008 05:28:12
Message: <491023bc$1@news.povray.org>
> I'm guessing that the newsgroup server went down yesterday
I take that back. I think it's just my mind playing tricks on me.


Post a reply to this message

<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>

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