Archive: Synching 2 SSC's


26th January 2004 18:03 UTC

Synching 2 SSC's
Okay I got a problem with synchronizing these two superscopes. I'm trying to 3D illusion them so that they more or less follow each other like a sandwich.

I can get them to do exactly what the other one does, but I can't get them to remain parallel--they end up clipping each other. I'm pretty sure this has something to do with the depth of the illusion, but I don't know the practical fix.

I'm sure that I haven't written good scripts for this (this is the first 3D illusion I made, I kinda found it out by mistake) so if you want to point out the slow stuff and the solution I'm missing I'd really appreciate it.

-----[edit]-----
Actually, I can get them to remain parallel, but I can't get the points equidistant. That's what I really want to do.


26th January 2004 19:39 UTC

Why not just do real 3D?


26th January 2004 20:20 UTC

If you're trying to be a jackass, I don't get it. If you're offering help I don't get it. I don't understand this stuff very well at all. I was hoping someone could be of more help. Maybe you could look at my file first?


26th January 2004 22:08 UTC

What he is saying is using the conversion formulas so it is in "real" 3D, with correct depth and rotation. It makes it a *lot* easier to do and debug the code.


26th January 2004 23:51 UTC

Why not just do real 3D?
He has a point, consider that once you get to more complex shapes using an illusion will get harder and harder until it's almost impossible. Plus, 3D code is a lot easier to understand.

27th January 2004 00:44 UTC

Go here: http://visbot.net/index.php?title=DOCUMENTS
and read everything, especialy PiR's great tutorial and el-vis 2D>3D formulas ;)


27th January 2004 01:29 UTC

Umm...El-vis's 2D>3D conversions are not as fast as other ones. It requires a lot more conversions because to works with degrees, not radians. See the tips and tricks thread for another one.


27th January 2004 02:44 UTC

Originally posted by m²k
...using the conversion formulas so it is in "real" 3D, with correct depth and rotation...
What are conversion formulas?

Thanks, fragmer and pow(m,2)k.

27th January 2004 05:23 UTC

Wow, 'real' 3D is hella easier. I've been using El-Vis' guide. I still don't get all the math. But I see what you mean about how it's more easier to manipulate. That was always my problem when trying to do 3D SSC's.

Are the conversion formulas those lines that basically turn x,y and z into x and y?

I still have yet to check out the faster one in the tips & tricks.


27th January 2004 06:03 UTC

hehe.... PLZ dont start useing el-vis 3D
And I do reccomend you to better learn how the 'real 3d' works, its not that hard anywyas, just do some googling for "3D math" or "3d math" + rotation or something like this

check out 3D base i use, it doesnt work using angles, but uses the position of camera in 3d space
oh yea, object code might be hard, but just ignore it :)


27th January 2004 06:34 UTC

I fully intend to, Jaak. It's just I'm very new to all this stuff if you can't tell. Hell, figuring out how to synch things using getosc(n,n,n) was a big breakthrough to me. :eek:

Using El-Vis' 3D helped me see how my scripts suck for plugging in values. Although, I was working on it. The 3D math I'm sure isn't a problem to learn.

Your reply is probably the most helpful so far to tell you the truth. No offense to everyone else, but I want to learn what it means, not just how to fill in the boxes for what seem like arbitrary reasons on the surface to the uninitiated. And El-Vis explanation was pretty dry.

But, I can't look at the file you've uploaded. Is it compressed in some format that I don't know or something?

Thanks, guys.

Sometimes you just gotta beat a rock for a couple days to get some blood out of it. ;)


27th January 2004 09:43 UTC

Yeah, i wanted too to learn what the conversion formulas actually do, but i got tired of trying to understand it. To me it's enough to know that there isn't much of another way to do it ;) (so you can't actually make your "own" 3D rotation formula)

[edit]
btw. why didn't any of these experts mention global variables? With them you can easily sync scopes.

example to sync two lines moving up & down.

scope1

per frame

reg00=reg00+tb ;
st=sin(reg00)*0.25 ;

per beat
tb=(rand(101)-50)*0.002

per pixel

x=i*2-1 ;
y=v*0.25+st+0.5



scope2

per frame

st=sin(reg00)*0.25 ;

per pixel

x=i*2-1 ;
y=v*0.25+st-0.5



As you can see, once you define a global variable in one component that is codable (let be then bump, dynamic movement, superscope, movement, dynamic shift or dynamic distance modifier) you can use it on other components as well and it will have the same value in the them.
[/edit]


27th January 2004 15:50 UTC


x1=blablabla;
y1=blablabla;
z1=blablabla;

x=x1/(z1+1);
y=y1/(z1+1);


One z axis. That'll be 5 dollars please. Anything else?



x1=blablabla;
y1=blablabla;
z1=blablabla;

x2=x1*sin(zt)-y1*cos(zt);
y2=x1*cos(zt)+y1*sin(zt);
z2=x2*cos(yt)+z1*sin(yt);
x3=x2*sin(yt)-z1*cos(yt);
y3=y2*sin(xt)-z2*cos(xt);
z3=y2*cos(xt)+z2 *sin(xt);

x=x3/(z3+2);
y=y3/(z3+2);


3 Axes with rotation defined in xt (rotation around x axis), yt (rotation around y axis), and zt (rotation around z axis).

Would you like a bag around it? :p (j/k)

28th January 2004 00:58 UTC

No respect. I present an idea and suddenly I'm a jackass. :rolleyes:


28th January 2004 19:28 UTC

Quote:


I know this isn't the correct thread for this, but I have some doubts as to what El-vis knew about optimization.


x=x4/(1+z4/dst);y=y4/(1+z4/dst)


The part I don't get is the division by the variable named "dst". It really isn't necessary, and it shows when you use scopes with a high N value.

hehe.... PLZ dont start useing el-vis 3D

29th January 2004 15:50 UTC

augh.

i seriously recommend you DON'T go looking at el's "tutorial" because it's slow and leads to a lot of misconceptions about rotation/translation. eventually I'll get the second portion of my avs primer out, which will deal with this sort of thing properly. but for now i suggest you talk to your math teacher about rotation matrices....


24th February 2004 23:09 UTC

Oooh...
Lots to read here and ponder.

And as for U, UIUC85, I guess you aren't a jackass, I was just being insolent.

Atero, I don't have a math teacher. I'm a philosophy major (I like unemployment). Hell, I can barely do long division on a good day. I just like math in the same way I like physics.

Thanks again for everyone's input. I'll study it all when I get a break from the workload this semester. Incidentally, I have to do a project now for Intro Computer Science (one of my few sciences) which *is* just plugging someone elses values into Excel. Jeebus, save me.


24th February 2004 23:39 UTC

http://www.gamedev.net/reference/art...article796.asp
http://fuzzyphoton.***********/rtref.htm
http://easyweb.easynet.co.uk/~mrmeanie/algos.htm
http://www.planetquake.com/quark/inf...h.vectors.html
http://www.catcode.com/trig/trig11.html

That should give you a little more to ponder. www.gamedev.com is a great place for info. Enjoy