Midi event driven Particle effect Preset

Discuss the ZGameEditor Visualizer plugin for FL-Studio.

Moderator: Moderators

Post Reply
StevenM
Posts: 149
Joined: Thu Jan 20, 2011 10:03 am

Midi event driven Particle effect Preset

Post by StevenM » Thu Mar 17, 2011 4:19 am

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.
Attachments
032211.zip
(388.38 KiB) Downloaded 332 times
Last edited by StevenM on Mon Mar 21, 2011 11:30 pm, edited 10 times in total.

User avatar
VilleK
Site Admin
Posts: 1947
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK » Thu Mar 17, 2011 8:33 am

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.
Attachments
MidiParticles_031611.zgeproj
update particles
(88.44 KiB) Downloaded 409 times

StevenM
Posts: 149
Joined: Thu Jan 20, 2011 10:03 am

Post by StevenM » Thu Mar 17, 2011 8:52 am

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.

StevenM
Posts: 149
Joined: Thu Jan 20, 2011 10:03 am

Post by StevenM » Thu Mar 17, 2011 10:01 am

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

Panphobic
Posts: 3
Joined: Mon Jul 25, 2011 9:44 pm
Location: Sourthern California
Contact:

Post by Panphobic » Mon Jul 25, 2011 9:54 pm

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

User avatar
Kjell
Posts: 1669
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell » Mon Jul 25, 2011 10:10 pm

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

Panphobic
Posts: 3
Joined: Mon Jul 25, 2011 9:44 pm
Location: Sourthern California
Contact:

Post by Panphobic » Wed Jul 27, 2011 2:37 am

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.

StevenM
Posts: 149
Joined: Thu Jan 20, 2011 10:03 am

Post by StevenM » Wed Aug 03, 2011 9:04 am

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.

Panphobic
Posts: 3
Joined: Mon Jul 25, 2011 9:44 pm
Location: Sourthern California
Contact:

Post by Panphobic » Mon Sep 26, 2011 4:50 pm

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.

Post Reply