Thursday 31 December 2009

Nikon D90 Breakthrough! Part III - The solution by us

As soon as we discovered that the other methods for destepping were wrong. All we had to do was compare the two methods, find where they had the wrong splits and make a correct split template.
The theory proposed by a friend was that Nikon scales the footage using the nearest neighbor method to go from a resolution of about 800 lines to 720 lines. This was why some lines were discarded.
So all we had to do was find the exact scaling factor of Nikon's method and then reverse it so we could go from 720lines to about 800. The result would leave us with duplicate lines (because we would use the nearest neighbor method again) which would then be discarded and inerpolated.
After counting (by hand!) all the pixels and found the repetitive segments we were able to calculate the scale factor. The magic number is 1.113281 .
It was all downhill from there. And as you can see below the flow is very compact with minimal nodes. It is also very fast to render.
Of course in Fusion you can do all of this in a macro so it is as easy as adding a node to your footage.

I suppose a similar method can be used with After Effects. As long as scaling is done in draft mode and rendered as it is and NOT with best settings. If someone makes it for AFX, please let us know.

UPDATE: It seems that fusion has trouble with some of the Nikon AVIs possibly to a bug in the Nikon avi packager. You can use ffmpeg (free) with the script below to remux them in new fixed avi files. Just make a dos batch file (.bat) with a text editor like notepad and paste the code below

::-----------------------------------------------------------------
for /f %%f in ('dir *.avi /b /a:-d-s-h') do call :Convert "%%f"
echo Finished
PAUSE
goto :EOF
:Convert
echo FIxing %1
ffmpeg -i %1 -vcodec copy fix_%1
goto :EOF
::-----------------------------------------------------------------

Wednesday 23 December 2009

Nikon D90 Breakthrough! Part II - The solution by others

Searching the internet for solutions to the D90 stair stepping problem, we found an After Effects project called 'D_MOVIE_FIXER' [technique created by Lee Wilson (dvxuser) project finished by Matthew Bennett].
What they had done was split the original picture using masks to horizontal lines of 8 or 9 pixels high, moving them leaving 1-pixel empty lines and then filling them by interpolation.
At first it seemed to work OK although we found that some lines on the lower part of the picture still did have problems (this was due to incorrect slicing).
We also found a nuke tool doing more or less the same job with the same technique. This one looked better but still had some problematic lines (also due to incorrect slicing). One of the problems of using this method was that we don't use Nuke and didn't plan on getting it only to fix this problem.
Another problem is batch processing. The After Effects method which is our program of choice worked using a complex series of nested comps and mask slices which was awkward and time consuming and required footage replacement for each movie file we would want to process.
Not an elegant solution
NEXT: Definitive solution using Fusion. Fast and elegant

Tuesday 1 December 2009

VFX Development

Test render for a VFX scene of "At Someone Else's Expense"