- AVS
- What can your DM do?
Archive: What can your DM do?
greatWho
11th October 2002 21:20 UTC
What can your DM do?
Hi
i've got an idea...
i post here a preset with two simple scopes (two times the same) and you add one Dynamic Movement...
i only would like to see, what you would do with it...
My final preset, i will post later..
so... it's on you, show me your ideas...
GreatWho
maybe, it's not the final...maybe, we could do a step more after... we will see...
greatWho
15th October 2002 20:33 UTC
no one interessted to add his idea?
or no time to do ?
well... here are two ideas of to add a DM to this simple SSC's..
maybe there is someone else out there who has an idea to change the look with a DM
GreatWho
Tuggummi
17th October 2002 09:09 UTC
I might a bit paranoya about this, but it sounds like you want us to make dm's for you to use :rolleyes: :weird: :igor:
But yes, i don't have the time either. :(
jheriko
17th October 2002 14:00 UTC
Sorry, I played with it but I couldn't make anything decent from it. :(
greatWho
17th October 2002 18:14 UTC
Originally posted by Tuggummi
I might a bit paranoya about this, but it sounds like you want us to make dm's for you to use :rolleyes: :weird: :igor:
But yes, i don't have the time either. :(
No... i think i have no need to use your DM's... i can do by myselfe (look at the attached preset) :D ... i also only can be proud about a preset, if i have made it all by myselfe..;)
i only thought that it would be interesting, what other people would do with the same root.... maybe there could be a second step, on witch one from all the posted Presets will be a update made with a second DM or whatever... so at the end, we could see alot of various presets with one and the same root, the only diffrence is, taht they have an ad by various AVS'ers Creativity and Knowledge about AVS..
so... that's what i have to say to your paranoya, you don't need to have...
to the attached preset... if the speed is to fast, open the second DM and set the value for "speed" <1
GreatWho
jheriko
17th October 2002 18:52 UTC
I wouldn't be too proud of that DM, it is quite simple and the code is really unoptimised.
Some hints:
Your DM gridsize is way to big, you can acheive the exact same effect with much lower gridsizes. Like 0x0.
To make your dms run faster do as many calculations as you can every frame rather than for every pixel. You could calculate sin(t*0.5) and 1/(t*2) every frame and stick them in variables. Making just those changes I get 10fps more. :)
Karnov
18th October 2002 04:12 UTC
Jheriko (or anybody), could you explain to me exactly what the gridsize function does?
Ive tried to figure it out (and i thought i had) but when you said (and i tried it) that 0 0 works, it kinda messed up my "theory"
so, id appreciate it if you clued me in
thx :)
Jaheckelsafar
18th October 2002 04:36 UTC
Grid size determines the amout of points i nthe window that the actual calculations are done on; all the other pixels are interpolated. THe higher your gridsize number, the more accurate your DM.
Tuggummi
18th October 2002 06:10 UTC
To make your dms run faster do as many calculations as you can every frame rather than for every pixel. You could calculate sin(t*0.5) and 1/(t*2) every frame and stick them in variables. Making just those changes I get 10fps more.
Let me get this straight... you mean when you use like:
per frame: t=t+0.05
per pixel: x=x+sin(t)
you would use:
per frame: t=sin(t+0.05) or how? i don't know :(
x=x+t
uhm... i just want to know how can you calculate transitions in per frame faster than doing it in the per pixel...
yet i haven't downloaded the preset, im just want to know what you mean by calculating them in per frame. And how can i do it to make my presets faster :D
Jaheckelsafar
18th October 2002 06:45 UTC
Think about it. Sin(t) isn't going to change at all, nomatter what point you're on. If you calculate it in the per frame section, store it in a temp variable, and use that variable in the per point section, you're doing the math only once per frame.
If you have a 20x20 grid, and sin(t) is in per point, you're calculating the sin(t) 20*20 (400) times per frame.
Which will be faster, calculating it once, or 400 times. :)
Tuggummi
18th October 2002 06:55 UTC
Think about it. Sin(t) isn't going to change at all, nomatter what point you're on. If you calculate it in the per frame section, store it in a temp variable, and use that variable in the per point section, you're doing the math only once per frame.
English please? ;)
Can you give me a sample?
jheriko
18th October 2002 09:28 UTC
frame:
t=t+0.05;
st=sin(t);
pixel:
x=x+st;
with a dm with 16x16 gridsize you are now doing 255 less sine calculations every frame. :)
greatWho
21st October 2002 18:06 UTC
jheriko: i didn't know that it would be faster if the calculations are made in frame... but after you told, i see that...
grid 0*0... i had any distortions with the default grid 16*16, so i set the grid higher because i have read anytime befor, that it must be bigger to have no distortions... 0*0 i didn't know, but it works fine thanx.
i remixed the first 2nd preset, i postet here, with the dm's of my 3th post, and add a buffersave... it looks fine... more worth to be proud about the whole preset?
GreatWho
jheriko
21st October 2002 18:20 UTC
Cool. I'll check that new one out, I suggest you play more with DMs, I'll do a mix for you in a bit and post it up but I have to go eat right now...
Hopefully I'll be able to make something funky fresh from your scope. :)
jheriko
21st October 2002 19:02 UTC
Basically I added one dm and an effect list and moved your buffer save. I also reduced some grid sizes to make it go faster.
Enjoy!
:D
greatWho
21st October 2002 19:50 UTC
Hey, cool tunnel effect, can you explane me the functions and the calculations for this effect?
thanx
jheriko
21st October 2002 21:31 UTC
The basics of it all are:
x1=x;
y1=y;
x=atan2(y1, x1);
y=sqrt(x1*x1+y1*y1)/(x1*x1+y1*y1);
Which is a simple cylindrical projection, that should be easier to understand than the mess of code in that DM. Everything else I added is just fluff to modify the equation to make it do all of those other things. Like, I added z1 to do the rotation.
I'd recommend searching the net for stuff about raytracing, rotation matrices (sometimes spelled wrongly as matrixes) and projection transformations, it shouldn't be too hard to find numerous tutorials. It may help if you understand vectors, matrix algebra and parametric equations. The reason I don't want to explain it all is that if you know nothing about vectors and matrices it could take months, plus you don't really need to understand it to use it (I'd say so at least) :).
UnConeD
22nd October 2002 00:58 UTC
Basically, matrices are a nice way to wrap a lot of multiplications into one operation. 3D rotations in AVS would be tons handier if it had native support for matrix multiplications.
Then, instead of doing the rotations by hand (cos(rx), cos(ry), sin(ry), ...), you could do them a lot faster.
Karnov
22nd October 2002 03:18 UTC
matrix multiplications
/me remembers that section of Algebra II and shudders
damn, it was so nice to have the Ti graphing calcutors for that
(then writing a program that "faked" your work)
(i am soooooo darn lazy)
what did you old guys do in the old days for those?
slide rulers and an abacus?
hehe :p old fogeys
Zevensoft
22nd October 2002 09:06 UTC
We 16 year olds are currently using pencil and paper.
jheriko
22nd October 2002 09:42 UTC
That pencil and paper sounds like far too much apparatus to me, what are you doing multiplying 3 13x17 matrices?? ;)
greatWho
22nd October 2002 21:22 UTC
jheriko: about optimize.... to optimise the dm's i write calculations like sin(t) in the frame... is it right, that if i make the same with the SSC, it would be faster? anytime ago, i read, that is bad, if there is too much inpunt in per frame, or was that a problem in a older version of avs?
Nic01
23rd October 2002 00:24 UTC
For SSC, you can do that - There's a limit on stuffs on each line, but I never know anyone who ever hit that limit.
My preset attached... I believe it's 2 simples and 1 DM right? Maybe I missed something in the way, but oh well (I didn't d/l any of the presets here too, so that's one factor).
Enjoy?
Karnov
23rd October 2002 02:42 UTC
what are you doing multiplying 3 13x17 matrices??
Nothing more than calibrating my nuclear weapons.
:p
jheriko
23rd October 2002 12:20 UTC
Originally posted by Nic01
For SSC, you can do that - There's a limit on stuffs on each line, but I never know anyone who ever hit that limit.
There is a limit on variables... I don't know how many, only that I hit it once and my preset wouldn't work after continual restarting... only after removing some variables. It is a huge one though, I was synching 6 scopes together into an overly complex arrangement when I should have gone for something simpler. I was probably using at least 55 variables in each scope (those are just the ones I can think of off of the top of my head)... probably a few more.
Nic01
24th October 2002 00:03 UTC
Jheriko, I know that there's a variable limit - Hit it about 3 times so far (Ripplescope and Amoebic scopes). I believe it's somewhere in the area of 32-64.
To see the limit on each line, simply take my beat counter and move the cursor to beginning of line 2 in pixel (Should be right before "y"). Press backspace and see the wonder.