As i have made avs for 2 years now, i really don't know much about how to do things differently.

Confused?
Read more.

As Advanced Visualization Studio is a highly customizable visualization plugin/component there are usually many ways to do simple things. And when it comes to coding your own superscopes and dynamic movements there are several different ways to make things, like in the dynamic movement using rectangular coordinates rather than polar coordinates to create the exactly same effect.

Sometimes if you do things differently you may gain some priviledges, like better frame rates or the benefits of using a different coordinate system. Also when you use the built-in functions differently you may get faster&better results than doing the same thing with different effects.

EXAMPLE
Creating a rotoblitter effect in movement with both polar- & rectangular coordinates.

Polar
r=r+0.1

BENEFITS:
Simple, easy and a fast way.

Rectangular
x=x+y*0.1 ;
y=y-x*0.1

BENEFITS:
You can shift it around the screen which can't be done in polar coordinates.

These helpful speed up tricks and better quality tips are scattered all over the forum, so what im asking here is to collect all those helpful notes into a single forum post, this post.

So feel free to post your ideas and comments how something that is frequently used can be done faster&better, this is all for the common good and will surely help us all as we are always searching a alternative way to make presets.

And please remember that, althought the most tips consider coding there is still many different ways to use the built-in effects differently and still get the same effect. If you have discovered a clever way of using example:Trans / Water , you can post it here so it will help other avs artists as well.

Hope you all understanded the point of this post and hope that you all contribute as much as you can

Im not sure how the conical gradient is done, but i guess it's just using the r=0 movement and then using a color code in a superscope like col=sin(i*pi). I don't have avs right now so i can't check did i get those other two right, so ill edit this post tomorrow (at 8:XXam gmt +2).

Well yes you can use just one superscope, but to fill the entire screen with just one superscope requires a big numpoint number and the bigger the resolution the more numpoints and more slower it is. With the scope and the movement technique the numpoint number always stays the same and still the whole screen gets filled with the gradient.

There for the movement and ssc technique is a lot faster than using one BIG ssc.

But of course, that will be goddamn slow. You can always reduce the amount of points and manipulate the size to conform with the screen.
In colorcoding, use x and y, i won't work well. Additional tips are in the original page.

Examples : El-Vis - I Cannot Dance, Carry Me Home, Lucy In The Sky With Diamonds, and some others.

It's quite slow, but is the most versatile, providing you use the right effects. You can also use convolution filter to make the pixels bigger and make a pixel-doubled effect.

This time i actually made them, so they now work right. If you have trouble understanding code, or are just lazy download these example presets i made. Includes all the 4 gradients and a "real" preset i made in about 10 minutes that uses a "Dynamic-Gradient-Utone"

3D transformation is:
Xp=Xc/Zc;
Yp=Yc/Zc;
where Xc (x-coordinate) and Yc are any numbers, positive or negative, and Zc is positive.
For a 3D object centered at the origin (0,0,0), use this formula:
Xp=Xc/(Zc+sqrt(mD));
Yp=Yc/(Zc+sqrt(mD));
where mD (maximum distance) is the largest distance from the origin to a point on the object.

Rotation around any point, line, plane, solid, etc:
Ar=Ac*sin(theta)+Bc*cos(theta);
Br=Ac*cos(theta)-Bc*sin(theta);
where A and B are the axes defining the plane perpendicular to the axial point/line/plane/solid etc. To find the perpendicular plane, simply use the 2 axes you do not use to define the axial object.

"guilt is the cause of more disauders
than history's most obscene marorders" --E. E. Cummings

Quote:
Rotation around any point, line, plane, solid, etc:
Ar=Ac*sin(theta)+Bc*cos(theta);
Br=Ac*cos(theta)-Bc*sin(theta);
where A and B are the axes defining the plane perpendicular to the
axial point/line/plane/solid etc. To find the perpendicular plane,
simply use the 2 axes you do not use to define the axial object.

