Page 1 of 1

Possible 3D-effect for every hardware?

Posted: 11 Feb 2014, 18:35
by CosmicBlue
Hi,

some of you may have noticed these "new" animated 3D-gifs, showing some short scene from well known movies.
There you get a feeling for the depths of a picture without the need of 3D hardware (special monitor, shutter glasses or polarisation filter glasses or red/green glasses)
You find 5 of these pictures here:
http://www.pcgameshardware.de/3D-Thema- ... id=2144693

I am not sure, but might this be a technique, that may ad some 3D feeling to every game on every hardware?
For a FullHD (1920x1080) screen, put 4 vertical and 2 horizontal lines into the picture and everything with a z-coordinate smaller than x will pass these lines in front, everything with a z value greater than x will pass behind these lines.

You need a lot and a very dynamic, fast focus changing death of field for this and enough white (or black) lines (higher resolution, more lines) to create this effect and I have seen some gifs already, where these lines are smaller (not as wide in pixels), so they are less annoying.

Is this possible as a "simple" post process? Could it be added to a modification like ENB?

Re: Possible 3D-effect for every hardware?

Posted: 12 Feb 2014, 18:21
by ENBSeries
This is silly. Why not to render everything with wireframe mask then?

Image
Image

Re: Possible 3D-effect for every hardware?

Posted: 13 Feb 2014, 10:44
by CosmicBlue
Why silly?
And I am sure, you won't get the same effect with wireframe or if, it would look even more annoying than having "just" 2 white or black lines in the scene.

About your pics:
Second creates a nice 3D effect, but first one?...no way, not for me.

Re: Possible 3D-effect for every hardware?

Posted: 05 May 2014, 11:15
by charlievoviii
this is pretty stupid. You want 3D get a 3D screen with glasses or 3d head gear like Oculus rift.

Re: Possible 3D-effect for every hardware?

Posted: 05 May 2014, 19:21
by Insomnia
ENBSeries wrote:
Image
^This is making me dizzy. So wierd pic.

Re: Possible 3D-effect for every hardware?

Posted: 07 Aug 2014, 02:41
by number6
Maybe silly, but it would be interesting to try it in a shader. I think it could be implemented pretty easily with the depth information in enbeffectprepass.fx no?

Re: Possible 3D-effect for every hardware?

Posted: 07 Aug 2014, 03:41
by number6
How silly is this? :lol:

Image

Hahaha, no more 3d glasses needed!

To get this effect, I added this code to the end of the post pass function in enbbloom.fx:

Code: Select all

float4 PS_BloomPostPass(VS_OUTPUT_POST In) : COLOR
{
...
	// Adds white bars and border
	float lw = 0.01; // line width
	float screenEdgeX = 0.05;
	float screenEdgeY = 0.05;
	float barDepth = 0.75;
	float	scenedepth=tex2D(SamplerDepth, In.txcoord0.xy).x;
	if (
		(In.txcoord0.x < screenEdgeX || In.txcoord0.x > 1.0 - screenEdgeX) || // screen edge x
		(In.txcoord0.y < screenEdgeY || In.txcoord0.y > 1.0 - screenEdgeY) || // screen edge y
		(In.txcoord0.x > 0.33 - lw && In.txcoord0.x < 0.33 + lw) || // Bar 1
		(In.txcoord0.x > 0.66 - lw && In.txcoord0.x < 0.66 + lw)	  // Bar 2
	){
		if (scenedepth > barDepth)
			bloom = float4(1.0, 1.0, 1.0, 1.0);
	}
	return bloom;
}
Also add the scene depth sampler with the others if you don't already have it:

Code: Select all

texture2D texDepth;

sampler2D SamplerDepth = sampler_state
{
	Texture   = <texDepth>;
	MinFilter = POInT;
	MagFilter = POInT;
	MipFilter = NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};
Image

Enjoy your new Skyrim experience.

Thanks for the silly idea Insomnia!!
Thanks for the depth in the bloom shader Boris (and Prod80)

Re: Possible 3D-effect for every hardware?

Posted: 07 Aug 2014, 04:05
by number6

Re: Possible 3D-effect for every hardware?

Posted: 08 Aug 2014, 00:35
by number6
I mean thanks for the idea cosmic blue.