Log in

View Full Version : fauxD: 2D to stereo-3D conversion in real-time


Pages : [1] 2

eslave
30th December 2008, 07:11
Yes, that's right, fauxD will pulfrich your videos into pseudo-stereo-3D in real-time (at most SD and sub/near-SD resolutions). I know there are sophisticated stereo-3D buffs out there just waiting to flame me for offering this, but I think fauxD is far too entertaining to keep to myself any longer.

The sense of 'presence' offered by this technique can be quite impressive under the right conditions. Imagery in the frame needs to be moving horizontally for the best effect (just a few pixels can often be enough). Rapid camera and subject motions will defeat this technique, and so will a stationary camera staring at an unchanging scene.

By default fauxD will produce red-cyan anaglyphs from your videos, but by changing one argument this can easily support other stereo frame-types; such as Over-Under, Side-By-Side, or Row-Interlaced (for shutter-glasses). See the documentation or script comments for more details.

So dust-off those old paper or LCD glasses and enjoy something in 3D!

-eslave

I finally got around to gathering some samples (red-cyan anaglyph only). Admittedly most are 'best-case' images. If they look a little washed-out its because I accidentally left the brightness Tweak() on.

http://img19.picoodle.com/img/img19/3/1/2/t_fauxDsamplem_f0957f1.jpg (http://img19.picoodle.com/img/img19/3/1/2/f_fauxDsamplem_f0957f1.jpg) http://img32.picoodle.com/img/img32/3/1/2/t_fauxDsamplem_b40fd66.jpg (http://img32.picoodle.com/img/img32/3/1/2/f_fauxDsamplem_b40fd66.jpg) http://img33.picoodle.com/img/img33/3/1/1/t_fauxDsamplem_b01cc8d.jpg (http://img33.picoodle.com/img/img33/3/1/1/f_fauxDsamplem_b01cc8d.jpg)


I've been asked if this works with 3D games or in-game videos. This will work with the videos, but only when imagery is moving laterally. If you want to actually play or record your 3D games in stereo-3D then check www.iz3d.com/t-dcdriver.aspx and use FRAPS (http://www.fraps.com/) to record it.

If you need something for still images I've had decent results with 'redblue3D' at sglx.web.ur.ru/converter/ and funny results with make3d.stanford.edu. Bear in mind its been years since I've tried 3DCombine and that I haven't tested every still image conversion program.

v0.12 re-posted 1/15/2009 This time with the correct source-code. That's what I get for rushing.

setarip_old
31st December 2008, 03:10
Hi!

Naive question perhaps but, can you convert this to a VirtualDub filter?

eslave
31st December 2008, 07:43
setarip_old,

I'm certain a vdub port of fauxD itself is possible, and it should be relatively trivial, but its not on my to-do list this week. :) I'll look into it more, but I've never explored the vdub API - so don't hold your breath. (I'm not much for developing UI elements either.)

The only foreseeable stumbling block is fauxD's dependency on MVTools. I would need to get motion data from a depan logfile, or by accessing AviSynth+MVTools programmatically, or some other means of informing fauxD as to which way the camera is panning for each frame.

In the meantime fauxD's source is available, and from what I recall vdub/mod will accept AVS scripts, correct? (Maybe you need ffdshow? I just dragged&dropped fauxD.avs onto vdubmod and it opened for me.) Of course, my current plugin doesn't always like random (re-)seeks, being rapidly re-opened, and other things one might be prone to do while editing within vdub.

I'll play with the idea for a few days and see what I can do.

-eslave

Update: I think I'm going to table this idea for a while. FauxD is not stand-alone, nor is it mature enough to be hacked into a vdub filter at this point. Even if I did force it into the form of a vdub filter it would probably crash your editor every 5 minutes - hardly what one would consider a 'contribution to the community'. Similarly, there would be very little point in creating an AviSynth front-end filter for vdub, as vdubmod already supports AVS scripts. I'm not giving up on this idea, its just going to take a different approach than I had originally thought.

setarip_old
31st December 2008, 18:21
I'll play with the idea for a few days and see what I can do.Thank you ;>}

rfmmars
31st December 2008, 20:13
Indeed I am very interested in your work, can't wait to play with it.

Richard

photorecall.net

leeperry
1st January 2009, 13:27
looks great, thanks!

but how can I use it in ffdshow ?
I've renamed fauxD.avs to .avsi and I've tried fauxD() but ffdshow won't load at all(I've got the latest MVtools and I've copied the content of the archive in the /plugins/ dir)

eslave
2nd January 2009, 08:40
leeperry,

Please read the html document under "Script Usage"; look for "Input method". You should not need to rename or move any files to use fauxD within ffdshow.

Just un/comment one or two lines in the PROLOGUE section (see the "Method #X" comments), then paste 2 lines into ffdshow's avisynth config dialog (and enable it's checkbox):
import("d:\somepath\fauxD.AVS") #extension doesn't really matter
return last #(optional) just in case

After making these changes every file I open in MPC gets processed through fauxD (and anything else enabled in ffdshow's filter chain). Did you install ffdshow with avisynth support? I'm not sure if every build includes that capability, and I think the installer asks you as well.

If you really want both methods to be available at all times (without re-editing) you could make two copies of fauxD.avs - one for ffdshow and another for Drag&Drop/SendTo.

Be careful not to open fauxD.AVS with an ffdshow enabled application when ffdshow's internal avisynth is configured for fauxD. The application would attempt to fauxD() your content twice and either crash, throw an error, or run incredibly slowly.

Let me know if you still have difficulties.

edit1: Sorry, I've just re-read this post (with the benefit of sleep) and realized I should have consulted my reference first as the doc doesn't offer any real info in its present state. I'll need to update it soon.

edit2: New documentation posted 1/4/2009.

-eslave

leeperry
2nd January 2009, 11:53
so what I've done so far :

-fix the "D:\av\fauxD\" paths in fauxD.avs to my own path
-comment "Import("fname.txt")"
-uncomment "source=last"
-I've got mvtools2.dll v2.3.1.0

I get an error msg that "MVSuper" is unknown(line 74 in fauxD.avs)...so I've taken it out as you said...but then it says "MVAnalyze" is unknown :confused:

:thanks:

mikeytown2
2nd January 2009, 12:00
leeperry, you have mvtools 2 correct?
http://avisynth.org.ru/mvtools/mvtools2.html

edit...
remove the V from MVSuper so its MSuper. Do the same for the rest of the MVTool function calls.

eslave
4th January 2009, 12:55
Ok, I've revamped the documentation and made it as clear as I possibly can with respect to the input methods. (There is a picture, too.)

Leeperry, if you're still getting errors with the names of MVTools functions (MVSuper, MVAnalyse) then I think you may have a bad filename or incomplete path specified somewhere, preventing the plugin from loading. To the best of my knowledge those are the correct function names. (I'm looking at the MVToolsV2 doc right now.) I rename my copies of the MVTools DLLs with their version number so I can keep track of what I'm doing. Please double-check the paths and filenames used on the LoadPlugin and Import lines of your script.

