Winamp & Shoutcast Forums > AVS Tips & Tricks 2 -- Beginners and Intermediate Only

 10th June 2003, 00:40 #81 dirkdeftly Forum King     Join Date: Jun 2001 Location: Cydonia, Mars Posts: 2,651 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... "guilt is the cause of more disauders than history's most obscene marorders" --E. E. Cummings
10th June 2003, 01:28   #82
UnConeD
Whacked Moderator

Join Date: Jun 2001
Posts: 2,104
Atero:
Quote:
 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.

 10th June 2003, 05:12 #83 dirkdeftly Forum King     Join Date: Jun 2001 Location: Cydonia, Mars Posts: 2,651 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? "guilt is the cause of more disauders than history's most obscene marorders" --E. E. Cummings
 10th June 2003, 08:23 #84 Deamon Major Dude     Join Date: Nov 2002 Location: Arnhem, the Netherlands Posts: 927 Till now Atero's method works just fine .:HyperNation @ winamp:. .:DeviantArt:. Thermal is now available for download at DeviantArt.
 10th June 2003, 21:45 #85 dirkdeftly Forum King     Join Date: Jun 2001 Location: Cydonia, Mars Posts: 2,651 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... hmm...sounds like a smash mouth song, or something like that... 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. "guilt is the cause of more disauders than history's most obscene marorders" --E. E. Cummings Last edited by dirkdeftly; 10th June 2003 at 22:05.
 29th June 2003, 10:23 #86 Deamon Major Dude     Join Date: Nov 2002 Location: Arnhem, the Netherlands Posts: 927 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: ```code: d=d/(y*2.2+3) ``` Can anyone please explain me some basics? Thanks in advance. .:HyperNation @ winamp:. .:DeviantArt:. Thermal is now available for download at DeviantArt.
 29th June 2003, 10:43 #87 dirkdeftly Forum King     Join Date: Jun 2001 Location: Cydonia, Mars Posts: 2,651 search. the. (friggin.) forums. and it's a sticky, how are you reviving it? "guilt is the cause of more disauders than history's most obscene marorders" --E. E. Cummings
 29th June 2003, 10:49 #88 Deamon Major Dude     Join Date: Nov 2002 Location: Arnhem, the Netherlands Posts: 927 This is a sticky? Lol, not over here. .:HyperNation @ winamp:. .:DeviantArt:. Thermal is now available for download at DeviantArt.
 29th June 2003, 20:23 #89 dirkdeftly Forum King     Join Date: Jun 2001 Location: Cydonia, Mars Posts: 2,651 Umm...err...uhh...WELL UR COMPOOTER MUST BE l4m3Z0r!!11 ... anyway, imo the threads should be merged.../me pokes rova "guilt is the cause of more disauders than history's most obscene marorders" --E. E. Cummings
 30th June 2003, 03:38 #90 Akuso Member   Join Date: Jun 2003 Location: North Carolina Posts: 83 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
 30th June 2003, 03:45 #91 Jaheckelsafar Major Dude   Join Date: Feb 2002 Location: home Posts: 1,318 It isn't sticky Atero. It probably should be, and the other tips and tricks is, but this one is not. As to the meaning of i, look in the website thread. Annibus wrote a nice varible tutorial and posted it there. Tgere's also atreo's primer, and countless other stuff listed in the sticky FAQ. Stoke me a clipper. I'll be back for Christmas. - Arnold Rimmer Red Dwarf
 2nd July 2003, 21:43 #92 Deamon Major Dude     Join Date: Nov 2002 Location: Arnhem, the Netherlands Posts: 927 In short: i is a constant number for every pixel from 0 to 1. For everyone n there is an i. For example:when you set n=5 in init, i will be 0 0.25 0.5 0.75 and 1. This way, you won't have to type coords for every point but you can make one formula for the shape you want. Example: a circle requires a lot of point to really look like a circle and not some shape with a shitload of corners which has the look of a circle. You wouldn't want to type all those damn coords for it (undoable job anyways), so you use i. You set n to 500, which means there are 500 point calculated on your nice circle: x=sin(i*tpi); y=cos(i*tpi); tpi is two times pi ( tpi=acos(-1)*2 ). the sin and cos together with tpi calculate the points on the circle. My english isn't good enough to explain it as good as in my native language (dutch) to you, but I hope it helped. At least to make you see it aint nothing difficult to use, and doesn't require any more math than the really basics which are required to write scopes. Good luck on SSC's, Deamon  maybe good to put some good version of this on webbie? [/edit] .:HyperNation @ winamp:. .:DeviantArt:. Thermal is now available for download at DeviantArt.
 7th July 2003, 16:59 #93 Runar Junior Member     Join Date: May 2003 Posts: 23 Don't use additive blend. Use 50/50 blend + a fast brightness. It's the same thing in about 90% of the causes, but faster.
 7th July 2003, 19:30 #94 dirkdeftly Forum King     Join Date: Jun 2001 Location: Cydonia, Mars Posts: 2,651 runar, you're on crack. the calculation for (50/50 blend)*2 is ((a+b)*0.5)*2, whereas additive is simply a+b. that method not only reduces color depth by 50% but it also nicks about 0.3 fps on my comp (went from ~28.4 to ~28.1 using tuggummi's golden age preset as a benchmark) "guilt is the cause of more disauders than history's most obscene marorders" --E. E. Cummings
 7th July 2003, 21:34 #95 Runar Junior Member     Join Date: May 2003 Posts: 23 Heh. You can post as much mathematical nerd crap you want. However, I do not see how you claim that the attached preset doesn't prove me right.
7th July 2003, 21:37   #96
Runar
Junior Member

Join Date: May 2003
Posts: 23
Here we go.. I hope you have WinRAR.
Attached Files
 runar - additive vs 50-50.rar (473 Bytes, 134 views)

 7th July 2003, 21:46 #97 mikm Major Dude     Join Date: May 2001 Location: somewhere else Posts: 1,255 Press in the future. Effect list two was twice as fast (64 opposed to 32), so, you just proved yourself wrong. Additive is obviously faster than 50/50 + Fast Brite. As Atero said, you are just cancelling out the *.5 and *2.  I think that you forgot to disable the first effect list before enabling the second one. [/edit] powered by C₂H₅OH
 7th July 2003, 21:55 #98 Runar Junior Member     Join Date: May 2003 Posts: 23 Right, I give up, my computer must be seriously fucked, because here, effect list 1 is, as I stated, 25 FPS faster (55 contra 30). I am indeed sorry, I see that I wet my pants. And the Edit-function doesn't allow attachments
 7th July 2003, 21:57 #99 Deamon Major Dude     Join Date: Nov 2002 Location: Arnhem, the Netherlands Posts: 927 you are forgiven .:HyperNation @ winamp:. .:DeviantArt:. Thermal is now available for download at DeviantArt.
 7th July 2003, 22:14 #100 Runar Junior Member     Join Date: May 2003 Posts: 23 Thank you!
 Winamp & Shoutcast Forums > AVS Tips & Tricks 2 -- Beginners and Intermediate Only