View Single Post
Old 28th March 2005, 06:58   #232
Forum King
jheriko's Avatar
Join Date: Aug 2002
Location: a twist in the fabric of space
Posts: 2,150
Send a message via ICQ to jheriko
Originally posted by Jaak
Only 2 multiplications faster (per point) that "regular" rotation, but you have to remultiply all matrices if you want to change rotation order, with "regular" method you do not have to do this.
That is a trivial effort, and is no harder to do for one method than the other. If you really want to go all out on optimisations combine your matrices and then combine them reversed... once you do it once thats it. Has anyone in here ever derived a rotation matrix from anything other than somebody elses preset? (I know some have... you get the point tho...) So whats wrong with copy pasting that block of code, you save 4 muls per point, not much but I've seen more done for less speed before.

Is there anyway we could see some new tricks and tips? Gradients are on THE FIRST PAGE. The aspect ratio and rotation matrix have been mentioned literally dozens of times before in these forums (though maybe not on this thread).

So that I'm not wasting a post... here is a tip:

About 80% of the time everything else is more expensive than coded components in terms of framerate. If you have 10 effect lists, 3 waters and 2 bumps and your favorite renders are SVP loaders then no amount of code optimisation will speed that preset up.

One of the most annoying mistakes I see in presets is the use of <insert large number here> components to achieve the effect of 1 or 2, almost always with the result of making the computer strain to draw what is already a really crappy preset. Nothing screams n00b and 'I don't learn from other peoples mistakes, or off my own back' like this particular error.

I know I have made some really slow presets... but what do they do... render a blurry bumpy kaleidoscope with a dot fountain in front of it?. Don't think so. When you know basically how AVS works (i.e. that it follows a sequential execution path and that each component takes time to execute) its actually pretty difficult to make a preset that suffers from 'too many bumps', or whatever, by mistake.

Try to use simple superscopes or simple movments or dms, although its tempting to use water, bump and color map all the time, please don't. All these effects do is give your preset the same tired look as hundreds of others that rely on these effects, and at the same time you are probably wasting framerate, since these sorts of effects can normally be replaced with something reasonably similar that runs a lot faster, using some clever movements, sscs or convo filters, or even just by coding it right in the first place. Unique tones and colour maps aren't for colouring in superscopes, the red, green and blue variables are!

[ /rant ]

edit: 10 points to Mr Nudge on the triangular wave... thats a good tip as many n00bs will go straight for the silly sin approach <cough>WotL<cough>.

-- Jheriko

'Everything around us can be represented and understood through numbers'

Last edited by jheriko; 28th March 2005 at 07:31.
jheriko is offline   Reply With Quote