Skip to content
Forum Archive

Wfc7

159 posts

Nanakiwurkz#
lol
ok ok its not much better then Jheriko's original.
but at least its cool looking
Jheriko please don't kill me.
jheriko#
Originally posted by Nanakiwurkz
D.N.A was prolly the most hardest and single most worked on preset i ever did.
It paid off... its one of the best presets I've seen for a while... way beyond the standard that I was expecting from you to be honest.

I'll check the remix later. The starfield was there so that an easy remix could have been made by changing it to something good, so I probably won't be doing any killing today...
Nanakiwurkz#
Originally posted by jheriko
It paid off... its one of the best presets I've seen for a while... way beyond the standard that I was expecting from you to be honest.

I'll check the remix later. The starfield was there so that an easy remix could have been made by changing it to something good, so I probably won't be doing any killing today...
let me guess.
it brought back memories of your long lost DNA Analysis presets for the days of old.


tell you one thing the triangles thing was a pain in the butt to get to move right seeing as i had to make all the rotation matrices by hand.
jheriko#
don't complain at me about rotation matrices. you won't get sympathy. if you find the actual matrices hard to remember then use the correct, easy to remember form:

c1 = c1*cos(rc3) - c2*sin(rc3);
c2 = c1*sin(rc3) + c2*cos(rc3);

c1,c2 are two of the coordinate axes and rc3 is the rotation about the third axis. remember that you should cycle the coords, e.g. do x,y around z, then do z,x around y, then do y,z around x. if you try doing x,z you will hit a snag.

another tip: if you have a load of identical rotations, rotate the basis vectors then transform. i.e. rotate X = {1,0,0} Y = {0,1,0} and Z = {0,0,1} into components so that the rotating X gives rX = {rXx, rXy, rXz}, Y gives rY = {rYx, rYy, rYz} and rZ = {rZx, rZy, rZz}. You can then convert an x,y,z in the original coordinate system into a new, rotated, x',y',z' based on the new basis vectors:

x' = x*rXx + y*rYx + z*rZx;
y' = x*rXy + y*rYy + z*rZy;
z' = x*rXz + y*rYz + z*rZz;

saves one multiplication per point at the cost of a rotation matrix per frame, and this is for each rotation used. since its possible to combine multiple rotations (but not translations) on frame and recreate the results by using this same method. (rotate X,Y,Z more than once to produce the rX, rY and rZ components).

this can be extended to include translations as well, provided that you store an extra set of components to describe them and you rotate these vectors too.

not sure if this helps, but i'm guessing that this was part of the problem... the great thing about working with basis vectors is that you effectively rotate the whole space at once, rather than each point one at a time, so you can store the basis vectors in registers/megabuf and reuse them as you wish. the result is a little more efficient, and easier to reproduce, than using the 3 2x2 matrices normally used (3 muls less), and although its fractionally less efficient (per frame only) as the 3x3 matrix its a lot easier to remember.

on second thoughts... this is all quite a lot to remember. sorry. :P
Nanakiwurkz#
Originally posted by jheriko
don't complain at me about rotation matrices. you won't get sympathy. if you find the actual matrices hard to remember then use the correct, easy to remember form:

c1 = c1*cos(rc3) - c2*sin(rc3);
c2 = c1*sin(rc3) + c2*cos(rc3);

c1,c2 are two of the coordinate axes and rc3 is the rotation about the third axis. remember that you should cycle the coords, e.g. do x,y around z, then do z,x around y, then do y,z around x. if you try doing x,z you will hit a snag.

another tip: if you have a load of identical rotations, rotate the basis vectors then transform. i.e. rotate X = {1,0,0} Y = {0,1,0} and Z = {0,0,1} into components so that the rotating X gives rX = {rXx, rXy, rXz}, Y gives rY = {rYx, rYy, rYz} and rZ = {rZx, rZy, rZz}. You can then convert an x,y,z in the original coordinate system into a new, rotated, x',y',z' based on the new basis vectors:

x' = x*rXx + y*rYx + z*rZx;
y' = x*rXy + y*rYy + z*rZy;
z' = x*rXz + y*rYz + z*rZz;

saves one multiplication per point at the cost of a rotation matrix per frame, and this is for each rotation used. since its possible to combine multiple rotations (but not translations) on frame and recreate the results by using this same method. (rotate X,Y,Z more than once to produce the rX, rY and rZ components).

this can be extended to include translations as well, provided that you store an extra set of components to describe them and you rotate these vectors too.

not sure if this helps, but i'm guessing that this was part of the problem... the great thing about working with basis vectors is that you effectively rotate the whole space at once, rather than each point one at a time, so you can store the basis vectors in registers/megabuf and reuse them as you wish. the result is a little more efficient, and easier to reproduce, than using the 3 2x2 matrices normally used (3 muls less), and although its fractionally less efficient (per frame only) as the 3x3 matrix its a lot easier to remember.

on second thoughts... this is all quite a lot to remember. sorry. :P
@_@
@_@
@_@
@_@
@_@
@_@
@_@
*spins around in confusion.
i was complaining.
i had to relearn half of the math stuff i learned in avs so it was sorta hard to do.
that and i had to translate 3 axis of movement in the triangles to a 2D screen not the easiest thing in the world for seeing as i'm not a mathmetical genius as you and UnConed are.

:-P

anyway thanks for the small lesson i'm sure i'll figure it out someday.........*faints from trying to calculate it
X_X
jheriko#
its easier if you don't take the attitude of "i'm not a mathematical genius" use google and copy equations. you don't need to understand them all that much. 🙂

if you can lose that attitude you are halfway to finding maths easy. you have the capacity for it... your brain solves a relatively complicated mathematical problems several times a second... orders of magnitude more complicated than the kind of crap avs requires. so you do have the capacity for it... most of us all do. 🙂

for the matrices though just try to remember that it is cos - sin, sin + cos. that saves me looking it up every time

it has other nice properties too, e.g. the first is the negative of the second and vice versa. cos(-x) = -cos(x) = cos(x).

the "correct" circle formula in radial coords is x = cos(r), y = sin(r), lining up with the matrix

if you go round clockwise you get a 90 degree rotation at each "step"

cos(r) - sin(r) = cos(r) + cos(r + 90deg)
sin(r) + cos(r) = cos(r + 270deg) + cos(r + 180deg)

so no actual need to use the sin function ever... its just a notational convenience.


i used to find remembering the rotation matrices hard too. in fact i used to universally despise matrices... but thats another story altogether. (where the hell does that multiply really come from, eh? at least i know now. 🙂)
PAK-9#
Good job getting the pack out at last 😉

Nanakiwurkz most of what you are discussing is covered in the programming guide, I recommend you look there for an AVS-centric guide to rotation matrices.
MaTTFURY#
i was wondering whether i should say anything about that ...
i lied there. cos(-x) = cos(x) and sin(-x) = -sin(x).
lol quotethed the 😁