Strange alpha problem

Hi,

I am totally new to vvvv, and when I wanted to create a simple ‘black becomes transparent effect’, I found the alpha_video effect. Only the strange thing is that I see the ‘visible’ part of the video twice, one of them mirrorred.

So I started editing this shader, and even with this very simple function, I see the ‘normal’ image (video or file texture), and I see the ‘mirrorred’ image shine through the first one, and it gets more visible when I decrease the alpha value.

float4 psAlpha_VideoBetween(vs2ps In): COLOR
{
//source texture lookup
float4 outColor = tex2D(SrcSamp, In.TexCd);
outColor.a = 0.8f;
return outColor;
}

Does anyone know why this happens? Is it normal, or do you think it’s a problem with my specific setup (working on a XP SP3 laptop with ATI Radeon X1250)

hello.PNG (8.7 kB)

Try to open your Render with Inspektor (Ctrl-I) and set DX24 in Depth-Buffer Format…

I changed it to D24X8, leaving the backbuffer format to X8R8G8B8.
(I couldn’t find DX24 as an option, only D24X8, D16, D16_lOCKABLE)

At first sight, that seems to do the trick, and it seems logical that it wouldn’t work without it. I also needed to disable clear depth buffer for it to work.

Anyway I don’t have a clue as to where this mirrored image comes from. I mean, the pixelshader doesn’t do that, and that’s the only thing I do with the texture. Do you know why I get that effect?

Is there a ‘standard’ node that simply adds an alpha-channel to a video? Because I want to combine different textures on one screen with a GROUP node, and they only behave the way I expect them to when they all have an alpha channel.

Thanks!

http://vvvv.org/tiki-download_file.php?fileId=613

Is a lumakey shader, the one your using is for prepared videos with the alpha channel specified in the bottom half of the image.

The one I was using has 2 modes, one that uses the lower half, and the other mode (which I used) makes everything below a certain luma value transparent, which is more or less what I need.

That doesn’t really matter since I changed it for testing, as I mentioned in an earlier post, to simply set the alpha value to 0.5

So I am still trying to figure out where the mirrored image comes from…

it is possible, that the mirrored image comes from a spreaded input, transform or texture transform… have you checked all pins that they have only one vlaue?

Hi,
do you have a samplepatch? Thats much easier for helping.

For this example I used the RGBContrast_2 effect (for which you can find the link in an earlier post from catweasel).

The example works, but when I disable the depth and alpha buffer, or when I choose clear alpha buffer (when exactly does that happen?), I see the image twice, once mirrored, as you can see in the added right_and_wrong.png.

I would suppose that disabling the depth buffer wouldn’t add an alpha channel to my video, but that shouldn’t change the image in any way, should it?

mirrored.7z (3.8 kB)

No idea what your attached file is about. No v4p patch available? MAy be including your texture?

It’s a 7-zip file, unzip with http://www.7-zip.org/ or any other program supporting 7z.

It contains a v4p and a texture and an image showing what I get with alpha channel enabled and disabled.

for your convenience

mirrored.zip (4.8 kB)

It’s what it had to be, you seeing the backside of your’e box.
try quad instead

Oh, I like to be served ;)
It was just a little thing - you took a box as input mesh. So, your texture will be put on all six sides of a box. The second mirrored image was image of back side.
For plain 2d-images best option is a mesh which is just sort of canvas. I added some toggle-switches for explaination in you patch. Play around with them to see what happens. (fill.node goes between a solid-common view, point-view and grid-view, which is nice for seeing mesh only)

edit: antokhio was faster :D

mirrored.zip (9.2 kB)

Now I see where I went wrong (as you can see I didn’t quite understand what the ‘box’ node did)

Thanks guys!