Page 1 of 1

Projecting Circular 360° Videos

Posted: Thu Sep 12, 2019 2:00 pm
by themarra
I would like to project a 360° video which will be displayed on 3 screens. The problem is that when importing it to MadMapper, the video source is just a flat video where the left edge and the right edge isn't connected. I want to eventually control the input frames with MadMapper with using OSC to get an immersive controllable experience on the video scene, where you can turn the view more than 360° (just like in a normal 360° video player).

So the question is this:
Is there any way to get the video source input to support 360° videos?
Or maybe manipulate the control of the input frames in a particular way, such that when displaying over the right edge, it goes back to the left edge and takes it as the input? (so it would be like a circular video)

Re: Projecting Circular 360° Videos

Posted: Fri Sep 13, 2019 12:18 pm
by mad-matt
You can put the attached FX file in ~/Documents/MadMapper/FX/quad
Then select it for your quad, it will allow translating the visual horizontally and vertically. Soft-edge will still work.
Another possibility is to create an ISF that takes another media as input and that you would use on all surfafces. But the FX way will work.

Re: Projecting Circular 360° Videos

Posted: Fri Sep 13, 2019 5:03 pm
by themarra
Hi mad-matt,
where can you get this FX file? What kind of file is it?

Just to be clear I already have a .mp4 video that I want to project. It's just that when translating the input off the edge, it won't loop around like a 360° video.

Re: Projecting Circular 360° Videos

Posted: Fri Sep 13, 2019 5:19 pm
by themarra
Here I have a screenshot of the panoramic video in the program, as you can see the output isn't what I wanted

Re: Projecting Circular 360° Videos

Posted: Sat Sep 14, 2019 1:57 pm
by mad-matt
Sorry I forgot the attachment. Here is the file. Yo uhave to unzip it (I couldn't attach a .fs file in the forum)
Here is the code

/*{
"CREDIT": "mm team",
"CATEGORIES": [
"Image Control"
],
"INPUTS": [
{
"NAME": "inputImage",
"TYPE": "image",
},
{
"NAME": "fx_translate_x",
"LABEL": "Translate X",
"TYPE": "float",
"MIN": -1.0,
"MAX": 1.0,
"DEFAULT": 0.0
},
{
"NAME": "fx_translate_y",
"LABEL": "Translate Y",
"TYPE": "float",
"MIN": -1.0,
"MAX": 1.0,
"DEFAULT": 0.0
}
]
}*/

#ifdef SOFT_EDGE_1_ACTIVE
in vec2 mm_SurfaceCoord;
uniform sampler2D softedge1;
#endif
#ifdef SOFT_EDGE_2_ACTIVE
uniform sampler2D softedge2;
#endif

uniform vec4 modulationColor;
uniform float ignoreAlpha;

out vec4 out_color;

void main()
{
vec4 tex_color=MM_SHADER_NORM_PIXEL(vec2(fract(isf_FragNormCoord.x+fx_translate_x),fract(isf_FragNormCoord.y+fx_translate_y)));
tex_color.a += ignoreAlpha;

out_color = tex_color;

out_color *= modulationColor;

#ifdef SOFT_EDGE_1_ACTIVE
out_color.rgb = out_color.rgb * texture(softedge1, mm_SurfaceCoord).r;
#endif

#ifdef SOFT_EDGE_2_ACTIVE
out_color.rgb = out_color.rgb * texture(softedge2, mm_SurfaceCoord).r;
#endif
}

Re: Projecting Circular 360° Videos

Posted: Thu Sep 19, 2019 12:12 pm
by themarra
thanks madmatt, it worked well.

Is there any tutorials on how to make your own fx code such as this? I think it might be helpful to know what the possibilities are

Re: Projecting Circular 360° Videos

Posted: Thu Sep 19, 2019 2:03 pm
by mad-matt
We'll add the possibility to create and share FXs like materials in the future. At the moment, if you combine a knowledge of GLSL, the Materials documentation and factory FX source code, you should be ok. FX source code can be found in
macOS: MadMapper.app/Contents/Resources/SystemModules/SurfaceShaders/shaders/quad
Windows: Program Files/MadMapper .../Resources/SystemModules/SurfaceShaders/shaders/quad

Re: Projecting Circular 360° Videos

Posted: Tue Mar 07, 2023 1:28 pm
by al_baum
I know this is an old thread, but I am trying to do exactly the same with a 360 video without success.

I copied the .fs file in a folder in documents>MadMapper>Surface2DFX
I manage to see the effect in the fx selector, but the ouptutt is black.
Any idea of what could be wrong ?
I am using Madmapper 5.1.6 on Windows 10,
Thanks
Alain

Re: Projecting Circular 360° Videos

Posted: Tue Mar 07, 2023 4:53 pm
by mad-matt
This FX file is for an old version of MadMapper. I just published a Video Scroll Surface 2D FX which should do the job. Let us know if it's complete enough.