Background video instead of picture (workaround?)

  • #1, by Patrick Dean MillerSaturday, 07. January 2017, 01:27 4 years ago
    Hey Community,

    I need to get the following done:

    I want a video to overlay my scene background which plays on repeat.
    Its way easier to create good looking scenes then.
    But how do I do it?
    I tried creating new objects or even playback the video on scene
    switch -> the problem: no loop function and the game is basically paused in this timespan.

    IF THIS IS NOT POSSIBLE:
    Is there ANY way to overlay the background with an greenscreened animation? I have all those set up. But I kinda dont know how to this. I tried to set an animated .gif file with the correct alpha channel and stuff, but somehow it only counts the first frame kinda.

    STILL I would prefer the video solution. The game must not be paused and everything must be visible. it's really like meant to replace the background if u want to call it that way.

    THANKS IN ADVANCE !

    Newbie

    9 Posts


  • #2, by afrlmeSaturday, 07. January 2017, 01:49 4 years ago
    A'llo, welcome to the VS community. smile

    Unfortunately it's not possible to overlay videos in Visionaire Studio. I also highly recommend against using gif files in general - let alone animated gifs - as the picture quality of them is terrible. I only recommend using png or webp image formats (webp if you want better optimization - faster loading times & less required hdd space).

    If you want to create a video in the background then you need to create a scene object & create an animation inside of the animation tab. You can set the loop amount to whatever you want inside of the properties (cog icon) page of the animation. Tick the infinite box to make it loop forever. To make the animation play on scene load you need to assign the animation you just created inside of the default animation dropdown menu on the object properties tab - alternatively you can create a play animation action inside of an at begin of scene action for the scene in question...

    https://i.gyazo.com/3e12b3dff6ea538e84fc992653d1dc1a.jpg

    https://i.gyazo.com/63a3c84f9d83a8077160fe97d855a352.png

    https://i.gyazo.com/5ba89fbc809c117ad8f8fc890d699f5f.png

    Imperator

    6842 Posts

  • #3, by Patrick Dean MillerSaturday, 07. January 2017, 10:51 4 years ago
    Hi ! Thank you! Wow... lets be honest here quys... this is sad xD I mean... Dayum. Okay whatever. So do I really have to insert every frame on my own? Why cant I  insert more than one at once?

    Newbie

    9 Posts

  • #4, by sebastianSaturday, 07. January 2017, 11:08 4 years ago
    you can smile 

     Just name all the frame images with an upcounting number in it. 
    When in the animation editor there is an icon next to the import images (+/-)  which looks like multiple images and a plus symbol combined. there you can batch import all frames.  

    Thread Captain

    2337 Posts

  • #5, by Patrick Dean MillerSaturday, 07. January 2017, 11:15 4 years ago
    thanks! NOW I have another problem. IT WORKS BUT (grin) the first time the animation is played back it gives huge frame drops (128 pictures in animation) only after the first run is finished its on high fps. (not my graphics card guilt, i can assure u haha) does this change when i compile the game correctly? right now i check this with the play game function

    Newbie

    9 Posts

  • #6, by sebastianSaturday, 07. January 2017, 11:25 4 years ago
    yeah, thats a known issue with huge animations and/or big file sizes. The engine loads every frame separatly into the ram. Thas why the second time it runs smoothly. Now its time to optimize. As AFRLme already mentioned its recommended to use the webp file format for example because it reduces the file size while not compromizing with image quality. 

    There is also a preload animation action part which you could run before the start animation (at the beginning of the scene for example). But it seems a bit broken since 4.2.5

    Thread Captain

    2337 Posts

  • #7, by Patrick Dean MillerSaturday, 07. January 2017, 11:27 4 years ago
    thanks! i will try it. where can i find the preload animation thing?

    Newbie

    9 Posts

  • #8, by afrlmeSaturday, 07. January 2017, 11:48 4 years ago
    thanks! i will try it. where can i find the preload animation thing?
    Before you use the preload animation thing, which is not something I recommend doing unless you really have to, can you please provide me with a little more detail about the animation in question? Cheers.

    What is the default game resolution you have specified? Is the animation the full size of the default game resoltion? If it's not the size of the default game resolution, have you cropped into the images so only the visible part of each frame is shown or have you left each frame the size of the scene/default game resolution? Have you used duplicated frames to control the length of the animation? & finally, do you actually need all 128 pictures?

    Would you be willing to share a video/screenshot of the scene/animation please?

    P.S: Please check this section of the wiki. Specifically the image encoding & game optimization pages as I'm sure you will find them useful.

    Imperator

    6842 Posts

  • #9, by Patrick Dean MillerSaturday, 07. January 2017, 11:48 4 years ago
    thanks! i will try it. where can i find the preload animation thing?
    ALL GOOD ! Found it grin

    Newbie

    9 Posts

  • #10, by Patrick Dean MillerSaturday, 07. January 2017, 11:52 4 years ago
    thanks! i will try it. where can i find the preload animation thing?
    Before you use the preload animation thing, which is not something I recommend doing unless you really have to, can you please provide me with a little more detail about the animation in question? Cheers.

    What is the default game resolution you have specified? Is the animation the full size of the default game resoltion? If it's not the size of the default game resolution, have you cropped into the images so only the visible part of each frame is shown or have you left each frame the size of the scene/default game resolution? Have you used duplicated frames to control the length of the animation? & finally, do you actually need all 128 pictures?

    Would you be willing to share a video/screenshot of the scene/animation please?

    P.S: Please check this section of the wiki. Specifically the image encoding & game optimization pages as I'm sure you will find them useful.
    Hi! OKay here u have a screnshot.
    See the flies? Those are flying all over across the screen, so yeah fullscreen animation

    Newbie

    9 Posts

  • #11, by SimonSSaturday, 07. January 2017, 11:59 4 years ago
    The next version can overlay videos via lua.

    Thread Captain

    1366 Posts

Write post