POV-Ray : Newsgroups : povray.binaries.scene-files : Fade in a complex mesh : Re: Fade in a complex mesh Server Time
25 Apr 2024 22:44:20 EDT (-0400)
  Re: Fade in a complex mesh  
From: Alain
Date: 27 Oct 2016 20:04:04
Message: <581295f4$1@news.povray.org>

> Hi,
>
> Any idea where I'm going wrong with this fade in? I want the CGL_band to be
> transparent then fade in gradually with each animated shot. Ive got it to fade
> to the gray un-textured solid, or Ive got it to fade into the texture from a
> black silhouette but cant figure out how to fade in the whole thing from
> transparent to fully visible...
>
> Here is the code and the "CGL_solid.inc" is attached
>
> #declare Sandy = color rgbt <1, .9, .35>;
>
> #declare Transmit = .8;
> #declare CM_Sandstone =
>
> colour_map{
>   [0.3 rgbt <1, 1, 1, 1.2*Transmit*(clock)>]
>   [0.4 rgbt <1, 0, 0, Transmit*(clock)>]
>   [0.41 rgbt <0.5, 0.3, 0.1, .5*Transmit*(clock)>]
>   [0.42 rgbt <1, 0, 0, .75*Transmit*(clock)>]
>   [0.6 rgbt <1, 0.5, 0, Transmit*(clock)>]
>   [0.7 rgbt <1, 1, 1, .5*Transmit*(clock)>]
>
>
> }
>
You want everything to have transmit 1 when clock reatch the value of 1. 
In your actual code, this can NEVER appen. At most, it tops at 0.96 for 
the first entry of your colour_map, and as low as 0.4 in the worst case.


0.9, 0.35, 0>

You need your transmit to go from zero to one, or from one to zero.
This may work beter for a fade out:
colour_map{
   [0.3 rgbt <1, 1, 1, clock>]
   [0.4 rgbt <1, 0, 0, clock>]
   [0.41 rgbt <0.5, 0.3, 0.1, clock>]
   [0.42 rgbt <1, 0, 0, clock>]
   [0.6 rgbt <1, 0.5, 0, clock>]
   [0.7 rgbt <1, 1, 1, clock>]
}

For a fade in, try this:
colour_map{
   [0.3 rgbt <1, 1, 1, 1-clock>]
   [0.4 rgbt <1, 0, 0, 1-clock>]
   [0.41 rgbt <0.5, 0.3, 0.1, 1-clock>]
   [0.42 rgbt <1, 0, 0, 1-clock>]
   [0.6 rgbt <1, 0.5, 0, 1-clock>]
   [0.7 rgbt <1, 1, 1, 1-clock>]
}

If any texture need to have any transmiting transparency when fully 
visible, you need to restrict the range of your transmit accordingly.
Like this:
rgbt<1, 1, 1, 0.5+ 0.5*Transmit*clock>

If you have a filtering pigment, the filter need to drop to zero as the 
transmit reatch one.
Sample:
rgbft<1, 0.5, 0.12, 1*(1-clock), clock>
This is the only case where you need the parantesis.


Alain


Post a reply to this message

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