Crazy way of combining 2 videos to make 1

Hi everyone!

I need to find a way to create 1 video from 2 origin video files by vertically slicing those 2 files into 50 or more columns and then alternately combining those slices into one video. It would be good to be able to control the thickness of each slice on a pixel scale (ie: I want each slice to be 2 pixels thick).

Here is a simple sketch to explain what I want to do:

Anyone has an idea how to do this? Any pointers would be muuuuch appreciated!

Big Cheers to the community!

David

hi,

use a striped (rampTOP) mask on the first layer and compose it over the other (overTOP)!

2 ways :

or

3 Likes

Hi Gallo!

Thanks a lot! this is a great way to create masks!

However the problem I have with the masking method that I am losing parts of image 1 that are covered by a slice of image 2.

I am looking to ADD all slices together so that none get lost.

ie:
image 1 has a size of 8x16 pixels
image 2 has a size of 8x16pixels
final combined image has a size of 16x16 pixels. (doubled in width)

Maybe it is possible by using inside and outside tops on each image in order to get all columns and then using translate functions to horizontally move each column.

really struggling with understanding how i can translate the slices (each slice must move +2 columns from the other slice before it… maybe use python script?) and adding them together in the end.

Any help hugely appreciated… my brain is hurting

Maybe sort of like this: (just cant get the translate right)

Hey! One idea you might try is creating geometry structured like vertical window blinds, with uvs for each rectangle shifted accordingly.

You could create a static sop network that sets up the sops, then merge them together, and the only thing that would cook every frame is the render top.

1 Like

hum… if i am understanding what you are up to, using TOP masks in that case won’t work. You would need a UV sliced and create gutters between each slice. Which is doable but would need a shader or TOP Maths.

One “easy” way i think about is using a grid SOP and use a FacetSOP to split each slices and then align them at the render pass. Would need some tweaking though.

slices.tox (2.0 KB)

1 Like

If you double the resolution of each image horizontally then the masking technique could work without losing original pixels.

1 Like

my god man! thank you so much for the work here!!! It looks like it can get there, i have not yet had the chance to go through the details but will let you know once i get it.

Big Cheers!

Hi Gallo,

I have gone through your network trying to adjust it to different parameters but I cannot wrap my head around the alignment of the slices. when i try to change the number of columns in the grid SOP, or the resolution of the input movie files, the slices have to be aligned again. however i do not understand how to adjust the values in the translate rows of the align SOP so that they dont overlap etc. Could you explain how I can arrive at the correct values so that i can change the number of columns in the grid?

if i understand correctly, the geo2 translates the 2nd batch of slices by a value of the resolution width divided by the number of slices. is that correct?

Hi,

yes the Align SOP is king of difficult to understand. I used to know what i was doing but i must say i did it roughly as i didn’t remember how things work. You can align them by hand or using a second SOP in the second input and using UV parameters.

I used the geo2 to translate the second batch but you can set translate to 0 there and use the Bias parameter in the Align SOP instead.