Another way to do this(slower way) is:
d=sqrt(Ac*Ac+Bc*Bc);r=atan2(Ac,Bc)+theta;
Ar=sin(r)*d;Br=cos(r)*d;

I have a kind of a problem, I have used a static background/texture for a movement with bunch of effects. I have made it by putting all the effects inside a effectlist with ignore/replace and on beat active 1 frame. Then i have used a custom bpm set to 30bpm and put both of them inside another effect list with ignore/replace. It now takes about 1-3 seconds to start, but the fps is much higher since it doesn't have to render the texture all the time. This solution works fine, but what im asking is: Is there a even better way doing this? If you use avs effects to create a static background is there a way to only "render" it once? Or how i activate it right at the begin of a song?

Tuggummi: I think there isnt any better way. I had the same problem some time ago and only thing I learned is how limited effect custom bmp is. Atero posted something at the whishlist about a user defined custom bmp so we can only wait for the next avs.

Here is a wonderful guide to AVS written by El-vis that was posted a while ago. It gives code to create a superscope in 3D, rotate in along and move it along the x, y, and z axis (what's the spelling for the plural of axis?)

* This should be the maximum distance from the center to a point on your scope, multiplied by 2. For a unit sphere, use the radius of the sphere multiplied by 2.

** x1, y1, and z1 are the coordinates for your shape, and should be put here.

rx, ry, and rz are the angles of rotation around the x, y, and z axes, respectively. These angles are in radians (one radian = 180/pi degrees)
A good place to define these values is in the beat section of the scope, e.g.:
rx=rand(100)/1000-0.05; ry=rand(100)/1000-0.05; rz=rand(100)/1000-0.05;

"guilt is the cause of more disauders
than history's most obscene marorders" --E. E. Cummings

Don't kill me for this, but you're just pathetic. You're stressing your head dozens of priceless minutes. And for what ?! For saving about 0.0001 fps with using a different method !?
Don't get me wrong. I'm sure that these tips comes in handy for n00bs and if there's alot to be optimized, but these tips.... It's like thinking how could you put the wires to your electric toothbrush from car, so that you could recharge the battery with it, so it wouldn't see in electric bill...

1) Are you talking to everyone who has replied to this forum or to one person and if, who?

2) The faster the presets run the more enjoyable they are, besides it's more than just 0.<insert ridiculous large ammount of zeros>1 frames, example the gradients work a lot faster when you use different methods. And the static texture for a 3D movement or likes saves up huge ammount of fps if it is only rendered once per N beats. I made a preset with the static texture and the framerate difference between render-per-N-beat and render-all-the-time is incredibly huge, on my 266mhz pentium it was about 8 fps.

3) Everything & Anything can & should be optimized. Or do you draw a static single colored ssc line with 800 numpoints when just 2 will do?

4) Last, but not least, this thread was about people sharing their ways of doing things. Someone have might used some method for months/years never knowing that it could be done better&faster.

If you don't like people giving you helpful advice, buzz off. But by the looks, you are the one who should seriously learn how to do things faster.

This will create 1 spiral scope and place it at u1/5*2-1 locations, u is a counter and equals the value of a point, u1 equals:
0 for u being 5,10,15,20,...
1 for u being 6,11,16,21,...
2 for u being 7,12,...
3 for u being 8,13,...
4 for u being 9,14,...

For a more complex use of this see the attachment. The preset calculates the whole 3D rotation thing, music responce and scope shape only once for all of the cn(6) columns.

Sorry for the shity explenation but i find it hard to express myself in english.

My (and most everyone who doesn't depend on El-Vis's engine) 3D code is several FPS faster than El-Vis's, and it's a whole lot more user friendly. Also, for those who didn't know: using zs=sqrt(maxdistance) projects the object so it is always inside the window. To find the maximum distance from the center of any object to a point on the object, use this method: For any variables (e.g. i and v), assume they are as high as they can go (e.g. i=1, v=1). Then simplify all your calculations. For example:
(tpi=acos(-1)*2=2*pi)

