Bik video alpha layer

Ask questions, discuss ideas, get answers
Post Reply
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Bik video alpha layer

Post by fo0k »

another eternal holy grail..

I have managed to spit out a bik file with alpha layer in it (and tested using the advanced play options of rad tools player).. so i know it exported correctly from Sony vegas.. into rad tools.. and out as a bik.. it's attached and has alpha layer.. I promise.

however, using a simple 'transparent true' is not having any effect in game..

I know Apache has tried this.? How far did you get? ever manage to create the bik with alpha? and more shader settings that might help get this working..?

holographic screens.. rain on windows... who knows.. loads of fun opportunities if it will work..
example_bik_with_alpha.rar
(13.42 KiB) Downloaded 806 times
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Bik video alpha layer

Post by Apache Thunder »

I achieved alpha in my river animation in the BFH mod by replacing the alpha layer with all black. (so in effect the video has no alpha), then used one of the blend source commands in the RS file to add transparency. But it's not perfect. Main issue is how it blends with the map's fog. It causes it to shine and such. I may play around with BIK textures further once I port some of the new things from the new map for BFH. There are a few new objects that I would need to make new animated BIK files for and I may give it another go. If I do ever succeed at it, I'll be sure to let you know. :D

Also I made a new skydome mesh with animated clouds on it that came out really nice: (also shown in video is how the river looks. The alpha via blendsource is shown here and will give you an idea on what to expect on that if you try that method)



Let me know if you're interested in trying them out in a map. ;)

So far I have two versions. One with darker clouds (for rain maps) and one with brighter clouds for winter maps.

EDIT:

Alright here's what appears to the best result you can get:

Code: Select all

	transparent true;
	blendSrc DestAlpha; 
	blendDest one;
The result:

Close up:
Image

Distance view:
Image


Only issue now is the opaque areas aren't 100% opaque. But the main improvement is the areas with alpha don't have blend issues with the fog and so there won't be any shining like with my river mesh. :D
ImageImageImage
I have cameras in your head!
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Bik video alpha layer

Post by fo0k »

Well this is pretty good! if not a perfect fix :)

could you explain in more detail what those two snippits of code do ? (I can 'see' what they do but would be good to understand)

blendSrc DestAlpha;
blendDest one;


map looks great btw.. hard to see the clouds and water though as you never stop moving! heheh
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Bik video alpha layer

Post by Apache Thunder »

I don't know a whole lot about how the codes work. I only know what the result is from using them. :P I would imagine they are alternate blend methods for transparency.
ImageImageImage
I have cameras in your head!
Post Reply