PDA

View Full Version : Check this out!

anubis2003
2nd January 2003, 02:11
Here's a 120-polyhedron for your enjoyment. It's not music responsive yet, but when I have the time to alter 120 superscopes to make it so I will. It's pretty sweet - the largest polyhedron in avs to date, i believe. Thank god for c++ or this would have taken a month to write.

dirkdeftly
2nd January 2003, 06:09
i'm pretty sure it would've been a whole lot quicker to write that out using the hexagons formed by the faces instead of doing it face-by-face. it's a wireframe, so it doesn't matter how you draw the edges - just that you do :)
another thing: since it's rotating in a sphere, you shouldn't make z3=1/(z3+3). instead find the diameter of that set of coordinates, and make z3=1/(z3+sqrt([DIAMETER]))

anubis2003
2nd January 2003, 19:58
That would make it easier, except the "hexagons" aren't flat and the code was easier to create this way instead of using 20 6 sided polyhedrons (I don't know what they are called). To help you see a better view of the 120-polyhedron, I have attached a picture of it.

dirkdeftly
2nd January 2003, 23:43
It'd be pretty easy to fix the staggering using z=sin(r) (assuming the z-axis is relatively perpendicular to the hexagon). And I never said the hexagons were flat :)

6-sided polyhedron = cube or hexahedron
6-sided polygon = hexagon

anubis2003
3rd January 2003, 00:04
Yes, but by definition polygons are, and since a hexagon is a polygon all hexagons are flat.

Nic01
3rd January 2003, 00:52
99 KB... We got ourselves the 2nd biggest preset.

Nice job there - Just add a BG and some effects here and there.

dirkdeftly
3rd January 2003, 00:53
No. A polygon is a closed 2-dimensional figure with a finite number of linear faces. 2-dimensional does not mean they're flat. An object can deviate into the third dimension and still be (technically) two dimensional.

anubis2003
3rd January 2003, 01:34
Nic01, what is the biggest?
Atero, your probably right, but it would still be difficult to convert them to hexagons but feel free to if you want to.
Btw, I have now made a beat-responsive version of it and will put it up after a bit more optimizing - I have some variables defined in them that I don't even use

Nic01
3rd January 2003, 02:39
http://www.deviantart.com/deviation/907026 - At 136 Kb, it's a monster... But then that's because each star is a scope.

dirkdeftly
3rd January 2003, 03:38
Deviant: `yathoso
...
beat 315.951 bytes :D

Jaheckelsafar
3rd January 2003, 06:25
Unconed's renderer was dawn large too. Forget how big it was though.

Zevensoft
3rd January 2003, 08:21
Interesting... Now intersect the polygons, tesselate, and make a preset which is flat-shaded (and diffuse lit).

Raz
3rd January 2003, 13:33
Thats pretty god damned kickass but i was just wondering why this dosent slow down my system when smaller presets do? (i have a crap system)

Jaheckelsafar
3rd January 2003, 16:20
There are no per pixel effects to calculate. It's just drawing lines.

anubis2003
3rd January 2003, 16:46
Yeah, like Jaheckelsafar said, superscopes are extremely fast because they don't have to do nearly as many calculations as DMs and other objects do. Even for this monstrous amount of superscopes the per pixel part of the superscope is calculated a total of only 480 times as compared to a movement at 800x600 resolution calculating for 480,000 pixels.

anubis2003
3rd January 2003, 20:02
Here's a beat responsive version. The polyhedron also takes up more of the window so it is a bit easier to see. I never did get around to deleting the uneeded variables(2pi,phi,phi2,and phi3 if phi3 is replaced with 4.236067977) because it would require making a total of 480 changes/deletions. Ugh.

Raz
3rd January 2003, 20:50
:up: Holy god damned hell thats amazing. I wouldnt know where to begin with that thing, i dont even know how to make different superscopes work together let alone 120 into that, whatever its called :confused:
all ya need now is some effects and you have one hell of a preset :)

anubis2003
3rd January 2003, 20:59
Raz, to make multiple superscopes work together there are several methods that you can use - 3 that I know of.
1. Use a counter (i.e. t)
2. Use the functions getosc() or getspec() that will return the same numbers for all superscopes each frame if the parameters are the same.
3. Create a semi-random number generator that will spit out the same numbers for all scopes- this is slightly more difficult but is the only way to make it "random".

Raz
3rd January 2003, 21:16
ok thanks, ill try and have a go but ill just end up making a mess lol. But atleast ill learn something in the process

dirkdeftly
3rd January 2003, 21:48
i still think this is a whole lot bigger than it needs to be. i don't think it'd be that hard to find the coordinates of the hexagons needed to calculate the whole object, then re-do the superscopes.

also, try making it move around the screen, and smooth out your on-beat transitions. but most importantly, don't use straight up getosc() for random seeding. use something like (((getosc(...)*n)%n)/n-0.5)*0.05 (n is an arbitrary number) - this will give you random numbers from 0.05 to -0.05.

anubis2003
3rd January 2003, 21:58
Allright Atero, I'll work on it but it may take me a while. Especially to convert them to "hexagons" (I'm still not 100% convinced that they are hexagons, but I'm probably wrong). I have been wanting to move the polyhedron around and have it change speed/direction on beat, but it takes forever to alter it. Thanx for the suggestions.

anubis2003
3rd January 2003, 23:52
I've changed the on-beat getosc and it does flow somewhat better although I will probably fix it even more. I also added movement in the x-y plane although it's not the greatest movement (if only avs had global variables).I've experimented with z-movement but I cant find anything to my liking. Any suggestions for movements would be considered. The file size is now up to 111,059 bytes.

Raz
4th January 2003, 00:01
wow this just gets better and better, i know i must look stupid right now but is the movement in the x-y plane beat responsive and if not is that possible with multiple superscopes?

anubis2003
4th January 2003, 00:13
Yes it is, but since it is based on the sine of timers it isn't very beat responsive and actually appears to be repetitive. So to answer your question, the movement can be beat responsive using the same ways I told you earlier. Really you can use just about anything except rand(),and x/y/z variables to maintain synchronized movements.

Raz
4th January 2003, 00:21
Ok thx i think i get the vague idea now, just a whole load of messing about and taking other peoples ss's apart before i can understand it properly tho.

dirkdeftly
4th January 2003, 08:09
i've been meaning to say this for a while, but i've forgot: don't use my variables just because they're there. it's much easier to differentiate between two different peoples' coding if their variable names are different.

also, i find that an extremely good way to make a psuedo-random 3-d translation of an object by using the rotation angles:
z3=...+cx*sz; y3=...+sx*cy; x3=...+cz*sy;
(or something arbitrary like that)