You may also want to hit CTRL-ALT-DEL and check the 'Processes' list (show all) to see if any stalled instances of your video player are still 'running'. If so kill all instances of the player and wait a few seconds before trying again. I have seen numerous flashes of the fauxD vector dialog occur, sometimes for a up to a minute, after killing stalled player instances.

To clarify the "input method" issue I should say your input can come from anywhere, you just need to get it into a clip variable named source near the top of the PROLOGUE section. The rest of the fauxD script (whether 'opened' or 'imported') will then do all the work and return the final clip. You should not need to create or modify any explicit calls to fauxD() yourself in the script's normal 'configuration' (as released) for it work properly. Conceivably issues with color-spaces and pixel formats with respect to ffdshow may arise, but I rather doubt that's the case unless you went randomly checking boxes in ffdshow at some point.

Let me know how it goes.

-eslave

rfmmars
4th January 2009, 20:34
Even with the last update, it still wouldn't work. I had to change all of the MVtools call to Mtool~. Still didn't see any results, but exported into Vdub, all is well. below is my simplified AVS so people can get started.
http://img136.imageshack.us/my.php?image=48004728bk5.jpg

A dialog box appears but with no information????? EDIT: I must be going blind, I could have sworn there was no data when I did the screen grab.

Code
...........................................

source = DirectShowSource("c:\3D-test.avi")

LoadPlugin("c:\AVS\Plugins\AGC.dll")
LoadPlugin("c:\AVS\plugins\removegrain.dll")
LoadPlugin("c:\AVS\Plugins\mt_masktools.dll")
LoadPlugin("c:\AVS\Plugins\warpsharp.dll")
Loadplugin("c:\avs\plugins\gradfun2db.dll")
loadplugin("c:\avs\plugins\DeGrainMedian.dll")
loadplugin("c:\avs\plugins\Smoothdeinterlacer.dll")
LoadPlugin("c:\avs\plugins\Convolution3d.dll")
LoadPlugin("c:\avs\plugins\FFT3DFilter.dll")
LoadPlugin("c:\avs\plugins\VagueDenoiser.dll")
LoadPlugin("c:\avs\plugins\depan.dll")
LoadCPlugin("C:\avs\plugins\AVSCurveFlow.dll")
LoadPlugin("C:\avs\plugins\MVTools2210.dll")
LoadPlugin("C:\avs\plugins\fauxD.dll")

Import("C:\avs\fauxD\fauxD_util.avsi")

####################################################################

scth = 40 #scene change threshold (on a scale of 255, I believe) lower=less tolerance
use_plugin = true #use fauxD function from plugin or AVS
stereo_mode = 0 # 0 = Red-Cyan Anaglyph, 1 = Over-Under (Right Above, Left Below), 2 = Side-By-Side (Left, Right), 3 = shutterglasses (pure AVS, Left=Field1)

flat = source.ConvertToYV12





#----- PREP WORK (Analysis) ---------------------------------

analyze = (source.height%2==0) ? source : source.ConvertToRGB32.CropBottom(1) #adjust to make height even
analyze = (analyze.height%2==0 && !(analyze.height%4==0) && !(analyze.height%8==0)) ? analyze.CropBottom(2) : analyze #try to make height mod4/8
analyze = (analyze.height%2==0 && !(analyze.height%4==0) && !(analyze.height%8==0)) ? analyze.CropBottom(2) : analyze #again if needed to make height mod4/8
analyze = (analyze.height%8==0) ? analyze.verticalreduceby2.verticalreduceby2 : analyze #quarter height
analyze = (analyze.height%4==0) ? analyze.verticalreduceby2 : analyze #half height

analyze = analyze.ConvertToYV12 # SHOULD be YV12 at this point for MVAnalyse


vectors = MSuper(analyze).MAnalyse( blksize = 16 , search = 5 , searchparam = 8 ) #BETTER SEARCH
global depan = MDepan(analyze, vectors) #convert motion vectors into DEPAN clip format (add zoom and rot options for complete vectors)

#----- PULFRICH (Interpret GM & fuse frame-pairs as stereo) ---------------------------------
framestep = 1
#TESTING previous frame (1 frame late)
global current = flat.KillAudio #current frame (now)
global previous = UnalignedSplice(BlankClip(current,framestep), current).KillAudio #previous frame (1 frame late)
global mvthresh = 0.0 #disabled - failed attempt at ignoring 'false-positive' motion
global reverse_stereo = false #for the sake of completeness, affects AVS functions only

global avs_mode = (stereo_mode == 1) ? "OverUnder" : (stereo_mode == 2) ? "SideBySide" : (stereo_mode == 3) ? "InterleavedShutter" : "AnaglyphRedCyan" # convert integer to string (function name) for fauxD/ScriptClip
use_plugin = (stereo_mode == 3) ? false : true #'native' shutterglasses are only supported through the AVS function
stereo = (use_plugin && (stereo_mode!=3)) ? fauxD(flat.converttoRGB32, depan, stereo_mode) : AudioDubEx( ScriptClip(flat, """ FauxD(GetPan(depan), avs_mode) """) , flat.KillVideo )





#----- EPILOGUE (Show me already!) ---------------------------------



flat = flat.ConvertToYV12 #for YDifferenceFromPrevious
stereo = stereo.MatchPixelFormat(flat)
out = ConditionalFilter(flat, flat, stereo, "YDifferenceFromPrevious()", ">", String(scth), false ) #faster than RGB?

# do any FINAL post-processing here
out = (stereo_mode == 3) ? out.Tweak(Bright=30) : out #brighten final output (for shutterglasses) AUTO

out = out.ConvertToRGB24 #for TMPGEnc, VFApi, or any other application limited to 24-bit RGB (8-bits per color/channel)
return out #the END (if everything worked)


#----- SANITY CHECK (Yes, I know this looks stupid.) ---------------------------------

return MessageClip("fauxD Error: Sanity Check!", 320, 240, shrink=false, text_color=$FF0000)

...............................................................................

Richard

photorecall.net

eslave
4th January 2009, 23:05
At the risk of repeating myself, please double-check your filenames and paths. I see you still have "MVTools2210.dll" on your LoadPlugin line. Unless you've renamed your file to match then AviSynth will not load the plugin. However, if you're seeing vector data in fauxD's dialog then things should be functioning properly.

I'll admit that I've never really tried using fauxD.AVS together with other scripts (such as LSF/SeeSaw). There may be unforeseen issues with all the global/ScriptClip stuff (its still relatively new to me). I had considered stream-lining the main script for this release and leaving a heavily commented copy for testers, but I felt that would only add to the confusion.

I'll take a swack at trying fauxD in Vdubmod later today and see what happens.

