Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / transparent video?

Author
Message
Daniel wright 2311
User Banned
Posted: 10th Mar 2010 02:07 Edited at: 10th Mar 2010 02:11
ok, so I can make a animation loop to a image with no problem, wich if you ask me is pretty cool. but is there any way i can make the video its self transparent except the guy who is in the animation?

as seen here

http://www.youtube.com/watch?v=1iWNQ6cw-WM

Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 10th Mar 2010 03:01
Are you trying to make a clone of the app shown in the vid? Or are you wanting to take a vid with a black background and make the figure show up without the black background?

The fastest code is the code never written.
Daniel wright 2311
User Banned
Posted: 10th Mar 2010 04:11
I am wanting to take a video with a black background and make the figure show up without the black background.

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 10th Mar 2010 08:17
When you display the animation on your target, (Either a plain or a sprite) then simply enable transparency on it. (Either set object transparency, or set sprite) As black is the default transparent colour, it'll work.



My signature is NOT a moderator plaything! Stop changing it!
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 3rd May 2010 23:59
Further to this question...

What if you wanted to use green (for example)? Do you need to set the colorkey for the animation? If so how?

I'd really like to use this for something I'm working on at the moment...

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 4th May 2010 01:01
I've never done it, but you would assume that the object takes on the colour properties of the texture used - and the avi on a plain is only a glorified animated texture.

So, if the avi has a green background and you set that colour to be transparent for the plain, it too would be transparent.

But, I await being corrected!...

What springs to my mind is the compression codec you would have to use.

My first thoughts are that using something like XVid or DivX would be very similar to setting a transparent colour for a JPG - ie there are lots of areas which look green but on closer inspection they aren't - they are a slightly different shade, meaning there would be lots of non-transparent speckles everywhere.

TDK

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 4th May 2010 11:19
Maybe I'll just use a scrolling image or multiple images then...

I'll experiment! If I get any answers I'll post them here.

Login to post a reply

Server time is: 2026-07-26 04:28:02
Your offset time is: 2026-07-26 04:28:02