POV-Ray : Newsgroups : povray.newusers : fading a transparant object (glass) Server Time
29 Jul 2024 16:27:54 EDT (-0400)
  fading a transparant object (glass) (Message 1 to 2 of 2)  
From: etrash2000
Subject: fading a transparant object (glass)
Date: 29 Apr 2005 08:35:00
Message: <web.427228d8fcbe9dc1603e81820@news.povray.org>
First some background:

I would like to make a rendering of some machine parts containing both solid
objects (steel and plastics) and transparent objects (glass). In order to
clearify for the user how the machine is built I would like to fade away
different parts of the machine as an animation. For fading the solid
objects I found the following code on this site:

//---------  code  -----------------------------------
  #declare texture0 = texture { pigment {rgbt 1} }
  #declare texture1 = texture { pigment {rgb  1} }
  // where texture1 can be any texture with t=0

  sphere { 0, 1
         texture { average
                   texture_map { [(1- clock) texture1 ]
                                 [(clock)    texture0 ]
                   }
         }
  }
//--------- end code  --------------------------------

This code does not work if the the object is transparent, such as the
following definition

#declare material1 = material { texture {pigment{rgbt 1}} interior{ior 1.5}
}


Is it possible to fade away objects such as glasses without changing the
interior properties such as the ior.

Regards,
Etrash2000


Post a reply to this message

From: Burki
Subject: Re: fading a transparant object (glass)
Date: 3 May 2005 11:05:01
Message: <web.4277923e713ebfb0d61e8c370@news.povray.org>
"etrash2000" <nomail@nomail> wrote:
> (snip)

> This code does not work if the the object is transparent, such as the
> following definition
>
> #declare material1 = material { texture {pigment{rgbt 1}} interior{ior 1.5}
> }
>
>
> Is it possible to fade away objects such as glasses without changing the
> interior properties such as the ior.


Can't you could do it in another way, e.g.


  texture {
    pigment {
      color rgbt <0.8, 0.8, 1.0, clock>
    }

and then run the clock variable in the anima.ini file from 0 to 1 ?



In the case the item has also an IOR, the material would fade away, but the
objects would still refract the light. In your case the light ray from
inside the machine parts. Could look a bit weird.
If so, you DO have to change the interior to e.g.

interior {
 ior 1.5 - 0.5 * (clock > 0)
     //     ===> or whatever the original value was
}



Yours,
Burki


Post a reply to this message

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