I apologize for all the unnecessary configuration problems. My original intent was to make it easier for casual testers to modify, but the results appear to be quite different from my expectations.
I'll bet you can't tell this is my first release! :D

-eslave

rfmmars
4th January 2009, 23:31
At the risk of repeating myself, please double-check your filenames and paths. I see you still have "MVTools2210.dll" on your LoadPlugin line. Unless you've renamed your file to match then AviSynth will not load the plugin. However, if you're seeing vector data in fauxD's dialog then things should be functioning properly.

I'll admit that I've never really tried using fauxD.AVS together with other scripts (such as LSF/SeeSaw). There may be unforeseen issues with all the global/ScriptClip stuff (its still relatively new to me). I had considered stream-lining the main script for this release and leaving a heavily commented copy for testers, but I felt that would only add to the confusion.

I'll take a swack at trying fauxD in Vdubmod later today and see what happens.

I apologize for all the unnecessary configuration problems. My original intent was to make it easier for casual testers to modify, but the results appear to be quite different from my expectations.
I'll bet you can't tell this is my first release! :D

-eslave

What I did was rename a copy of my MVtools.dll "Version 2.31 to match your "loadplugins script" , I could not find the version you had listed.

I am very happy with the first results, just wanted to make it as easy for others to get started.

Many thanks,

Richard

eslave
5th January 2009, 04:39
I'm glad to hear its working for you!

I'm just sorry it didn't work for you 'out-of-the-box' on the first day, and I'm fixated on finding a resolution for the configuration problems some seem to be having. When I initially released fauxD I had hoped that people could start having fun right away, without struggling to find a working configuration.

-eslave

The functionality of the file formerly posted here has been incorporated into the current version (http://forum.doom9.org/showthread.php?p=1229743#post1229743).
Disregard the 'quoted' image two posts down.

leeperry
5th January 2009, 11:40
ok cool, something that works with a simple call in ffd would be really awesome :D

rfmmars
6th January 2009, 15:24
I'm glad to hear its working for you!

I'm just sorry it didn't work for you 'out-of-the-box' on the first day, and I'm fixated on finding a resolution for the configuration problems some seem to be having. When I initially released fauxD I had hoped that people could start having fun right away, without struggling to find a working configuration.

-eslave

I'm still not sure this is a good idea, but I'm posting a stream-lined edition of fauxD.avs suitable for import into ffdshow's AviSynth dialog (http://img32.picoodle.com/img/img32/3/1/4/f_fffauxDm_442eab0.png) or other scripts. Don't forget to change the LoadPlugin and Import lines for your system.

http://img32.picoodle.com/img/img32/3/1/4/t_fffauxDm_442eab0.png (http://img32.picoodle.com/img/img32/3/1/4/f_fffauxDm_442eab0.png)

Its me again,

Even with your revised script, Mvtools~ calls must be changed to Mtools~. After the change, the script works but there are problems using it in AVSp. Can you post a link to your MVtools DDL file?

Problems in AVSp using the above script.

1. The data window appears but is blank, no info
2. No 3D process is seen at all.
3. There is no way to use sliders in AVSp because of problems 1 & 2

3D effect and data readout is only seen after export or frameserved to Virtualdub, but no adjustment can be made at that point, most needed is to be able see the process and adjust in AVSp.

EDIT: If I move the timeline slider in AVSp with the mouse, I don't see the 3D conversion but if I hold down the "right" arrow key, the effect is seen, but still do not see any info in the data readout window, if would be nice if this could be fixed but no biggie now if not possible.

EDIT 2: Data readout doesn't stay on top when pressing "right" arrow key, but if AVSp is made not full screen, then it can be seen and there is data in the display. Anyway to force the data readout to stay on top of the AVSp display?

Richard

photorecall.net

eslave
7th January 2009, 06:18
In its current version (v0.11) the fauxD data window will remain blank (or unchanged) until at least two consecutive frames are processed. Seeking (with the sliders) or cutting directly to a frame is interpreted as a discontinuity by fauxD. (Thanks for pointing that out, as I had never really thought much about it until now. It'll be fixed in the next version.) Presently there is no real work-around for this (even if you create and use a logfile for the video in question). However, if you frame-step with the right arrow (or play the video) then fauxD should perform as expected. Incidentally, I primarily use AvsP as an editor. Until now I hadn't often used the built-in video player because it keeps the DLL locked - a nuisance when I'm trying to update it. I normally test my scripts with MPC (by double-clicking the AVS, or dragging and dropping the AVS onto the player window, or through a batch CMD on my SendTo menu).

Also, the YDifferenceFromPrevious scene-change test can completely ignore fauxD's stereo output, resulting in a flat image even if you see data updating in the dialog. (Fusion across scenes is a real eye-sore.) Since AviSynth doesn't like 'looking-ahead' in the video stream my only safe choice is to use the flat image for that frame.

No 3D will be produced until both conditions are satisfied.

I am using MVToolsV2 (http://avisynth.org.ru/mvtools/mvtools2.html) version 2.21 (http://avisynth.org.ru/mvtools/mvtools-v2.2.1.zip). The latest version at the time of this writing (2.31 (http://avisynth.org.ru/mvtools/mvtools-v2.3.1.zip)) works as well, but can cause a hang-on-exit with some apps on my system.
(Fizick, let me know if you want these direct links removed.)

I'll add an option to keep the dialog 'always-on-top' if it works as intended. Although the dialog is more of a debugging tool than a genuine necessity considering only the X values are reasonably close to accurate (because the analysis clip was vertically reduced).

I still have no explanation for your Mvtools~/Mtools~ issue. I don't know how to help you with that.


Right now I'm trying to implement some kind of 'look-ahead' to maintain 3D at scene changes and preserve the effect for that additional 1/24 or 1/30 of a second. If I can get it working then I'll use it to solve the flat-on-start (first frame) issue you also seem to be describing. I've just finished restructuring and consolidating the script files as well. Now everything is in the form of a function and all of it is contained in a single file for easy import. I'll post the new version once I've finished updating the doc and succeed with (or temporarily give-up on) this look-ahead thing. After that I'll nuke the attachment in my previous post.

-eslave

P.S.: Please stop quoting my posts in their entirety. :confused:

eslave
7th January 2009, 09:05
I would have edited my previous post, but it still hasn't been 'approved'. This wasn't the case before. Maybe I've done something to upset a mod, I don't know.

I honestly don't know how I failed to notice this before, but the MVTools function names WERE changed between the two versions in question. :o So yes, all of you were correct to question that. I was just too stubborn to investigate it thoroughly. For some reason Fizick decided to remove all the 'V's from the function names in the current version, but strangely the error messages contained within still have all their 'V's intact.

Aha! Reading can help. From section "V) Revisions": (Lol, section 'V', how appropriate!)
2.3.0 (6.12.2008 by Fizick)
Renamed all functions from MVxxx to Mxxx (some renaming was requested by LaTo, Mystery Keeper, Sagekilla). Error messages is still not updated.

Anyway, I've just finished getting that look-ahead thing working, so some 3D effect can be seen on every frame (unless your scene-change threshold is too low). I'll likely be posting the new version in a less than a day or two, and I'll probably change the all the calls to support the current MVTools version (remove all the 'V's). Hopefully that will settle alot of confusion with respect to configuration.

-eslave

Shinobu
7th January 2009, 11:28
Thanks for this great plugin.
Works fine here (if i remove the "v" from the function ^^).

Too bad a doesn't have any 3d red/blue glasses (ordered yesterday) to test it.

as soon as i got the 3d glasses i'll test on my 720p dlp projector and post my impressions.

"Anyway, I've just finished getting that look-ahead thing working, so some 3D effect can be seen on every frame"
=>i'll wait for this version too ^^

rfmmars
7th January 2009, 18:33
Just want to say a big thank you for working with all of us to work out those pesty bugs in your great plugin, keep all your works coming.

Richard

Fizick
7th January 2009, 19:08
sorry for function names confusing :)

eslave
8th January 2009, 01:58
sorry for function names confusing :)

Don't worry about that, its my own fault for living in the past. :D I really should have taken a closer look at 2.31 before my very first post. I still don't know what my 'hang-on-exit' issue was, but it was most assuredly my fault as well. :) (Obviously I never called any MVtools functions.)

