Projecting Circular 360° Videos
  • themarra
    junior Member
    Posts: 7
    Joined: Mon Sep 02, 2019 11:55 am

    Projecting Circular 360° Videos

    by themarra » Thu Sep 12, 2019 2:00 pm

    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)
  • mad-matt
    garageCube team
    Posts: 1475
    Joined: Mon Sep 09, 2013 5:50 pm

    Re: Projecting Circular 360° Videos

    by mad-matt » Fri Sep 13, 2019 12:18 pm

    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.
  • themarra
    junior Member
    Posts: 7
    Joined: Mon Sep 02, 2019 11:55 am

    Re: Projecting Circular 360° Videos

    by themarra » Fri Sep 13, 2019 5:03 pm

    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.
  • themarra
    junior Member
    Posts: 7
    Joined: Mon Sep 02, 2019 11:55 am

    Re: Projecting Circular 360° Videos

    by themarra » Fri Sep 13, 2019 5:19 pm

    Here I have a screenshot of the panoramic video in the program, as you can see the output isn't what I wanted
    Attachments
    Post.png
    Post.png (211.1 KiB) Viewed 4612 times
  • mad-matt
    garageCube team
    Posts: 1475
    Joined: Mon Sep 09, 2013 5:50 pm

    Re: Projecting Circular 360° Videos

    by mad-matt » Sat Sep 14, 2019 1:57 pm

    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
    }
    Attachments
    Translate.fs.zip
    (648 Bytes) Downloaded 326 times
  • themarra
    junior Member
    Posts: 7
    Joined: Mon Sep 02, 2019 11:55 am

    Re: Projecting Circular 360° Videos

    by themarra » Thu Sep 19, 2019 12:12 pm

    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
  • mad-matt
    garageCube team
    Posts: 1475
    Joined: Mon Sep 09, 2013 5:50 pm

    Re: Projecting Circular 360° Videos

    by mad-matt » Thu Sep 19, 2019 2:03 pm

    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
  • al_baum
    member
    Posts: 20
    Joined: Sat May 10, 2014 4:24 pm

    Re: Projecting Circular 360° Videos

    by al_baum » Tue Mar 07, 2023 1:28 pm

    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
  • mad-matt
    garageCube team
    Posts: 1475
    Joined: Mon Sep 09, 2013 5:50 pm

    Re: Projecting Circular 360° Videos

    by mad-matt » Tue Mar 07, 2023 4:53 pm

    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.

Who is online

Users browsing this forum: No registered users and 17 guests