|
|
Thanks for the quick respone.
I've just experimented with the second option. I will be performing the
same action on a number of objects, so it may be easier to have initial
size that grows by 5% per frame. At the moment it's not clear how many
frames will be required. Exposing my ignorance I don't quite understand
the transformation,
2 * pow(1 + X, frame_number)
Why multiply by 2?
Related to the above, how would I apply the same to the following,
isosurface {
function{
f_rounded_box(x,y,z,0.3,1.9,0.9,0.9)
-f_marble(x*3,y*2,z*2)*0.15
-f_bumps(x*3,y*2,z*3)*0.75
}
contained_by {box {<-2,-1,-1>*2.2,<2,1,1>*2.2}}
accuracy 0.003
max_gradient 5
scale 0.7
texture{ pigment{color rgb<0.85,0.15,0.23>}
//normal {bumps 0.25 scale 0.015 }
finish {ambient 0.15 diffuse 0.75 phong 0.4 reflection 0.2}}
rotate<0,30,0>
translate <-0.2, 0.0, 0>
} // end of isosurface -----------------------------------------------
Is it possible to grow the object using the scale keyword?
"Slime" <fak### [at] emailaddress> wrote:
> > Say I have a sphere, how could I generate 10 rendered images with the size
> > increasing by X percent per frame?
>
>
> Well, it might be easier to make it go from one size to another size over
> the course of the animation, rather than a per-frame kind of thing. This can
> be done with the clock variable:
>
> #declare startsize = 2;
> #declare endsize = 5;
> sphere {
> <0,0,0>, startsize + clock*(endsize - startsize)
> // goes from 2 to 5 as clock goes from 0 to 1
> ...
> }
>
> And rendered with +KFI0 +KFF9 to render frames 0 through 9 (total of 10).
> The clock will increase from 0 to 1 over the course of these frames.
>
> Now, if for some reason it's really important that you do this in the
> "X-percent-per-frame" way, then that can be done as so:
>
> #declare X = 5/100; // 5%
> sphere {
> <0,0,0>, 2 * pow(1 + X, frame_number)
> ...
> }
>
> But I don't recommend this, mostly because it links the behavior of the
> animation to the number of frames. It's good to be able to increase your
> framerate without altering the animation itself.
>
> - Slime
> [ http://www.slimeland.com/ ]
Post a reply to this message
|
|