Unless something goes wrong I'll have a new version of fauxD posted later this evening. (Compatible with the current version of MVTools, 2.31) I still need to do some verification testing and fix the docs.

-eslave

setarip_old
8th January 2009, 02:34
@eslave

May I ask if you've made any progress regarding converting this to a VirtualDub filter?

morsa
8th January 2009, 09:09
I found one problem in this implementation of the Pulfrich Effect

http://en.wikipedia.org/wiki/Pulfrich_effect

The effect should only be applied on lateral motions, and from what I saw, this script/plugin doesn't take that into account.Vertical panning/motion also has the effect on it which is not a good thing.
Is there any possibility of using just displacements on the X axis?

eslave
8th January 2009, 13:33
Well, that took far more testing and head-scratching than I had anticipated. Now with 16 different ways to call fauxD (together with its AVS doppleganger) its very easy to overlook something. I've added look-ahead for scene-changes, an 'always-on-top' checkbox, and fixed the 'flat-on-seek' issue rfmmars pointed-out. I've also removed all the 'V's from the MVTools function names for compatibility with Fizick's current version. (Thanks leeperry, mikeytown2, and rfmmars for repeatedly trying to point that out to me.)

Look-ahead will produce 2 duplicate stereo frames in sequence. My alternative was to use reverse stereo on the first frame, thereby furnishing a sense that 'every frame is different', but frequent false-positives caused eye-strain.

@morsa
Speaking of eye-strain, which I make little mention of in the doc, I know pulfrich should only be applied to purely horizontal video (with the camera moving at a prescribed rate), but I am not in control of the camera motions. True, I make no exceptions for vertical motion, I only care about pan direction ('displacements on the X axis'). Yes, this is an oversimplifcation with respect to pulfrich, but its the best I can do in realtime. I simply fuse 2 adjacent frames as stereo depending on pan direction. I wrote the ZeroDepan function hoping to apply some stability (vertical, rotation, zoom) to the source clip while preserving horizontal motion, but I haven't made any real effort to employ such a technique yet. I refer to scenes with strong vertical motion, or anything else that causes severe eye-strain, as "pulfrich-unfriendly". If you really want to see some depth in a video with only vertical motion then turn the video 90 degrees before processing. (Of course you'll need to watch the final output at the same orientation.)

@setarip_old
I've updated my earlier post (http://forum.doom9.org/showthread.php?p=1230134#post1230134). I still don't have a time-frame for a vdub port at the moment. Sorry. :(

@Shinobu
Oh my! Please don't get your expectations too high. This is purely a 'trick' as far as 3D-freaks are concerned. Also, if you happen to have 2 projectors maybe you can try polarized glasses.


I really appreciate all the help and testing that all of you have done, but I'm nearing the end of this current 'fit of creativity'. I'm not stopping development, but I want to actually enjoy fauxD for a little while before breaking it again. :D Also, my new toy (http://www.steves-digicams.com/2008_reviews/panasonic_fz28.html) has just arrived and I'll probably be playing with that for at least a few days. So don't be concerned if I suddenly get a little 'quiet' around here. However, if I do notice that something serious is broken I'll try to correct it asap.

-eslave

Shinobu
8th January 2009, 18:15
i don't expect to high, i'm just interested in testing this "trick".
as for the 2 projectors, i think i'll get a 3-dlp 1080p (when i'll have the money) instead of buying another 720p just to test 3D ^^.

by the way, i have an old 22" crt display, a 24" lcd and the 1-dlp projector, so i'll tell you witch one is the best renderer for your plugin (i'm going to test it with film and animation bdr).

morsa
19th January 2009, 18:21
so, is there any way of not applying the effect on/as vertical displacements, even if it is not realtime ?

eslave
26th January 2009, 05:41
Morsa, I'm uncertain what criteria to use for not applying pulfrich. Any vertical motion? Vertical motion exceeding horizontal motion? Some arbitrary combination of both? You could use GetTilt together with ScriptClip or ConditionalFilter to force the flat image to be returned instead. Remember, the analysis clip was vertically scaled to 1/2 or 1/4 height by default, and the values for vertical displacement will reflect this.

Maybe add a line to fauxDit() like this (only the blue lines are new):
...
out = ConditionalFilter(flat, flat, stereo, "YDifferenceFromPrevious()", ">", String(scene_change_threshold), false ) #faster than RGB?
out = ConditionalFilter(out, out, flat, "abs(GetTilt(depan)*4)", "<", "1.0", false ) #skip vertical motion? (depan clip was scaled)
out = (stereo_mode == 3) ? out.Tweak(Bright=30) : out #brighten final output (for shutterglasses) AUTO
...

or:
...
out = ConditionalFilter(flat, flat, stereo, "YDifferenceFromPrevious()", ">", String(scene_change_threshold), false ) #faster than RGB?
out = ConditionalFilter(out, out, flat, "abs(GetTilt(depan)*4)", "<", "abs(GetPan(depan))", false ) #skip vertical motion if greater than horizontal?
out = (stereo_mode == 3) ? out.Tweak(Bright=30) : out #brighten final output (for shutterglasses) AUTO
...



(Oops, I completely misread your post the first time, I thought you wanted fauxD to process vertical motion in some brilliant fashion.)I'm certain there's a way to process vertical motion, and thats one of many future improvements I would like to add to fauxD, eventually. The current version of fauxD completely disregards vertical displacement. It would probably require real math and actual number crunching to produce such an effect, and I doubt I could do it in realtime.
My primary concern for this version was realtime processing.

