5th April 2002, 05:14  #1 
Major Dude

Few questions about AVS... (advanced stuffs)
I kinda still have a lot to learn 'bout AVS...
Here are the load of questions How do you make a whole screengrid using only 1 SSC? Another SSC question : How can I make a line SSC, in which somewhere along the SSC, there's a line perpendicular to the first line, but still using the same SSC? (I gonna use this to make a Tetris preset I've planned to make... making a Tetris shapes lens DMs are easy, but using SSC... I can't =( )(I'll also edit line width, so just need the skeleton) I know it won't help me, but what is the gridsize of Trans/Movement? How to make a DM Lens that is curved nicely from edge to middle? To explain : Like the lens in UnConeD's Second Reality, not like in : d=if(band(band(above(x,.5),below(x,.5)),band(above(y,.5),below(y,.5))),d/2,d); Answers to the question would be very appreciated =) [soon to leave, sirs] 
5th April 2002, 09:01  #2 
Major Dude
Join Date: Feb 2002
Location: home
Posts: 1,318

I don't think movement has a grid size, I believe it does all the pixels in the render.
As to the rest, no idea. 
5th April 2002, 15:52  #3  
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

One at a time :)
Quote:
Unfortunately, it's best to use w+1 and h+1 for width and height. If you don't, you'll get nasty roundoff errors too. So, in onframe: PHP Code:
In per point: PHP Code:
Then, at the end, we increase xp by one. When it equals the width, we set it back to zero. yp is increased only when xp is zero. Note that this doesn't happen the first time around (because xp will equal 1 after the first pixel). So you have a pretty grid that fills the full screen... but it's slow as hell. Speedup tips include skipping every uneven pixel and using lines to get a 'pixeldoubled' grid. 

5th April 2002, 17:47  #4 
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

If you want to make one superscope which consists of multiple disconnected line segments, you'll need to use a rendermode like Additive or Maximum, and simply set the color to black when you don't want a line to be drawn. A good example is my Plankton preset... all the swimming particles are only one SSC, and you can see this by turning off the blendmode change.

6th April 2002, 22:28  #5 
Major Dude

Umm, I think I need to rephrase my Tetris SSC question a bit, this time in form of a different question...
How do you make a "T" using one SSC? An "l" With horizontally laid "T" on top of it using one SSC? (In other words, the shpae itself... ) [soon to leave, sirs] 
6th April 2002, 23:23  #6 
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

Probably something like this:
code: Use if's in a 4 point superscope to set the coordinates accordingly each time. 
7th April 2002, 18:31  #7 
Major Dude

Hmm, but what Variable?
I tried using If(equal(n,#) , but doesn't work... Hmm, possibly I'd have to use 23 synchronized SSCs... So, my (probably ) last question : What is the min/max value of Getosc/Getspec command? [soon to leave, sirs] 
8th April 2002, 03:01  #8 
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

i'd do something like:
"u=i*n" > that way, u contains a number 0, 1, 2, 3... up to 'n'. Then use that in if statements. 
10th April 2002, 02:34  #9 
Major Dude

Tried that, didn't work...
BUT... Try this : (any variable)=n*ii That works! (All that problem, and one simple formula...) I use p for the variable  stands for "point"... And of course, only the coordinates of the point is the only thing needed to be done, using "i" won't work (remember, when SSC is set on lines, it will automatically draw line from n#1 to n#2 to n#3... but not last n to first n) The Tetris shapes are rather easy to make once the formula above come into use... Hmm, now if only I can make a smooth lens, not a lens with the edge a bit too obvious... [soon to leave, sirs] 
10th April 2002, 03:48  #10 
Whacked Moderator
Join Date: Jun 2001
Posts: 2,104

For a good lens... first of all, you need a good view on mathematical functions.
Try the following superscope: u=i*21; x=u;y=(u*u); This will draw a parabola... because the relationship between any variable 'x' and its square 'x*x' is shaped like that. Similary, a linear relationship f(x) = a*x (where a is any real number) is a straight line passing through the origin. Try visualising math functions this way. Fill this in in the superscope: y=(sin(u)); Now try y=(sin(u*2)); This has the effect that the graph is 'squished' horizontally, so you see more of it. What am I getting at? Well... the distortion you want is probably that you're changing a 'd' based on a specific formula. I also suppose that you use something like d=if(below(d, 0.5), ..., ...) to keep the lens small. So what you want now is a function that bulges/enlarges when 'd' is inside your interval, and is nicely linear (i.e. doesn't change d) outside. You also need to make sure that, when d is on the edge of the lens, there is no sudden jump in value. Here's a good example: y=(if(below(abs(u),.5),abs(u)*u*2,u)); If you remove/change the *2, you'll see that the graph is no longer continuous. I also made sure that the function behaves appropriately for negative values, but for 'd' values, which are positiveonly, that's not even necessary. Of course, I'm not sure if this will look like a convincing lens, but you should be able to figure out an appropriate formula yourself. For better plotting of mathematical functions, you need a good math program... but for a quick look, a superscope will do . 

Thread Tools  Search this Thread 
Display Modes  

