|
|
|
|
#1 |
|
Major Dude
|
Multi_DM
Just this new multi functional DM i created, was the easiest i ever did.
Would like to have your sugggestions to make it better. Requires colormap. |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Jan 2003
Location: Mumbai, India
Posts: 787
|
Well, yeah, the dm can be optimized to a great extent, especially the pixel part. What have you done here is:
x1=... y1=... x2=... y2=... ... and then x=if(..,x1,x); y=if(..,y1,y); now suppose x1=sin(t)*x, suppose... so directly you can write: x=if(..,sin(t)*x,x); instead of calculating this and storing it in one variable. In this way only one out of 7 x's and y's are calculated. and then instead of calculating above(bt,change)... per pixel, you can calculate it per-frame and then save it to one variable. Here' the multi-flow dm base I created: Init: ¤ Change this var : ;BEATSKIP=20; ¤Dont change this;NFEFFECTS=7;cb=rand(100)%NFEFFECTS; Frame: c0=equal(cb,0);c1=equal(cb,1); c2=equal(cb,2);c3=equal(cb,3); c4=equal(cb,4);c5=equal(cb,5); c6=equal(cb,6);....go on adding this till the no. of flows you have Beat: cb1=(cb1+1)%BEATSKIP; cb=if(bnot(cb1),(cb+1)%NFEFFECTS,cb); Pixel: ¤ Flow 1; r=if(c0,ADD STUFF HERE,r);d=if(c0,ADD STUFF HERE,d); ¤ Flow 2; r=if(c1,ADD STUFF HERE,r);d=if(c1,ADD STUFF HERE,d); ¤ Flow 3; r=if(c2,ADD STUFF HERE,r);d=if(c2,ADD STUFF HERE,d); ¤ Flow 4; r=if(c3,ADD STUFF HERE,r);d=if(c3,ADD STUFF HERE,d); ¤ Flow 5; r=if(c4,ADD STUFF HERE,r);d=if(c4,ADD STUFF HERE,d); ¤ Flow 6; r=if(c5,ADD STUFF HERE,r);d=if(c5,ADD STUFF HERE,d); ¤ Flow 7; r=if(c6,ADD STUFF HERE,r);d=if(c6,ADD STUFF HERE,d); NEFFECTS stands for the number of flow patterns you are having. Instead of r,d you can use x,y also. I know this can be reduced to just a couple of statements using nested if's, but that would be too confusing. If the no. of flow patterns are too large then you need'nt use c1,c2,c3...just use equal(cb,...) in the pixel part. Otherwise, there are changes that winamp would crash if the no. of variables is too large. http://home.iitb.ac*****~shreyaspotnis |
|
|
|
|
|
#3 |
|
Senior Member
|
OOOOOOOOOOOOOOOOOOOH! (mouth watering) Thats realy nice
a bit on the slow side though
|
|
|
|
|
|
#4 |
|
Major Dude
|
Thanks unripelemon for the comments but i get around 20-30 fps on my comp, and shreyas must say your DM base is really good! I'l try and use it next time
(but i really do find my DM very easy to use) |
|
|
|
|
|
#5 |
|
Forum King
|
undefined: alledgedly the if(a,b,c) statement calculates b and c regardless of a. so in all honesty i doubt there's much optimization you can do with those psuedoif statements. however there is something to be said about saving variables, which i believe decreases ram useage and is somewhat of a speedup (but what do i know)
as for the dm, multifunctional dm's (and scopes) have been around for a while - but it's still cool to get one to work yourself
"guilt is the cause of more disauders than history's most obscene marorders" --E. E. Cummings |
|
|
|
|
|
#6 |
|
Major Dude
|
yeah i guess it has been done many times before but i just wanted to make one myself that's it
|
|
|
|
|
|
#7 |
|
Forum King
Join Date: May 2003
Location: Fnord?!
Posts: 2,657
|
I really like the way the dynamic move looks with those colors put over, but I like this more for the colors then the movements, some of the movements you get in this are good, but I still don't like how this worked out, I prefer fluid dynamic movements, not these "jittery" ones that change from preset movement to preset movement every N-beats, just a personal taste. Nice job with the all around coding though.
|
|
|
|
|
|
#8 |
|
Major Dude
|
So you say you dont like Multi DM's that change movement every N beats ??
Perhaps you like Dm's which change movements every M beats
|
|
|
|
|
|
#9 |
|
Bin King
Join Date: Mar 2001
Location: Finland
Posts: 2,179
|
Pretty sweet preset, the code could be optimized a bit yes, but i doubt there is much you can do there, other than what shreyas already suggested.
btw. Using notepad to code multimovement dm's helps a lot ![]() Besides the multimovement, i really like the color trick here, it's pretty sweet Great work |
|
|
|
|
|
#10 |
|
Major Dude
|
Thanks i'm working on it to make it more customizable and nice, i post it here when it is done.
|
|
|
|
|
|
#11 |
|
Major Dude
Join Date: Jan 2003
Location: Mumbai, India
Posts: 787
|
Just one question - in if(a,b,c) why is b calculated if a=0?
http://home.iitb.ac*****~shreyaspotnis |
|
|
|
|
|
#12 |
|
Major Dude
|
I thought that if(a,b,c) c is calculated if a=0,
|
|
|
|
|
|
#13 |
|
Major Dude
Join Date: May 2003
Location: Australia
Posts: 1,353
|
if(a,b,c) performs b if a<>0 and c if a==0
BUT, apparantly, (and i cant remember where this first came up) both b and c are calculated no matter what a is. This is because its not actually compiled language, its just text that is examined in and then used as instructions for the program. Calculated does not mean performed, it just means that the code is run through even if it is not used. Atero's comment meant that it doesnt save you any fps because avs still has to run through all of the code. (btw, i dont actually know if this is the truth, i had heard of it vaguely before, and atero seems to have heard it aswell, but i dont know if its true. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|