However, MVTools will almost always report some horizontal motion, even during still scenes. I often think I see some depth (when there is no real horizontal motion) due to mild vertical motion at times, as long as the difference is only a few pixels. This is likely due to wishful thinking on my part, or chromatic disparity.


@Shinobu
I don't know if HD can be done in realtime, unless you have a ridiculously fast cpu. (I haven't even bothered trying on my system.) Be sure to let me know if you need any of that 'old' hardware tested. :D

-eslave

Also, another product, which I thought had been discontinued, appears to have been rebranded. '3DPlus' can be purchased and downloaded from the eDimensional website (in the 'Stunning 3D' section). There is no trial/demo available. You can find a critical review of the older versions here (http://www.stereo3d.com/3dplus_software.htm).

AnnaFan777
30th January 2009, 19:04
I suppose there's a way to do it vice versa, using mvtools
to convert this image into 2 separate full color pics.

(maybe use only edges for analysis, since (SAD) would be
way off from R and G&B )

need advice. example..

if succeed, we can convert 3d video to 2 full color vids,
heck we can then use lcd glasses to view 3d vid in full color...

http://img440.imageshack.us/img440/8424/samplehoshinobg4.jpg

eslave
1st February 2009, 11:44
AnnaFan777, sorry to burst your bubble, but unfortunately with anaglyph too much information is lost for simple recovery of stereo-pairs. Also MVTools cannot do much with a still image (it never moves). I looked into this a few months ago, and it seems my best realtime option (with a still image or video) is to separate one of the color channels as the 'other' stereo image and then treat both images as some kind of greyscale (unless I want to attempt re-coloring things). I did find one person out there who actively rebuilds movies into various stereo-pair formats by using the original movie together with its anaglyph version and then SADing together anything that didn't fit right the first time (occlusions, etc).
Links: UNDERGROUND 3D CINEMA (http://www.underground3dmovies.com/upcomingprojectsnews.htm), Discussion1 (http://www.davidrubio3d.com/view_topic.php?id=226&forum_id=32), Discussion2 (http://www.stereo3d.com/discus/messages/21/2985.html?1105848131) (DeAnaglyph_Site1 (http://mitglied.lycos.de/stereo3d/deanaglyph.htm), Site2 (http://www.3dtv.at/Knowhow/DeAnaglyph_en.aspx)), Anaglyph to Stereo-Pairs (http://alfa.magia.it/3DGugle/AnaToStereoPairs.htm)

On another note I've quickly written an additional function for those of you with the 'new' Yellow(Amber)/Blue 3D glasses (for the superbowl commercial and other promotions). I haven't finished tweaking the brightness issues, but it does work. (I left the commented lines for any testers out there.)

Copy only the blue lines into fauxD.avsi as shown:
...function AnaglyphRedCyan(){}...
#///////////////////////////////////////////////////////////////////
# Create YB anaglyph from 2 clips. Used as a 'mode' function by FauxD()
function AnaglyphYellowBlue(clip left, clip right)
{
# Yellow (Amber) filter over left eye, Blue filter over right eye
# Left eye sees 'color' (RG)? Right eye sees 'depth' (B)?

#some believe creating a new monochrome 'channel' from greysale makes a better image (slightly brighter)
#right = right.greyscale(matrix="Rec601")
#right = right.greyscale(matrix="Average")

#boost blue channel for that dark filter. (It may need more. I haven't tested this because I don't have the glasses.)
#right = right.ConvertToYV12(matrix="PC.601").tweak(bright=30, coring=false).ConvertToRGB32(matrix="PC.601") #brighten?
#right = right.ConvertToYV12(matrix="PC.601").tweak(cont=1.1, coring=false).ConvertToRGB32(matrix="PC.601") #intensify contrast?
right = right.ConvertToYV12(matrix="PC.601").tweak(bright=12.5, sat=1.25, coring=false).ConvertToRGB32(matrix="PC.601")
right = right.Levels(0, 1.05, 255, 0, 255, coring=false) #increase gamma?

#CopyChannel(RGtarget, BLUEsource)
return CopyChannel(left, right, 0) #use plugin (should be faster?), blue is channel offset 0 (BGRA)

return MergeRGB(left.ShowRed, left.ShowGreen, right.ShowBlue) #AVS method
}
...function InterleavedShutter(){}...

...within function fauxDit()...
global reverse_stereo = false #for the sake of completeness, affects AVS functions only
global avs_mode = (stereo_mode == 1) ? "OverUnder" : (stereo_mode == 2) ? "SideBySide" : (stereo_mode == 3) ? "InterleavedShutter" : (stereo_mode == 4) ? "AnaglyphYellowBlue" : "AnaglyphRedCyan" # convert integer to string (function name) for fauxD/ScriptClip
use_plugin = (stereo_mode == 3) ? false : use_plugin #'native' shutterglasses are only supported through the AVS function
...
and in your script call fauxDit() with mode=4 and plugin=false like this:
fauxDit(someclip, 4, 40, false)

-eslave

AnnaFan777
1st February 2009, 15:50
AnnaFan777, sorry to burst your bubble, but unfortunately with anaglyph too much information is lost for simple recovery of stereo-pairs. Also MVTools cannot do much with a still image (it never moves). I looked into this a few months ago, and it seems my best realtime option (with a still image or video) is to separate one of the color channels as the 'other' stereo image and then treat both images as some kind of greyscale (unless I want to attempt re-coloring things). I did find one person out there who actively rebuilds movies into various stereo-pair formats by using the original movie together with its anaglyph version and then SADing together anything that didn't fit right the first time (occlusions, etc).
Links: UNDERGROUND 3D CINEMA (http://www.underground3dmovies.com/upcomingprojectsnews.htm), Discussion1 (http://www.davidrubio3d.com/view_topic.php?id=226&forum_id=32), Discussion2 (http://www.stereo3d.com/discus/messages/21/2985.html?1105848131) (DeAnaglyph_Site1 (http://mitglied.lycos.de/stereo3d/deanaglyph.htm), Site2 (http://www.3dtv.at/Knowhow/DeAnaglyph_en.aspx)), Anaglyph to Stereo-Pairs (http://alfa.magia.it/3DGugle/AnaToStereoPairs.htm)


Maybe I didn't make it clear, Here's what i thought:

The still 3D pic still consists of two separate images, RED one and CYAN one.

1. create red's edge image A and cyan's edge image B (as in B&W comic book)
2. motion estimation -> from A TO B and vise versa. (it won't be perfect i know)
3. overlay original red image with motion compensated Cyan image, now you get 1 full color image
4. overlay original cyan image with motion compensated Red image, now you get the other full color image.

I'm a bit lazy and out of time, so if anyone's interested, please ...:)

.

eslave
10th February 2009, 01:50
AnnaFan777, I believe the technique you're describing is pretty-much how the other anaglyph-to-stereo-pair methods are accomplished - except replace 'motion estimation' with 'edge-matching' or 'feature-tracking'. This is unlike anything fauxD presently does. I think it would require per-block or per-line matching methods, and I probably wouldn't be doing that in real-time. I'm reasonably certain there are AVIsynth tools capable of doing what you're talking about, but that would almost constitute another pet project in my opinion.

Attempting to use fauxD in its present form to de-anaglyph would likely produce bizarre results (or at least results more bizarre than normal). You could try playing with Shift() for some crude testing, but the red pixels in each original anaglyph frame will be shifted by varying amounts depending on the subject's depth:
clip = clip.converttorgb32
clip = MergeRGB(clip.ShowRed.Shift(8), clip.ShowGreen, clip.ShowBlue) #shift red channel 8 pixels (crude de-anaglyph)
fauxDit(clip, 1, 40, true) #return over-under stereo frames



Its recently come to my attention that fauxD may not produce any sound unless AC3Filter (http://ac3filter.net/project/1/releases) (and possibly other audio codecs) are installed. Also, if you're using fauxD.CMD and it doesn't launch your script (in your desired player) then you may need to remove the start command at the beginning of one line in the batch file.

-eslave

AnnaFan777
15th February 2009, 03:34
AnnaFan777, I believe the technique you're describing is pretty-much how the other anaglyph-to-stereo-pair methods are accomplished - except replace 'motion estimation' with 'edge-matching' or 'feature-tracking'. This is unlike anything fauxD presently does. I think it would require per-block or per-line matching methods, and I probably wouldn't be doing that in real-time. I'm reasonably certain there are AVIsynth tools capable of doing what you're talking about, but that would almost constitute another pet project in my opinion.


Thanks, do they have some special software for this?
i suppose they are not using avisynth?

eslave
19th February 2009, 11:37
Actually, I still think AVISynth would be a good place to start. :cool:

I've never found anything about software deanaglyphing for video except that guy at UNDERGROUND 3D CINEMA, but he writes his own stuff (private). The links I posted (http://forum.doom9.org/showthread.php?p=1244315#post1244315) are all the leads I have...until now (http://forum.doom9.org/showthread.php?p=1251868#post1251868).

Get your De-Anaglyph test script here. (http://forum.doom9.org/showthread.php?p=1251868#post1251868) (I'd like to keep the discussions separate. I don't want this thread to become a catch-all for everything 3D.)

Your original idea was right. I hadn't foreseen the logical conclusion of all that edge/feature-tracking.

-eslave

Fizick
20th April 2009, 19:50
Here is the message i have got from Jeff C:
On WinXP SP2, after...
1) placing fauxD.avsi, fauxD.dll, fauxD.cmd, mvtools.dll, mvtools2.dll, fauxD_batchsample.avs and project mpgs in one directory,
2) changing fauxD.AVSI, fauxD.CMD and fauxD_ffdshowsample.avs or fauxD_sample.avs paths & filenames accordingly,
3) paste fauxD_ffdshowsample.avs lines into ffdshow's avisynth config dialog (and enable it's checkbox),
4) then drag and dropping fauxD_ffdshowsample.avs into mplayerc.exe (Media Player Classic),
this results in the dialog box appearing, the MPC window is resized correctly, but NO images appear just a blank screen which seems to be playing but only once even though set to repeat.
I've tried both mvtools v2.2.1(adding a "V" to "MV.." functions) and 2.3.1 as well as drag and drop movies on fauxD.CMD then use fauxD_batchsample.avs in MPC with the same results: the FauxD dialog then a blank playing screen.
Please help with any instructions/advise as soon as you've a moment as i'm excited as all who download FauxD to see it in action.
Thank you both so much for the great work,

