POV-Ray : Newsgroups : povray.general : location dependant refractive index Server Time
5 Nov 2024 11:20:21 EST (-0500)
  location dependant refractive index (Message 1 to 10 of 24)  
Goto Latest 10 Messages Next 10 Messages >>>
From: feestje
Subject: location dependant refractive index
Date: 31 Oct 2008 10:55:00
Message: <web.490b1bcd2c217504934be4af0@news.povray.org>
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


Post a reply to this message

From: stbenge
Subject: Re: location dependant refractive index
Date: 31 Oct 2008 15:25:16
Message: <490b5b9c$1@news.povray.org>
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


Post a reply to this message

From: Dan Connelly
Subject: Re: location dependant refractive index
Date: 31 Oct 2008 16:23:32
Message: <490b6944$1@news.povray.org>
stbenge wrote:
> 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.

I've found when stacking translucent objects with internal media, I need to be REALLY
careful about separating surfaces, or I get spotty artifacts.

Dan


Post a reply to this message

From: stbenge
Subject: Re: location dependant refractive index
Date: 31 Oct 2008 17:31:52
Message: <490b7948$1@news.povray.org>
Dan Connelly wrote:
> stbenge wrote:
>> 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.
> 
> I've found when stacking translucent objects with internal media, I need 
> to be REALLY careful about separating surfaces, or I get spotty artifacts.

Oh no, with media in the equation, the scene might take months to 
render! I don't think media is really needed for this effect.

Oh yeah, the poster may want to give the stacked objects no_shadow to 
help speed things up somewhat.

Sam


Post a reply to this message

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

Goto Latest 10 Messages Next 10 Messages >>>

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