POV-Ray : Newsgroups : povray.animations : multiple usage of mclock? : Re: multiple usage of mclock? Server Time
26 Apr 2024 19:08:58 EDT (-0400)
  Re: multiple usage of mclock?  
From: Alain
Date: 14 Mar 2011 12:33:12
Message: <4d7e4348@news.povray.org>

> Hi!
>
> Is there a way to create several indipendent clocks using Chirs Colefax's
> ClockMod.inc?
>
> I'm animating a (1000 frames) smooth camera path using his S-Curve clock type.
> At the same time I would like to change the transparancy of some objects in the
> scene from 1 to 0.85 and back again. I would like to trigger the appearance of
> the invisible objects at frame 200 and softly change their transparancy level to
> a certain percentage ending in frame 300. Then I want to hold the level of
> transparancy until frame 700 and then change the transparency again so that the
> objects will be fully transparent at framo 800. All This while the camera is
> beeing animated using the S-Curve mclock.
>
> Any Ideas?
>
> Thanks!
> Andi
>
> PS: I'm Using PovRay for Windows on Windows 7 64bit latest Beta version for
> multi core.
>
>
>
>

You only have ONE clock variable, but you can have as many independent 
derived variables as you like.
You can never change the value of clock directly in your code, it's a 
read only variable.
ClockMod.inc does just that. It takes the internal clock variable and 
calculate new, independent, user defined, Clock(s) variables from it.

Just use the macro once for the camera. Once the camera have been 
positioned, you are free to change the variables used as you want 
without ever affecting the camera in any way.

If you first set your transparency, changing the variable after that 
won't affect the transparency.

Just make sure that, for the transparency, from 0% to 20% you have a 
constant value, then increase from 20% to 30%, then stay constant until 
70% and finaly drop to the initial value at 80% and stay constant after 
that.

It's a good place to use a spline.
Using % is beter that using absolute frame_number. If you come back and 
want to render the animation with another frame fate, you won't need to 
change the code, just the final frame.



Alain


Post a reply to this message

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