I never tried FauxD.

godeep3d
25th April 2009, 21:10
Hello Eslave,..
and thanks for the excellent programming, esp. fauxD.
On WinXP SP2, after...
(A)
1) placing fauxD.avsi, fauxD.dll, fauxD.cmd, mvtools.dll, mvtools2.dll, fauxD_batchsample.avs and project mpgs in one directory,
2) changing fauxD.AVSI, fauxD.CMD and fauxD_ffdshowsample.avs or fauxD_sample.avs paths & filenames accordingly,
3) pasting fauxD_ffdshowsample.avs lines into ffdshow's avisynth config dialog (and enable it's checkbox),
4) then drag and dropping fauxD_ffdshowsample.avs into mplayerc.exe (Media Player Classic),
...this results in a blank, uneditable dialog box appearing without Shift or Skew sliders, the MPC window is resized correctly, but NO images appear just a blank screen which seems to be playing but only once even though set to repeat.
I've tried both mvtools v2.2.1(adding a "V" to "MV.." functions) and v2.3.1 as well as drag and drop movies on fauxD.CMD then use fauxD_batchsample.avs in MPC with the same results: the FauxD blank dialog appears then a blank playing screen.

(B)
Then i used the complete fauxD tester program and pasted "fauxD_for_testers.avs" template in the project directory as "1b_fauxD_for_testers.avs" with all other files in common. I then edited its lines as follows:
EDITED : Import("fauxD.avsi")
EDITED : stereo_mode = 2 # 0 = Red-Cyan Anaglyph, 1 = Over-Under (Right Above, Left Below), 2 = Side-By-Side (Left, Right), 3 = shutterglasses (pure AVS, Left=Field1)
EDITED : f="C:\Documents and Settings\JeffCottle\Desktop\Best Realtime 2d to 3d with DDD Tridef Media Player using instant Depthmap\fauxD\All\ep2_clone_war_p640.mpg"
DISABLED: #out = ConditionalFilter(flat, flat, stereo, "YDifferenceFromPrevious()", ">", String(scth), false ) #faster than RGB?
ENABLED: out = ConditionalFilter(flat, flat, stereo, "RGBDifferenceFromPrevious()", ">", "30", false ) #for RGB clips, slower?
ENABLED: out = out.ConvertToRGB24 #for TMPGEnc, VFApi, or any other application limited to 24-bit RGB (8-bits per color/channel)
This fixed the blank playback and resulted in...
1) the same blank,uneditable dialog but this time 2 full color frames finally displayed side-by-side BUT without stereoscopic or Pulfrich effect and..
2) the following message overlayed: "RGB Difference: RGB difference can only be calculated on RGB images ([Conditional Filter, Expresion 1], line 1)"

I found no reference to "RGBDifferenceFromPrevious" functions anywhere except fauxD_for_testers.avs so does FauxD support it?
How do i get a visible stereoscopic or Pulfrich effect with FauxD on a PC (WinXP SP2)?
Please help with any instructions/advise as soon as you've a moment as i'm excited as all who download FauxD to see it in action.
Thanks again for the great work,
Jeff Cottle: 780 425 4914 (please feel free to call)

