![]() |
#201 |
Major Dude
Join Date: Feb 2004
Location: Germany
Posts: 580
|
a lot of formulae there, you're right... problem is that it's listed by name/category, so you have to know the name/category to find a formula... but thanks for the link i think i'm just gonna try random 4th degree polynomials with raytracing
![]() If you can't say something nice, say something surrealistic. |
![]() |
![]() |
![]() |
#202 |
Major Dude
Join Date: Apr 2004
Location: melbourne, australia
Posts: 655
|
Is there any way to use the effects list override to filter out certain wavelengths of sound, so you only get bass through or treble?
Any help would be good... |
![]() |
![]() |
![]() |
#203 |
Bin King
Join Date: Mar 2001
Location: Finland
Posts: 2,173
|
Mr_Nudge, you could use getspec or getosc for detecting the sound values and then just use the "evallib override" in the effect list. But there is a problem with that, because every song is different and one getosc/getspec setting would detect your desired values on one song and completly something else on some other (if you're even that lucky you manage to find the exact value for those which i highly doubt)
Perfect or even good bass/beat detection is said to be impossible even with the supercomputers of today ![]() |
![]() |
![]() |
![]() |
#204 |
Major Dude
Join Date: Feb 2004
Location: Germany
Posts: 580
|
you cannot change the waveform
![]() all you can do is read it and then change the variables you store it in. If you can't say something nice, say something surrealistic. |
![]() |
![]() |
![]() |
#205 |
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104
|
Tug: good beat detection is perfectly possible, but it would require more CPU time. I know, cos I had to make a good beat detector for a univ project
![]() My approach: do an FFT per N samples, and calculate the autocorrelation in time of these FFTs. The shift at which the correlation is highest (except of course zero shift) is usually a multiple of the bpm. |
![]() |
![]() |
![]() |
#206 |
Senior Member
Join Date: May 2003
Posts: 101
|
if you want to create a radial gradient out of (y=i;x=0) superscope, put a movement after it:
code: ![]() |
![]() |
![]() |
![]() |
#207 |
Bin King
Join Date: Mar 2001
Location: Finland
Posts: 2,173
|
Global nullifier & scrambler
Two emtpy presets with one superscope. The other nullifies (sets to zero) all global vars and the other gives them random values between 0-999.
Someone just had to wrote them ![]() Useful for debuggin your presets, or just copy the nullifier lines to your own preset. |
![]() |
![]() |
![]() |
#208 |
Major Dude
Join Date: Apr 2004
Location: melbourne, australia
Posts: 655
|
Ok, another effects list question:
how would you get an effects list to enable only when there's music playing, i've tried using enabled=if((above(getspec(1,0.1,0)),1),1,0) but it doesn't work. By the way i'm not that good at avs code, but for what i do know this looks like it should work. |
![]() |
![]() |
![]() |
#209 |
Major Dude
Join Date: Feb 2004
Location: Germany
Posts: 580
|
you could check playpos using gettime(-1) and see if it changed in the last frame
code: or optimized: code: [edit] even more optimized ^^ code: the +0 is needed so equal() wont read its first input value from pos, but from a temporary buffer If you can't say something nice, say something surrealistic. Last edited by TomyLobo; 17th July 2004 at 16:52. |
![]() |
![]() |
![]() |
#210 |
Junior Member
Join Date: May 2004
Posts: 24
|
Try using enabled=if(above(getspec(0,.5,0),a),1,0); instead. I used "a" because you can set the treshold if you wish(between 0 and 1). The lower the number, the more often the effect list is enabled.
What you did wrong was to return 1 when the getspec data is above 1, which is never. I replaced it with 0. Also, you based the data on getspec(1,0.1,0) which looks at a narrow band in the higher pitches. If I were you I would add some code to change the blend level so it can blend in and out of volume levels. |
![]() |
![]() |
![]() |
#211 |
Major Dude
Join Date: Apr 2004
Location: melbourne, australia
Posts: 655
|
thanks, that works well, but i'd rather have it run on getspec or getosc so it works like other effects.
or is there some way to make a starfeild ssc? |
![]() |
![]() |
![]() |
#212 |
Major Dude
Join Date: Feb 2004
Location: Germany
Posts: 580
|
starfield? megabuf() ! ^^
some framework for that: [code] frame: pn=0; point: ix=megabuf(pn); iy=megabuf(pn+1); iz=megabuf(pn+2); //to do: move the particles towards viewer //to do: if(particles behind viewer) {put particles far away at a random position on a "spawn plane" or better yet in a "spawn cuboid"} assign(megabuf(pn),ix); assign(megabuf(pn+1,iy); assign(megabuf(pn+2,iz); pn=pn+3; //to do: 3D transformation //to do: color coding If you can't say something nice, say something surrealistic. |
![]() |
![]() |
![]() |
#213 |
Major Dude
Join Date: Apr 2004
Location: melbourne, australia
Posts: 655
|
3d, not yet...
I'll just leave it how it is for now, thanks for your help though. Only 8 presets to go utill i release my 2nd pack, stay tuned. |
![]() |
![]() |
![]() |
#214 |
Senior Member
Join Date: May 2003
Posts: 101
|
how about an ultimate aspect ratio correction? :P
code: This way your squares will look square, and circles circular, at all window sizes, even wierd ones. The really cool thing about this is that is matches the Trans/Movement's own aspect ratio fixing, so you can align complex movements and renderers easily :P |
![]() |
![]() |
![]() |
#215 |
Junior Member
Join Date: Jul 2004
Location: Finland
Posts: 47
|
You can make a starfield without any megabuf and just a single ssc:
[FRAME] r1=1/7;r2=4/9;r3=5/3; zo=gettime(0)*.1; [POINT] r1=r2*9333.2312311+r3*33222.93329; r1=r1-floor(r1); r2=r3*6233.73553+r1*9423.1323219; r2=r2-floor(r2); r3=r1*373.871324+r2*43322.4323441; r3=r3-floor(r3); z1=r3-zo;z1=.5/(z1-floor(z1)+.2); x=(r2*2-1)*z1; y=(r1*2-1)*z1; red=1-exp(-z1*z1); green=red; blue=red; The idea is that r1,r2,r3 is a pseudo random generator. (i used the same approach in my gax preset). |
![]() |
![]() |
![]() |
#216 |
Major Dude
Join Date: Oct 2002
Location: The United Kingdom of Great Britain and Northern Ireland
Posts: 1,374
|
The if statement in enabled=if(above(getspec(0,.5,0),a),1,0); is superfluous since above will return a 1 or 0 anyway. Personally I would use enabled=above(getspec(0,0,0),0);, but I'm at work so I cant test the effectiveness of that. If you wanted to blend it in and out:
playing=above(getspec(0,0,0),0); fader=fader+(playing-fader)*speed; alphaout=fader; enabled=above(fader,0); (The last line is just an optimisation) speed=a value between 0 and 1 representing how fast you want it to blend in and out. You might be able to replace 'fader' with alphaout and get rid of the penultimate line but I dont know if AVS would allow it, sometimes its fussy like that. Again, I'm at work so I cant test if this would work or not ![]() http://PAK-9.deviantart.com ...innit |
![]() |
![]() |
![]() |
#217 | |
Senior Member
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#218 |
Major Dude
Join Date: Oct 2002
Location: The United Kingdom of Great Britain and Northern Ireland
Posts: 1,374
|
What do you want, a medal?
![]() http://PAK-9.deviantart.com ...innit |
![]() |
![]() |
![]() |
#219 |
Junior Member
Join Date: Jul 2004
Location: Finland
Posts: 47
|
Dynamoves with bilinear filtering cause a slow fade out... This can be circumvented by this Colormodifier:
red=if(red,red+1/128,0); green=if(green,green+1/128,0); blue=if(blue,blue+1/128,0); |
![]() |
![]() |
![]() |
#220 |
Major Dude
Join Date: Feb 2004
Location: Germany
Posts: 580
|
shorter:
red=if(red,red+1/128,0); green=red; blue=red; even shorter: red=assign(green,assign(blue,if(red,red+1/128,0))); Color modifiers always have red==green==blue before the "level" section is executed, so if you want a monochrome color modifier (one that does the same to all colors), just modify one color and assign its value to the other colors. If you can't say something nice, say something surrealistic. |
![]() |
![]() |
![]() |
#221 |
Major Dude
Join Date: Apr 2004
Location: melbourne, australia
Posts: 655
|
Here's a cool little spiraly-like movement trans i wrote:
d=d*(0.7+(sin((r/$PI+($PI*(d*0.5)))*28)*0.08)); just thought someone might like it... |
![]() |
![]() |
![]() |
#222 |
Junior Member
Join Date: Aug 2004
Location: Bardo
Posts: 21
|
Sigmoid Motion - 3 Simple Examples
Attached is a zip file with 3 basic example avs using the sigmoid function. I thought these might be helpful for anyone who would like to get a basic sense of what the sigmoid function does.
A sigmoid is a line curved in two directions like an S. The sigmoid function can be used when you want a movement that starts out slow, speeds up, and then slows down again, e.g., like a plane taking off and landing. sigmoid(value,value2) = returns sigmoid function value of x='value' ('value2'=constraint) The larger value2 is, the faster your acceleration, top speed, and deceleration will be. |
![]() |
![]() |
![]() |
#223 |
Senior Member
Join Date: Sep 2004
Posts: 101
|
Hi,
Earlier in the thread Tuggummi was musing about the possibilities of animated bitmaps. This was like maybe 4 or 5 pages ago. I don't know for sure if anyone offerred a solution. I found an application called BMP2AVI while browsing a favorite haunt of mine. It's freeware(yay ![]() Don't even bother trying to check out the homepage, as it seems to have vanished. However the application can be downloaded via the direct download link(I only downloaded the gui version). Maybe with that handy little utility(looks handy, haven't used it yet personally), someone can do some nifty animation that might be a great deal more difficult to code, than to simply draw ![]() I'm sorry if it's a useless app. I mean, I have only just started with AVS(really should stop telling folks that), and so I don't know how well the AVI render works. *Fingers Crossed* I hope it does the trick, you have done some really amazing stuff without animated .bmp so I think with animation you might do still more amazing stuff(or it could turn to rubbish, but if that happened you'd just stop using non-AVS generated animations right?) |
![]() |
![]() |
![]() |
#224 |
Major Dude
Join Date: Apr 2004
Location: melbourne, australia
Posts: 655
|
cos and sin functions , as most people know, clamp variables between 1 and -1, but the thing is, cos/sin doesn't just flip when in reaches -1 or 1, it slows down, so when it reaches 1 or -1 it is actually at a dead stop and then goes so slow it goes backwards. sin/cos is fine for movement, but not for counters or any other types of timers, because the rate of change will increase as it gets closer to 0 and then start slowing down. Here's a nifty piece of code that keeps the rate of change constant and still clamps between 1 and -1:
Frame: a=a+if(equal(a3,0),0.02,if(equal(a3,1),-0.02,a2)); a2=if(above(a,1),assign(a3,1),if(below(a,-1),assign(a3,0),0)); Pixel; whatever=a1 there you go. a lot longer, but keeps a constant speed. |
![]() |
![]() |
![]() |
#225 |
Forum King
Join Date: Aug 2002
Location: The Netherlands
Posts: 4,114
|
A faster way:
Triangular wave for an SSC: code: for general use: code: Jesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever Last edited by Warrior of the Light; 19th March 2005 at 13:03. |
![]() |
![]() |
![]() |
#226 |
Major Dude
Join Date: Oct 2002
Location: The United Kingdom of Great Britain and Northern Ireland
Posts: 1,374
|
Faster? your method uses two asins a sin and 3 multiplications... thats slower.
http://PAK-9.deviantart.com ...innit |
![]() |
![]() |
![]() |
#227 |
Forum King
Join Date: Aug 2002
Location: The Netherlands
Posts: 4,114
|
slower, ok.. but no step sizes
Jesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever |
![]() |
![]() |
![]() |
#228 |
Major Dude
Join Date: Apr 2004
Location: melbourne, australia
Posts: 655
|
yeah, take that wotl! :P
|
![]() |
![]() |
![]() |
#229 |
Junior Member
Join Date: Mar 2005
Location: germany
Posts: 3
|
Hi everyone!
Wrote a 3d rotation engine powered by Linear Algebra: Init: rx=...; ry=...; rz=...; Per Frame: srx=sin(rx); sry=sin(ry); srz=sin(rz); crx=cos(rx); cry=cos(ry); crz=cos(rz); r11=cry*crz; r12=-cry*srz; r13=sry; r21=srx*sry*crz+crx*srz; r22=-srx*sry*srz+crx*crz; r23=-srx*cry; r31=-crx*sry*crz+srx*srz; r32=crx*sry*srz+srx*crz; r33=crx*cry; Per Point: x1=...; y1=...; z1=...; //3D object x2=r11*x1+r12*y1+r13*z1; y2=r21*x1+r22*y1+r23*z1; z2=r31*x1+r32*y1+r33*z1; The point is to compute the entries of a full rotation matrix in the per frame section (instead of per point rotation). Hope this works faster, haven't tried it yet. |
![]() |
![]() |
![]() |
#230 | |
Major Dude
Join Date: Jan 2003
Location: Estonia.
Posts: 851
|
Quote:
as in "regular" rotation code i mean regular as in what avsers are using. Phi = (1+sqrt(5))/2 |
|
![]() |
![]() |
![]() |
#231 |
Junior Member
Join Date: Mar 2005
Location: germany
Posts: 3
|
That means, I wrote that horrible matrix for nothing?!!
Well, at least it's 0.00000000001 fps faster ![]() |
![]() |
![]() |
![]() |
#232 | |
Forum King
|
Quote:
Is there anyway we could see some new tricks and tips? Gradients are on THE FIRST PAGE. The aspect ratio and rotation matrix have been mentioned literally dozens of times before in these forums (though maybe not on this thread). So that I'm not wasting a post... here is a tip: About 80% of the time everything else is more expensive than coded components in terms of framerate. If you have 10 effect lists, 3 waters and 2 bumps and your favorite renders are SVP loaders then no amount of code optimisation will speed that preset up. One of the most annoying mistakes I see in presets is the use of <insert large number here> components to achieve the effect of 1 or 2, almost always with the result of making the computer strain to draw what is already a really crappy preset. Nothing screams n00b and 'I don't learn from other peoples mistakes, or off my own back' like this particular error. I know I have made some really slow presets... but what do they do... render a blurry bumpy kaleidoscope with a dot fountain in front of it?. Don't think so. When you know basically how AVS works (i.e. that it follows a sequential execution path and that each component takes time to execute) its actually pretty difficult to make a preset that suffers from 'too many bumps', or whatever, by mistake. Try to use simple superscopes or simple movments or dms, although its tempting to use water, bump and color map all the time, please don't. All these effects do is give your preset the same tired look as hundreds of others that rely on these effects, and at the same time you are probably wasting framerate, since these sorts of effects can normally be replaced with something reasonably similar that runs a lot faster, using some clever movements, sscs or convo filters, or even just by coding it right in the first place. Unique tones and colour maps aren't for colouring in superscopes, the red, green and blue variables are! [ /rant ] edit: 10 points to Mr Nudge on the triangular wave... thats a good tip as many n00bs will go straight for the silly sin approach <cough>WotL<cough>. ![]() Last edited by jheriko; 28th March 2005 at 08:31. |
|
![]() |
![]() |
![]() |
#233 | |
Major Dude
Join Date: Oct 2002
Location: The United Kingdom of Great Britain and Northern Ireland
Posts: 1,374
|
Quote:
http://PAK-9.deviantart.com ...innit |
|
![]() |
![]() |
![]() |
#234 | |
Junior Member
Join Date: Mar 2005
Location: germany
Posts: 3
|
Quote:
![]() Besides, I've got a little question: I want to release my first AVS pack soon (worked on that 2 years), created also the Installer and so on, but I've read something in this thread like "first, put it here for discussion". Is that right? Sorry if I post it here, but I've already searched throughout the forum. |
|
![]() |
![]() |
![]() |
#235 |
Forum King
Join Date: Aug 2002
Location: The Netherlands
Posts: 4,114
|
It's great for betatesting/comments before final release
^ that post was offtopic next time create a new thread for different questions please. Jesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever |
![]() |
![]() |
![]() |
#236 |
Major Dude
Join Date: Jun 2004
Location: Australia,
Posts: 1,356
|
I don't know if this has been made in any kind of interest but how do i make a Solid object? I have been looking and looking, i've done some stuff with depth and want a filler instead of a grid...otherwise it looks crap
![]() i am not normal, no really. |
![]() |
![]() |
![]() |
#237 |
Forum King
Join Date: Aug 2002
Location: The Netherlands
Posts: 4,114
|
^post that in the troubleshooting forum.
you should know by now where to post. Keep this thread clean please and do not reply. And search the forums.. it's been asked a million of times http://forums.winamp.com/showthread....ight=solid+ssc Jesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever |
![]() |
![]() |
![]() |
#238 |
Major Dude
Join Date: Jun 2004
Location: Australia,
Posts: 1,356
|
(well it was for other newbies who decided to ask you can refer them to that now)
i am not normal, no really. |
![]() |
![]() |
![]() |
#239 |
Major Dude
Join Date: Feb 2004
Location: Germany
Posts: 580
|
PAK-9's programming guide has a part for solid scopes
If you can't say something nice, say something surrealistic. |
![]() |
![]() |
![]() |
#240 |
Junior Member
|
Here's what I use for 3D rotation:
x2=x1*cos(a1)+y1*sin(a1); y2=-x1*sin(a1)+y1*cos(a1); x3=x2*cos(a2)+z1*sin(a2); z2=-x2*sin(a2)+z1*cos(a2); y3=y2*cos(a3)+z2*sin(a3); z3=-y2*sin(a3)+z2*cos(a3); x1,y1,z1 are the coordinates of the object. x3,y3,z3 are the final coordinates of the rotated object x2,y2,z2 are just temporary a1,a2,a3 are the three angles of rotation (xoy, xoz, yoz) Is there any better way to do this? Basically I am using 3 diffrent planar rotations, I couldn't find any good formulas for a 3D rotation. Also, this is what I use for 3D transformation, and I think it's the best way, because besides zoom, it's got perspective correction. x=((x3*z0)/(z0-z3))/(z0-1); y=((y3*z0)/(z0-z3))/(z0-1); x3,y3,z3 are the object coordinates, z0 is the zoom. If anyone got an optimisation for this... I'd gladly use it. |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|