Skip to content
Forum Archive

Tips & Tricks 2 -- Beginners and Intermediate Only

100 posts

sidd#
hmm... well, if you understand the concepts of the scope, the next thing you need is an idea for a preset.
Once you have your idea, think about the ways to go about it in your head, and then wreak havok on your machine.

its a good idea to save text files or presets that have the basic structure for things that you dont need to recode every time you use them, eg. your 3d Engine for scopes, variouse DMs, a synched 3d DM and SSC, the RGB2HSL code 😉 and whatever else you use often.
WHCode RED#
OK

🧟 🧟 ... Duhh... Sorry but i only understood like the first couple posts... I took two superscopes and glued em together and added color and i think it looks cool but not ... ya know, good.
Clear every frame to see the superscopes only.

Oh yeah, I'm assuming everyone has the color map APE. 🙂
Pixelcraft#
Two words to WH Code Red: Do More. Using an effect list, more effects, and your code will make better presets.

A little off the subject, but where do you find color map files? I can only use the black and white one.
sidd#
there are no color map files that come with color map.

You have to create new maps using the color-slider bar and then save them if you wish.

The save/load option is just for construction purposes. So that you dont have to make the same map more than once if you need it more than once. You dont need to get the colormap files to view a preset that has used it.
Deamon#
Also to WH Code Red, pretty nice for a first scope. One tip, you could make 'em look a lot nicer when they move more, for example rotation. Figure out the coding for it yourself first, if that doesn't work, just reply here 🙂

EDIT:

Your shape changing scope will never work, cause you made the vars xr, and yr, and those don't exist 😛

code for on beat: (just an example)

n=10; rx1=getosc(0,0,0); ry1=getosc(0,0,0);
Deamon#
the easiest way (though not the best) is to close in the scopes a little to the center, and then add a dynamic movement:



for pixel:

d=d*0.75;
r=r+rt;

for per frame:

rt=rt+rts;

for on beat:

rts=getosc(0,0,0)*0.15
dirkdeftly#
Originally posted by Deamon
... you made the vars xr, and yr, and those don't exist
...They do if you want them to.... 🤪
sidd#
"Just wish for it... deep inside, you must burn for those things.. then, and only then, will they truely come to be."
-- Sean Connery on AVS variables
Deamon#
lol. Now that was good, now let's cut the crap again and start posting some tips & tricks again 🙂

Nice movement: (works nice on a single SSC line or just the render/simple)


d=d+sin(r*30)/50;
r=r+sin(d*5)/50;
changing the numbers will really change the effect, try it out a bit. 🙂
BigBob#
A very useful tip

Atero showed me a great tip for making ssc more Dynamic than using the rand() function. He told me to the 'getosc( , , )' function. That way the ssc moves to the beat, almost completely randomized, and that scope now has sychronized movement with another scope that contains the same 'getosc( , ,)'. It's a usefull tip, it made my Presets more interesting than just things rotating in the same patteren.

This is the preset that Atero showed me how to make it more Dynamic, you can probably guess wich one has the 'getosc( , , )'
Deamon#
I already knew that 🙂. It indeed is a good tip, for the randomness is taken from the osciloscope data, it indeed looks fairly random, and it's great to synchronise multiple scopes or DM's.
Deamon#
Thanks to everyone who helped me understand 3D scoping, I owe you guys 🙂
Deamon#
I got another question (oh boy, here we go again 😛). What exactly is Point to Point scoping, and how does it work?
Nic01#
It's when you do a scope point by point or group of points by group of points.

There are 3 ways to do it, but for the sake of the community, let's use the more practical (and most compatible) one.

FRAME : p=0
POINT : p=p+1

This numbers the points such that the first point has the value of 1, the second 2, and so on.
How to use it?
x=if(equal(p,n),blah,blah1)
n is the pointnumber, blah can be anything, blah1 can also be anything - most likely to be a nested IF though.
And yes, I did say groups of points - use above/below/bor/band with it.
This way, making a wireframe is much less of a pain in the ass... But of course, it doesn't end there.
Presets with point-to-point-ing (and group-by-group-ing) :