Wilbert
25th April 2009, 22:22
I found no reference to "RGBDifferenceFromPrevious" functions anywhere except fauxD_for_testers.avs so does FauxD support it?
See documentation of ConditionalFilter. It expects a RGB clip. If you apply it to a YCbCr you need to enable

DISABLED: #out = ConditionalFilter(flat, flat, stereo, "YDifferenceFromPrevious()", ">", String(scth), false ) #faster than RGB?

and disable to other one. Note, i never have used fauxD. So, i'm just guessing here ...

godeep3d
26th April 2009, 02:56
Hello Wilbert,..
really appreciate your reply.
1)
You'd written "See documentation of ConditionalFilter. It expects a RGB clip."

But on my 2nd attempt i'd added and enabled the line...
flat = flat.ConvertRGB
...to send an RGB clip to the ConditionalFilter but recieved the same error. Is there a function to determine the colorspace of my ep2_clone_war_p640.mpg clip?

2)
You wrote:"If you apply it to a YCbCr you need to enable...ConditionalFilter(..YDifferenceFromPrevious..)"

This was enabled on my 1st attempt resulting in blank playback.

Gavino
26th April 2009, 11:54
on my 2nd attempt i'd added and enabled the line...
flat = flat.ConvertRGB
...to send an RGB clip to the ConditionalFilter but recieved the same error. Is there a function to determine the colorspace of my ep2_clone_war_p640.mpg clip?
The colorspace of your source clip is irrelevant here.
For the changed ConditionalFilter line to work, both 'flat' and 'stereo' need to be RGB.
So your "flat = flat.ConvertRGB" needs to come before the line
stereo = stereo.MatchPixelFormat(flat)