No tug, you got me wrong. I'm not saying that every tip in this thread are total bullshit, but what I am saying is that this thread shouldn't be filled with codes / tips (and posts like this ) that doesn't affect to fps rate "efficiently" . I tried some of these and I really couldn't see any fps difference between code A and code B. If some method saves alot fps compared to the others, yeah it's good to be mentioned, but if it saves only like 0.1 fps you think that this thread should be filled with codes/tips like these ?? :P

And what comes to my presets. Usually the use of complex colors makes the preset slow. And colors aren't just that easy to optimize. Of course I always try to erase things you don't necessarily need & try to make it as fast as possible, but sometimes you just can't make it any faster without radical changes. Sure I can replace all those tricky colors with a Utone or two for some real boost up, but that's just not me....

Okay, just a tip...as long as we're on this page of
the thread, try just typing in your carriage returns
like this...

Anyway, just one thing to remember as AVSers: Any god
damned thing is possible in AVS once you put your
mind to it. Trust me, if I didn't keep telling
myself this, I wouldn't be doing any of what I've
been doing (i.e. 4D, life algorithms, etc.) I'd bet
money that Jheriko's been having to reasure himself
of this a lot for some of his scopes lately My
point is, you shouldn't just give up because you think
it can't be done. That's not a good reason. Give up
because you're lazy, or because you need to clip your
toenails, or for something important like that.

"guilt is the cause of more disauders
than history's most obscene marorders" --E. E. Cummings

Originally posted by Atero I'd bet money that Jheriko's been having
to reasure himself of this a lot for some
of his scopes lately

That is true.

I still have ideas that I'm forcing myself
into doing right now, the coolest AVS i've
made haven't been released yet because they
don't work properly, but like atero said,
anything is possible so I never give up on
them, I just keep working on them in the
background. Like that sonic battlefield from
pack VI, I'm still working on that on and off.

The point is never to give up, force yourself
through to the end. Thats more general life
advice though.

Here is something more useful though; I'm certain
that a lot of you out there know exactly what you
want to do in AVS but have no idea about what
sort of maths you need to do it. I'm also certain
that there are a lot of mathematical methods
that would be useful for AVS if we knew about them.
Personally I think that maths is pretty important
for AVS (the technical side at least) so if you
have any maths questions my tip would be to checkthis cool page that I found, or alternatively send
me some mail. I'm not going to pretend to know
everything about maths but I have a lot of knowledge
and a lot of textbooks too.

I was wanting to ask, (I've spent the last week going throught the forums) If some one could give me a running example purley for reference how to create a plane in 3D SSC and effect it with this function

z=x*e^(-x^2-y^2)

I use a 3d ploting program that I'm used to and enter this

plot3d(x*exp(-x^2-y^2), x=-2..2 y=-2..2)

works fine .. You should see the triped stuff I'm getting "TRYING to emulate this to AVS.. I've totaly forgot how to rearange the "e" with log and I got paper and shit all over my desk and room. ahhhhhhhhh where's my text books... I'm also giving up smoking 3 days now.

z being the third axis of course, e is the exponent and ^ is to the power. Because I'm used to this program alot I tend to have blunders converting to AVS. Gimme a couple of weeks tho no probs but hey I'm always looking to learn quicker from some experienced bruzza'z.

If anyone feeling Crwayzie mabey give z=cos(x)*sin(y) a try and show us. I feel that if I see an example of something I've done I might be able to bridge the gap faster.

P.s. I's it just me or does anyone here alos go to sleep and end up dreaming about Freakin' equation's accompanied by some major tripped lighting visual dreams.... waaaaaaah. sheeesh If only I could remember what code I was dreaming I might be able to pull something awsome out of my subconcious ... I guess the best thing to say here is ...