Page 1 of 1

Midi event driven Particle effect Preset

Posted: Thu Mar 17, 2011 4:19 am
by StevenM
Used the Zgame Particle engine here - Requires a midi out channel. Any tips to make it better appreciated. Really looking for some performance and optimization suggestions too.

Video Here.

http://www.youtube.com/watch?v=87ez6fu3Wnw

EDIT: Updated with a patch selector on the midi out channel. This will allow for 2048 variations (Overkill, but only 2 right now) of the particle preset or additional midi input patches with 16 possible layers. I'm planning on creating background patches for channel 2 and drum patch visuals on channel 10. Might utilize more channels depending on performance testing.

Posted: Thu Mar 17, 2011 8:33 am
by VilleK
Hi Steven,

I found a couple of things to improve:

Moved the bitmaps out from Model.Definitions, otherwise each instance (a.k.a. clone) of the model gets their own private copy of all the textures which use lots of texture memory and hurts performance. Only keep things in Model.Definitions when you want to use separate settings for each model instance.

Set a Life variable and a Condition on the model so it can detect when it is time to remove itself. Otherwise all the models will keep going even after the particle emitter stops.

Instead of using "AlphaLoad" in MaterialTexture, set the MateriaTexture.Texture directly. This avoids recreating the OpenGL texture that otherwise results with using BitmapLoad component.

See attached updated project.

Posted: Thu Mar 17, 2011 8:52 am
by StevenM
Awesome - thanks!

Set a Life variable and a Condition on the model so it can detect when it is time to remove itself. Otherwise all the models will keep going even after the particle emitter stops.
This was killing me - I could not figure it out for the life of me. I'll have a look at the project.

Posted: Thu Mar 17, 2011 10:01 am
by StevenM
Just tested - massive improvement in performance - Thanks so much for taking the time to fix those issues. I probably would not have figured out removing the objects by using Delta time on my own. Heres another video - this would not run before the improvements.

http://www.youtube.com/watch?v=tEfKXWK-FdQ

Posted: Mon Jul 25, 2011 9:54 pm
by Panphobic
Hi I just wanted to say thanks for this preset Steve. I will hopefully make a video with it soon if I can get it to work.

I am looking at some tutorials, but I was wondering how difficult it would be to make something with an output similar to the mam player? Or miditrail? If you do not know what I mean, here is a video I made with MAM: http://www.youtube.com/watch?v=jl0_OaWy18Y
Sorry but all this programming stuff is a bit above my head. In any case, I am really excited about the zgevis, and I will buy a copy of FL just for this one plugin if I can actually figure out how to use it :P

Posted: Mon Jul 25, 2011 10:10 pm
by Kjell
Hi Panphobic,
Panphobic wrote:I was wondering how difficult it would be to make something with an output similar to the mam player?
Should be pretty easy .. apart from the fact that the plugin cannot "look ahead" in time. So, either notes can't appear until they are played ( like in this effect ), or you have to play & record the song to a buffer / file first to work around that limitation.
Panphobic wrote:I am really excited about the zgevis, and I will buy a copy of FL just for this one plugin if I can actually figure out how to use it :P
Using the plugin in FL Studio is pretty straight-forward, developing presets might be a bit tougher :wink:

K

Posted: Wed Jul 27, 2011 2:37 am
by Panphobic
Hi, I made a video with your preset here it is if you want to see it:

http://www.youtube.com/watch?v=jzrzSWkKE0I

Thanks for this preset, I had a lot of fun working with it.

Also, while I am at it I might as well mention some things I noticed while working on this:

I got an error message while changing presets: "access violation at address 68cda1fa in module zgameeditorvisualization.dll read of address 0000004c"

This did not crash anything, and in fact the plug still worked just fine after the message but I figured I would mention it just in case.

When using this preset, the 'clear' and second preset slot behaved strangely. Specifically when I chose a 'clear' setting it would zoom way in so that I could only see part of the display. Also when I put a second instance of this preset in the second slot, the zoom would control only zoom for the first slot. I still got a good video, but it would be nice to move the location of each visualization independently, so that I could have something like a fractal in the 'clear', this preset, and maybe some fog or something.

Posted: Wed Aug 03, 2011 9:04 am
by StevenM
Exellent Job on that - one of favorite piano solos -It was one of the first songs I ever learned how to play when I took piano lessons. I'm going to post this in that FL Forums.

Posted: Mon Sep 26, 2011 4:50 pm
by Panphobic
Thanks, I would have posted it in those forums but I can not since I am still just a demo user. I noticed that I forgot to give credit for the patch in the video, sorry about that. I will go and change the description and add an annotation at the end of the video.