[I don't really know anything about fauxD either, so this is just based on looking at this section of the code.]

godeep3d
26th April 2009, 18:57
Hello Gavino,..

[QUOTE=Gavino;1278335]..So your "flat = flat.ConvertRGB" needs to come before the line
stereo = stereo.MatchPixelFormat(flat)

..as seen in the code segment below my RGB line did preceed the stereo line but still resulted in the RGB Difference error message. I've attached my project 1b_fauxD_for_testers.avs in Jeffs_fauxD_for_testers.zip for you or anyone with a little time to diagnose the problem. And the project movie can be downloaded from: ftp://ftp.fh-schmalkalden.de/pub/multimedia/ep2_clone_war_p640.mpg

(EXAMPLE CODE SEGMENT):
#flat = flat.ConvertToYV12 #for YDifferenceFromPrevious
flat = flat.ConvertRGB #(MY METHOD)
stereo = stereo.MatchPixelFormat(flat)
out = ConditionalFilter(flat, flat, stereo, "RGBDifferenceFromPrevious()", ">", "30", false ) #for RGB clips, slower?
out = out.ConvertToRGB24 #for TMPGEnc, VFApi, or any other application limited to 24-bit RGB (8-bits per color/channel)

Thank you all for every suggestion and any help,
Jeff

eslave
2nd May 2009, 07:05
Wow, it feels like I've been on the road for over a week...oh that's right, I have. The 'complimentary' wi-fi at most hotels seems more like an insult.

Jeff,

I also couldn't figure-out what was wrong at first, but I think I may know now. Also, if that's not a business phone number I'd remove it immediately. ;)


Please avoid using "fauxD_for_testers.AVS" unless you really like getting your hands dirty. The current version makes things much easier, IMHO. The old version is provided for historical and comparative purposes and I'd rather not address any of its numerous issues.
You should have MVTools v2.3.1 (or newer) named "mvtools.dll" (or whatever your LoadPlugin line says in 'fauxD.AVSI'). Oops! The name of the mvtools DLL as provided by Fizick is actually 'mvtools2.dll' (My error, please adjust accordingly. See next 2 posts).
By default FFDshow will not intercept the directshow filter-chain for MPEG1. Check the "Codecs" configuration tab in FFDshow.
Don't play "fauxD_ffdshowsample.AVS" directly. Just paste its lines into FFDshow (or Import the AVS if that's easier for you) and then play the video, not the AVS file. You were trying to create 2 instances of fauxD in the filter-chain. One by playing the AVS, and another within FFDshow. I imagine that's why you saw only 2 flat frames before it crashed. I have no idea how memory is shared with in-place filtering under such conditions, but its probably bad. I never foresaw a situation where this would be necessary and took no precautions for it.
The dialog was primarily for debugging purposes and I had ultimately intended to remove it, but some really wanted to see it. All the text fields are read-only. Shift and Skew were never fully implemented in the code so I removed the useless slider controls. I think you may be referring to this obsolete image (http://forum.doom9.org/showthread.php?p=1233011#post1233011) regarding a temporary test-script which was inadvertently quoted.

Please check these items against a freshly configured copy of fauxD.

While testing your sample I noticed the video is 30fps (according to GSpot (http://www.headbands.com/gspot/)), presumably a 24fps pullup(down?) as every 5th frame or so appears to be a duplicate (frequently results in a rather distracting flat image). You may want to try a basic pulldown (http://en.wikipedia.org/wiki/Telecine#2:3_pulldown) (see your AVIsynth docs) or possibly Restore24 (http://forum.doom9.org/showthread.php?t=75432&highlight=restore24) (I've never tried this), or just use the DVD source if you have it. (Enable "Raw Video" in the 'Codecs' tab of FFDshow. Somewhat slower in my experience, and you'd probably need to deinterlace it.) Being a movie trailer the cuts are rapid and intrusive, many of the panning sequences are too fast (eye-strain inducing), and the still scenes are - well - very still (I'm guessing that's audience psychology for intensifying the perception of drama with the alternating high-action, ho-hum sequences).

Here are some of my results: See the FFDshow dialogs in the last image. Ignore MPC's reported frame-rates as I was pausing and frame-stepping.

http://img38.picoodle.com/img/img38/2/5/1/t_FSep2m_b705c29.png (http://img38.picoodle.com/img/img38/2/5/1/f_FSep2m_b705c29.png) fauxD_sample.AVS (simplest form)
http://img38.picoodle.com/img/img38/2/5/1/t_DnDep2m_32d5577.png (http://img38.picoodle.com/img/img38/2/5/1/f_DnDep2m_32d5577.png) Drag-N-Drop/SendTo (fauxD.CMD + fauxD_batchsample.AVS)
http://img38.picoodle.com/img/img38/2/5/1/t_FFDep2m_ea4e4d7.png (http://img38.picoodle.com/img/img38/2/5/1/f_FFDep2m_ea4e4d7.png) FFDshow The upper FFDshow dialog is from another screen-shot.

Thanks to everyone who attempted to field this question as all the replies I saw were generally correct, but again this seems to have been a configuration issue (of sorts). I wish I could have responded sooner. :(

-eslave

edit:
I probably should have mentioned this months ago, but you need to disable MPC's internal Transform Filters for MPEG or FFDshow probably won't be used for those codecs.
http://img01.imagefra.me/img/img01/2/10/23/f_vt9989ovvmdm_39b6554.png (http://img01.imagefra.me/img/img01/2/10/23/f_vt9989ovvmdm_39b6554.png)

Fizick
2nd May 2009, 19:55
MVTools v2.3.1 (or newer) is named "mvtools2.dll"

eslave
2nd May 2009, 22:54
LOL! :) My mistake!

I've been working with a renamed copy for so long that I had completely forgotten. Thanks for catching that, Fizick! I even have it mis-named in the current release of fauxD.AVSI. I guess thats one more thing I'll need to fix for next release. :rolleyes:

It looks like I'm living in the past again as well. I've just noticed your update (v2.4.2) and I'm looking forward to testing it when I have some genuine spare time.

-eslave

travolter
29th January 2010, 14:51
I was testing fauxd and works great!!!

I hope more updates soon.. 3D is a nice boost for make low quality vids more interesting ;)

anyone know more projects like fauxd?

I know about 3dfier.. and I dont know how good compared with faudx.. there is a demo version available here: http://3dfier.blogspot.com/

wonkey_monkey
29th January 2010, 20:20
To save me downloading a slew of plugins and fiddling with the script, and also because I don't have any anaglyph glasses, can anyone explain, roughly, what this script is doing to create the faux-3D effect?

David

AnnaFan777
19th March 2010, 23:34
any chance of a 3d full color version ? (for shutter glasses)
doesn't have to be realtime.

rrrrob
24th March 2010, 16:56
Here's some cool converted 3D clips from my3d2u:

http://www.youtube.com/user/3dgeek2009

freemanvn
8th April 2010, 08:21
http://img19.picoodle.com/img/img19/3/1/2/t_fauxDsamplem_f0957f1.jpg (http://img19.picoodle.com/img/img19/3/1/2/f_fauxDsamplem_f0957f1.jpg) http://img32.picoodle.com/img/img32/3/1/2/t_fauxDsamplem_b40fd66.jpg (http://img32.picoodle.com/img/img32/3/1/2/f_fauxDsamplem_b40fd66.jpg) http://img33.picoodle.com/img/img33/3/1/1/t_fauxDsamplem_b01cc8d.jpg (http://img33.picoodle.com/img/img33/3/1/1/f_fauxDsamplem_b01cc8d.jpg)

Perfect movie,can you to send for me this script?
I try test the file fauxD_for_testers in FauxD_v012.zip but it's bad,movie no depth...please guide me with...thank you
(sorry my bad english)

wonkey_monkey
8th April 2010, 16:46
Here's some cool converted 3D clips from my3d2u:

http://www.youtube.com/user/3dgeek2009

Those aren't converted - they were always 3D.

I'd very surprised if a script could achieve those results!

David

eslave
9th April 2010, 06:00
Hmm, I guess I shouldn't be too surprised about the source of this recent resurgence in 3D interest. :) Alas, I still have not made any code improvements since v0.12.

travolter,
Thank you for your kind remarks! Making 2D videos 'more interesting' was my intent with fauxD. Surprisingly enough I also hadn't heard of 3Dfier until bumping into these (http://3dvision-blog.com/2d-to-3d-realtime-video-conversion-with-avisynth-proof-of-concept/) posts (http://3dvision-blog.com/2d-to-3d-realtime-video-conversion-with-avisynth-v0-2b/) a few (http://3dvision-blog.com/2d-to-3d-realtime-video-conversion-script-for-avisynth-v0-3/) months (http://3dvision-blog.com/the-3dfier-2d-to-3d-realtime-transform-filter-is-on-sale-now/) ago (http://3dfier.blogspot.com/). If I were to hazard a guess (judging purely from 3Dfier's filesize and speed) I would surmise that 3Dfier uses the same pulfrich technique as fauxD, possibly with some additional shifting or skewing. I haven't yet taken the time to perform a rigorous frame-by-frame comparison or disassembly, though I see strings like "ObjectDepth/Prop", "PulfrichOn/Prop", "TrapezoidEffect" and a lot of vector messages probably related to feature-matching/tracking for determining global motion (pan direction) or possibly some sort of Tri-Def-like mathematical wizardry.


davidhorman,
I don't like downloading plugins either, but fauxD's only dependency is mvtools2 (http://avisynth.org.ru/mvtools/mvtools2.html). There isn't really much script fiddling required except the two LoadPlugin lines and maybe changing your 3D frame-type. There are three sample scripts included in the archive, and this post (http://www.dvinfo.net/forum/3d-stereoscopic-production-delivery/474195-using-one-camera-making-3d-post.html#post1495905) has a pretty good installation explanation as well. The fake-3D effect is called the pulfrich effect/illusion (http://en.wikipedia.org/wiki/Pulfrich_effect) and my implementation is explained with greater detail in the documentation as well as in these posts with morsa (http://forum.doom9.org/showpost.php?p=1234085&postcount=24). I was also mildly impressed by rrrrob's clips until I realized what they were. You could probably get results close to that with fauxD and its unused shift/skew functions, but it would almost certainly require painstaking effort on a per-scene basis. Maybe if I ever get around to incorporating OpenCV (http://opencv.willowgarage.com/wiki/) or some kind of horopter manipulation into fauxD then it might produce results like that without user intervention, albeit at tremendous CPU cost.


AnnaFan777,
Waaay ahead of you, buddy. :cool: Change the stereo_mode parameter in your fauxDit call for interlaced shutter-glasses. (Whether you specify true or false the frames will be interleaved with the AVSI script, not with the plugin.)
Import("D:\somepath\fauxD.avsi")
fauxDit(someclip, 3, 40, false)
My "logic" was to double the frame height so that each eye will have a full-resolution view (instead of the effective vertical resolution being halved). You can horizontally scale the final output to correct its aspect ratio, but do not vertically scale the final output or the stereo effect will be ruined. This worked fine for my shutter-glasses in interleaved/interlaced mode when I had a CRT monitor. I have never seen my LCD shutter-glasses work in either the "Page-Flip" or "Over/Under" modes. Unfortunately, my new LCD monitor is too slow (cheap) to work properly with shutter-glasses and I haven't experimented with them for quite some time now.


freemanvn,
Sample scripts are provided in the archive (like this (http://img38.picoodle.com/img/img38/2/5/1/f_FSep2m_b705c29.png), see more here (http://forum.doom9.org/showpost.php?p=1280573&postcount=41)). Please DO NOT use 'fauxD_for_testers.avs'. Including it in the archive has proven to be a mistake as it only seems to add to the confusion. It was only included for comparison with the current version and for anyone needing a 'top-down' perspective of the process before it was broken-up into functions. After configuring the LoadPlugin lines in fauxD.avsi for your system a two line script should suffice:
Import("D:\somepath\fauxD.avsi")
fauxDit(DirectShowSource("D:\somepath\somefile.ext"), 0, 40, true)

-eslave