Audiio waveform mesh deform

Discuss the ZGameEditor Visualizer plugin for FL-Studio.

Moderator: Moderators

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

Audiio waveform mesh deform

Post by StevenM »

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


Just experimenting a bit - applied a mesh expression over a net here - split stereo. CPU version a still runs @ 30 FPS. My Limit though - doubling the size brings the CPU down to 19 fps. Would hope to see some liquid maybe smart particle - effects with the GPU versions.

I wish I could figure out how to use shaders - Hopefully some examples in the future will help me get the ball rolling. Having trouble with variable types. The audio array data is an interlaced array in stereo pairs - I don't know how to deinterlace in the shader using a sampler1d type.

Also, -since the latest beta - if I save preset with an array error (even though I shouldn't) - I need to restart FL Studio to get ZGEViz working again. The error "cannot use this on Render" will not clear - even after I fix the error.
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Hi Steven,

Already creating samples I see, good work! I guess it would look better with some smoothing on the audio data, not sure if that should be done with a visualizer setting or leave it to the effect developer to solve with scripting.

Yes shader creating is really tricky and I am by no means an expert on them myself.

Using the GLSL-function texelFetch you can send in an integer coordinate which means it is easy to split stereo-pairs:

http://www.opengl.org/sdk/docs/manglsl/ ... lFetch.xml

Simply use even coordinates for left channel and odd for right.

You need to know the size of the array (to know the upper bound of the texture) but you can send that into the shader using a ShaderVariable that you set to AudioArray.SizeDim1 using an expression.
StevenM
Posts: 149
Joined: Thu Jan 20, 2011 10:03 am

Post by StevenM »

not sure if that should be done with a visualizer setting or leave it to the effect developer to solve with scripting.
If it's possible - think anything that could be built in to the visualizer including smoothing would be appreciated. Just as long as the control is off by default like the rotate and zoom.

I think that a gain/amplitude parmeter is going to be a part of every audio wave form driven script. Smoothing - should be, but that is a little difficult (for me anyway) to figure out.
StevenM
Posts: 149
Joined: Thu Jan 20, 2011 10:03 am

Post by StevenM »

Yes shader creating is really tricky
Indeed - not used to the paradigm and the way data is handled at all - but I guess that is what makes so fast.

I'll have a closer look at texel fetch - and try it later, thanks.
Post Reply