Archive: Helping Editing AVS - Seismogrid


15th November 2005 05:54 UTC

Helping Editing AVS - Seismogrid
Hey all,
I'm just wondering if anyone is familiar with this AVS preset and if they might be able to help me out. the camera darts around the grid erradicly and I'm wondering if there is an easy way to just have the camera rotate around the grid instead. the code for rotation is something like this:

oz=-(sin(t)*cos(-t*.41)*sin(cos(1+t*.631)));
ot=.3+1.9/sqrt(sqr(ox)+sqr(oy)+sqr(oz));
ox=ox*ot;oy=oy*ot-.2;oz=oz*ot;
oy=sqrt(abs(oy))*sign(oy);
oy=sqrt(abs(oy))*sign(oy);
ry=atan2(-ox,oz);
rx=-atan2(oy,sqrt(sqr(ox)+sqr(oz)));

cx=cos(rx);sx=sin(rx);
cy=cos(ry);sy=sin(ry);

reg30=ox;
reg31=oy;
reg32=oz;

reg40=cx;
reg41=sx;
reg42=cy;
reg43=sy;

reg50=w/h;
reg51=h/w;

reg99=reg99+sin(rt-reg99)*.1;


I have no idea what is going on here. haha, any help would be awesome! thanks


28th November 2005 21:48 UTC

ox oy oz are the camera position. rx ry rz are their rotation.

here ry and rx are worked out from the camera position so that they always look to the middle...

some of it is a bit hax:

ot=.3+1.9/sqrt(sqr(ox)+sqr(oy)+sqr(oz));
ox=ox*ot;oy=oy*ot-.2;oz=oz*ot;

i'm not 100% but i think he is just biasing the normalisation so the camera ends up in more favorable places


if that didnt help, search and deduce....

btw, its always good to start simple. if you cant get how that works from looking at it you probably dont know enough to do anything constructive with it...