Atero : Hypercube/Supercube (And presets that use the hypercube...), Cubism (Artist-like)**, Brownie*
UnConeD : Whacko IV Intro*, Anemone, Circuit City, Neon Coaster*
Nic01 : Your Typical Oscilloscope**, Dot Warpin'**, Randomly Walking*, Intro Pack 6*
fsk : Magnarings*

*i-based instead of p. Read on...
**Group-by-group, not quite p, but yeah, it's p. Tell me if you want more explanation...

Now, if you want to save a variable, you can use the i technique. Probably faster (can someone try?), but a little harder.
For this one, you directly use the i-value for the assigning. This makes this technique more suitable for n-numbers that can divide easily into 1... No, wait, n-1.
Why? Point #1 is counted as 0 in i, not 1/n. So for a 5-point SSC, you can easily use if(equal(i,0/0.25/0.5/0.75/1),blah,blah) - increments of 1/4, not 1/5. If you use increments of 1/5, it won't work...

Happy point-to-point-ing...
dirkdeftly#
Umm...as far as I can tell all of the ones you marked with asterisks are not point-by-point. And a much more practical way to do point-by-point scoping, since (once again, according to UnConeD) if(a,b,c) calculates b and c regardless of a, is this:
x=p1x*equal(p,1)+p2x*equal(p,2)...
It's a much better alternative, if simply for ease of reading and fixing.
Deamon#
Ok, I'm going to give it a shot, now let's see how it works out 😉. So if I'm right, you can draw pretty complicated figures with only one scope? Sweet... 🙂
Deamon#
ok first question. The scopes first point always starts at coords (0,0,0) ?

[edit]
I think I see the solution: am I right when I say that N has to be equal to the number of P you use, or else he draws a line from (0,0,0) to the last point assigned by p?
[/edit]
dirkdeftly#
yes. if p doesn't equal any number that you've assigned it to then you're multiplying everything by 0.

and if you know how to use the edit button...why did you double post like that... 🤪
UnConeD#
Atero:
if(a,b,c) calculates b and c regardless of a, is this:
x=p1x*equal(p,1)+p2x*equal(p,2)...
Not really sure about this. A multiplication is a much bigger hit than an addition. The only thing that might even things out is that this way, you avoid jumps (depending on how equal() is implemented) which means no instruction-cache clear required. But I'm not really sure how it works on a P4/Athlon these days, they resemble a standard Pentium about as much as a Formula1 racer resembles the first car.
dirkdeftly#
well, ehm, since when is an if statement a smaller hit than a multiplication? and since when was the if(...,if(...,if(...))) structure using lots of additions?
dirkdeftly#edited
pwnt.

i've been meaning to ask, does avs automatically use bitshifting in the case of division/multiplication by powers of two?

and i know unconed's going to say "omfg omfg the code and the cpu are in seperate hemispheres of the grand universe and it really doesn't matter in the long run because you can't run in outer space" or something like that...
<edit> hmm...sounds like a smash mouth song, or something like that...

<edit2> Just remembered - I was working on my infamous comcrack with 32 megs of ram, and was testing to see if using Clear Every Frame was at all a speedup (since theoretically it would relenquish the memory used to save the image for other purposes). It turns out it's exactly the opposite. I turned on Clear Every Frame in Main and it dragged my preset by about 8 fps.
The moral of the story: Remember to check whether you need Clear Every Frame on when optimizing presets.
Deamon#
Sorry for reviving this topic again, though I found it better to post here than to start a new topic. I was wondering if 3D DM bases are much different than the scopes (at least the technical part). For I now have a very nice SSC 3D base thanks to you guys, and now I was thinking about making a DM 3D base as well. I don't come much further than a surface, which I learned by plucking the most simple code for it written by Tuggummi:


d=d/(y*2.2+3)
Can anyone please explain me some basics? Thanks in advance.
dirkdeftly#
Umm...err...uhh...WELL UR COMPOOTER MUST BE l4m3Z0r!!11


...

anyway, imo the threads should be merged.../me pokes rova
Akuso#
wow. great topic
OK down to business. I still don't entirely understand what exactly the variable "i" is in SCCs. I know it has something to do with lines but my knowledge stops there. this is probably some Trig thing Im gonna have to learn when school starts right? well... its making my head explode bye bye