PDA

View Full Version : My thoughts on MilkDrop....


Illusion
8th November 2001, 11:06
This is kind of a follow on from a reply to Krash's "Geiss" post on the preset forum, I think this is the link to it..

Krash's post (http://forums.winamp.com/showthread.php?threadid=65031)

On the subject of Geiss, Krash, could you have a look at presets 05, 07 & 09 and tell me whether the effects in there are possible in Milkdrop, or whether the way MD is made means you can't do stuff like that.

Also, Ryan, just wondering if sometime down the track in MD, or maybe in a new plugin, there's a possibility of giving more options for designs. Not having a go at MD at all, it's fantastic, but just that all of the presets are based pretty much on lines & waves. This is cool for most of the presets, but it tends to mean it is a lot of lines all the time. If you have a look at some of the AVS presets (like the "newpicks" folder in AVS 2.5 at the moment... like trance travel, light speed and heaps more) you can see things that are really different to what is possible in MD (or at least what I think is possible). As a side note, if any experienced preset writers want some ideas for presets (Zylot, unchained, rovastar, Krash etc.), you might get some good ideas from AVS? I know there's some I'd love to try and have a go at, but my math & MD skills aren't up to standard when it comes to trying to duplicate an effect.. usually I just fiddle around with it till it looks alright, so I wouldn't be able to copy one straight across from another plugin.

Obviously, I think MD is better for a number of reasons - most importantly you don't need to have a Pentium 4 just to run it at a decent resolution. Maybe the engine behind MD is why it runs at a far better framerate than AVS, I think you've said something about it Milkdrop being kinda pseudo-3D, and that's why it runs so well. I don't know any of the coding behind these, so probably the very reason that MD can't do things AVS can is because it runs heaps faster.

But even just having options to, say, have a shape on screen, or a particular kind of background, and give that a behaviour based on the music would be good. This would be independent of the wave_r, wave_g & wave_b things, which from my limited knowledge are the lines that do most of the basic code, which is then edited by the per_frame and per_pixel code :confused: I may not know what I'm talking about though... But, I'm really running out of ideas for what I can do for presets, especially with the limited knowledge I have, and maybe being able to perhaps add a shape or background, or maybe even use a simple gif or jpg picture could really make for some cool effects? You could then kind of warp these out, and do all kinds of crazy zooms and stuff on them, and perform independent equations on them? This could all be completely impossible, would probably slow it down, and code-wise I have no idea what this would involve. But, if any of the things that I've suggested are possible, IMHO it could really make for some amazingly good presets.

So thanks again, if anyone could tell me a) whether this is possible and b) whether you think it's a good idea, I'd really like to know...

Krash
9th November 2001, 13:24
With regards to geiss presets 05, 07 and 09, any chance describing them? Every time I hit 5, it comes up with a different preset, so I don't know which one you're talking about.

As far as having an image or shape and then distorting that, it's theoretically possible, but from what I understand of the way milkdrop does things, it would make it REALLY slow.

The reason milkdrop runs so fast (and correct me, Ryan, if I make a mistake), is that it uses the frame buffer and various other parts of your 3d accelerator to make it go faster, rather than rendering everything in software, and then sending an image to the video card.
The problem is that milkdrop is already using both frame buffers (or whatever it's called) to do it's magic - one holds the previous frame, then calculations get done, and the new frame gets rendered into the other buffer. This was the reason that having text overlays used to slow things down alot - the text was a whole new surface, which makes a total of 3, and as far as I know, only Geforce3's are able to tri- or quad-texturing on a single pass (the other Geforce cards can do two dual-textured surfaces in one pass, but not a quad-textured). Whatever Ryan did to fix that uses alot of your card's video ram.

Having a background that was sourced from an image, while it sounds like a good idea, would really start to make things slow down a bit, and we'd lose all the speed optimisations Ryan put in for v1.0. Once you started doing independant morphing effects to the background, things would slow down alot.

It's easy to forget how many calculations per second a milkdrop plugin is doing. One of Unchained's switching presets (which is an extreme example, but still), uses a massive number of calculations that have to be done at the start of each frame, and then another 10 or more equations that have to be done for every vertex on the mesh. And these are rarely simple equations, either - Most of the time, the equations can have complex trigonometry going on in them, multiple if statements, or various other time consuming tasks. On top of this, the cpu also has to spend time translating the equations, and after they're calculated, has to figure out how that effects the image, and send the informations to the video card. There is ALOT of stuff going on.

Having a background image that was independant would effectively double the cpu load - which is alot.

Nice idea though =]

- Krash

Illusion
10th November 2001, 14:21
Thanks for the technical explanation of that Krash, I'd suspected much of what you had said regarding the extra computational time, but wouldn't have been able to explain why. It does make sense, and I suspect that the reason that MilkDrop is so much faster than AVS is the very thing that prevents it from being able to do more complex stuff regarding shapes & pictures etc, in that an extra overlay would probably double the computational time. So, thanks for the explanation. With regards to the Geiss presets, I don't have a screen capture program which appears to be able to take a proper screenshot of it (any suggestions?). But, you can probably see that most of them have a really nice faded background on them, sometimes with 05 you get an effect kinda like the dual wave preset I had a go at last month, but with really nice colours all around - in MD it tends to be a black background, unless the decay is turned down very low. I just wondered whether the same colour scheme was basically possible in MD?

And maybe when we all have a Pentium 4000 with a Geforce 7, maybe then my ideas might be possible..... :)

Rovastar
11th November 2001, 01:00
Interesting points Krash but me as a preset writer would like the option for these additional features that would slow MD down.

You said
Having a background image that was independant would effectively double the cpu load - which is alot.

But doesn't having Video Echo on for the presets double the amount of cpu usage and we all have seen the Video Echo being used that looks good.

So if the option was there we could all benefit. If we uses features like this sensibly we could create some interesting effects maybe linking individual presets to a individual (small) jpegs (maybe a option within MD to 'tile' them), etc that we supply, maybe put in the same dir.

As for shapes I beleive Illusion that you are correct. There is no reason that I know of for not having some shapes in MD it could easily have triangles and squares, etc as waveforms with no speed difference. These have been requested before but to no avail.:(

Just my 2 bobs worths,

Rovastar

Krash
11th November 2001, 11:03
Video Echo doesn't actually increase the cpu load at all - it's a small hit on the video card, but that's all - Once the frame is calculated, it gets added on top of itself (after being rotated and scaled, which most cards can accelerate), and blended. For any relatively recent card, it's a practically zero speed hit.

Having the wave form in different shapes should be very possible. In fact, I can image a "polygon" wave form, and as you change wave_mystery, the number of sides changes...

I know what you mean about the blending effects now - and I'm pretty sure it's not possible. You mean how rather than just fading to black, the colour sort of "burns" around the edges until it disappears? You never know, if we ask, Ryan might put it in as just an on/off filter.

- Krash