Problem on Dynamic Lines FX

   Discuss technical issues with the community. Mixvibes staff provides no support on this board.
Forum rules
Click here to join MIxvibes on DISCORD https://discord.gg/gMdQJ2cJqa

Problem on Dynamic Lines FX

Postby FStriker on 05 Dec 2018, 00:11

Hi Mixbives,

I downloaded the Essential Generator pack.

Everything works fine to the rhythm of the music except the Dynamic Lines effect. And when I edit the file, I realize that it lacks the variable #pragma input ichannel10 audio

Impossible to move the curve depending on the sound, ... or so I do not know how the effect works.
Is it possible to modify the code by adding the variable to the place (float sound for example?)

Here's the code:



#pragma autoreload;
#pragma shadertoy;// Using shadertoy's formalism for non-specific uniforms
#define PI 3.14
#define bpm 24.*PI*cycleClock

/*UNIFORMS*/
uniform float cycleClock;
uniform float barClock;

float random(float x){
return fract(sin(dot(x,343.903434))*2324.42423);
}

float fbm(float x){
// Properties
const int octaves = 1;
float lacunarity = 2.0;
float gain = 0.5;
float y;
//
// Initial values
float amplitude = 0.5;
float frequency = 1.;
//
// Loop of octaves
for (int i = 0; i < octaves; i++) {
y += amplitude * sin(frequency*x);
frequency *= lacunarity;
amplitude *= gain;
}
return y;
}

float trace(vec2 uv, float f){
return smoothstep(f-.01, f, uv.y)-smoothstep(f,f+.01,uv.y);
}

float mask(vec2 uv, float f){
return smoothstep(f-.002, f, uv.y);
}

float line(float x, float amp, float freq, float t, float seed){
float line = .9*sin(x*freq+t) + sin(x*freq*seed+t*.5*seed)+ Fragment*fract(x*freq*seed+t*.75*seed);
return line*=amp;
}

void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 uv = -1. + 2.*fragCoord.xy / iResolution.xy;// Remap the space to [-1;1]
uv.x *= iResolution.x/iResolution.y;// Aspect ratio correction

vec3 color = vec3(0.);
float t = 2.*iGlobalTime;
//float t = bpm;
float freq = 8.;
float amp = mix(1.,clamp(2.*sin(bpm),-1.,1.),Bounce);
float lines[8];

/* color += trace(uv, line(uv.x, .1, 8., t, 1.46));
color += trace(uv, line(uv.x, .1, 8.32, t*.92, 1.4892))*mask(uv, line(uv.x, .1, 8., t, 1.46));
color += trace(uv, line(uv.x, .143, 8.67, t*.832, .46))*mask(uv, line(uv.x, .1, 8.32, t*.92, 1.4892))*mask(uv, line(uv.x, .1, 8., t, 1.46));*/

for(int i=0;i<8;i++){
lines[i] = amp*line(uv.x, .1+Amplitude*float(i)*.01, 8., t+float(i)*Spacing, 1.46);
color += trace(uv,lines[i]);
}

fragColor = vec4(color,1.0);

}
User avatar
FStriker
 
Posts: 13
Joined: 25 Nov 2018, 15:02


Re: Problem on Dynamic Lines FX

Postby Team@Mixvibes on 05 Dec 2018, 22:12

Thanks for these details, I will forward this topic to the developers to see if they can provide some answers. Sorry to say I am not very experienced when it comes to generator coding.

Adam @Mixvibes
For support requests, you can check out the FAQ and reach our support staff at this page.
Thank You!
Team@MixVibes gives no support on the forums including via PM
User avatar
Team@Mixvibes
 
Posts: 947
Joined: 18 Mar 2010, 12:51


Re: Problem on Dynamic Lines FX

Postby FStriker on 06 Dec 2018, 10:43

Hello Adam,

No worries, thank you for your very fast response. I'm looking for my side to "add" this variable somewhere but ... I can not find.

PS : Maybe we should talk to Antoine Pazat ;)

Thank you to you, good luck
User avatar
FStriker
 
Posts: 13
Joined: 25 Nov 2018, 15:02



Return to Community Support




Who is online

Users browsing this forum: No registered users and 53 guests

Board index

 
 
   
 
© 2014 Mixvibes