POV-Ray : Newsgroups : povray.animations : multiple usage of mclock? Server Time: 22 Jul 2019 22:51:07 GMT
  multiple usage of mclock? (Message 1 to 4 of 4)  
From: CAD-Andi
Subject: multiple usage of mclock?
Date: 12 Mar 2011 23:00:01
Message: <web.4d7bfa3fee50dffcbf952ed30@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.


Post a reply to this message

From: CAD-Andi
Subject: Re: multiple usage of mclock?
Date: 13 Mar 2011 20:50:01
Message: <web.4d7d2ce714cd5500b642fbb20@news.povray.org>
"CAD-Andi" <nomail@nomail> wrote:
> 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.

I solved my issue the hard way by my own macro that calculates the transparency
levels depending on the current frame_number. Not too elegant. Also very simple
and linear, but for my purpose it was enough.

I would still be interested if someone can tell me how to make complex
animations with several objects and events on the time line and still use
S-curve mclock or something similar without having to program everything from
scratch.

Thanks for considering.

Andi


Post a reply to this message

From: Alain
Subject: Re: multiple usage of mclock?
Date: 14 Mar 2011 16:33:12
Message: <4d7e4348@news.povray.org>
Le 2011/03/12 17:57, CAD-Andi a écrit :
> 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

From: CAD-Andi
Subject: Re: multiple usage of mclock?
Date: 15 Mar 2011 17:25:00
Message: <web.4d7fa0d114cd5500bf952ed30@news.povray.org>
> 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

Awesome! Thanks Alain to set me straight! It's pretty obvious and simple isn't
it? I guess I'm not used to the linearity that povray parses through the code.
Also that it parses every time through the whole thing makes it a little easier.

Though I still hope that some day the programming gods will provide us with the
possiblity to store constant geometry somewhere in memory so that povray doesn't
have to parse through the scene file every time in full.
(I know, this was a little off topic, but one can still express hope, right?)

Thanks again!

Andi


Post a reply to this message

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