Jump to content
Sign in to follow this  
Guest

Display an animated picture / vidéo with alpha.

Recommended Posts

Guest

Hello everyone,

Does anyone knows if I can display an animated picture with an alpha layer in a dialog / display ?

If not I will take a look myself. This thread is just for helping me saving some time and tell people if that kind of thing is possible.

Thanks.

Share this post


Link to post
Share on other sites
Guest

I don't think you understood the question. It's not how but does it work. I want to know if I can display an animated gif for exemple.

Share this post


Link to post
Share on other sites

In the vanilla game there are some animations which are done by creating a series of RscPictures with each animation frame as their texture. And then some script goes through them with ctrlShow. (I guess. Haven't seen the actual related scripts.)

Or you could create just one control and change its texture with ctrlSetText.

Share this post


Link to post
Share on other sites
Guest

Yeah so I need a frame by frame thing... I'm disapointed there is no "video" format allowed in Arma. I will have to compress the .jpg to have the smallest size possible.

It would be definitively easier to support a video format.

Share this post


Link to post
Share on other sites

Yeah so I need a frame by frame thing... I'm disapointed there is no "video" format allowed in Arma. I will have to compress the .jpg to have the smallest size possible.

It would be definitively easier to support a video format.

JPEG doesn't support alpha either, right?

 

You can play normal opaque videos in .ogv format.

Share this post


Link to post
Share on other sites
Guest

Yeah just remembered that. I will need to use paa or tga sadly.

Thanks for the help I will take a look at that.

Share this post


Link to post
Share on other sites

There is a mission with this kinda thing init

Im at work but if you would like to see how they did it let me know ill post a drop box link

Share this post


Link to post
Share on other sites
Guest

I tried to simply display an image with alpha and sadly it does not work.

 

http://puu.sh/n2Bw3/0b8f22a46d.jpg

 

 

description.ext

class RscTitles {
	class TopHud: RscText
	{
		idd = 1100;
		duration = 1e+1000;
		movingEnable = 0;
		fadein = 0;
		fadeout = 0;
		name = "TopHud";
		controls[] = {
			TopHud_2
		};

		class TopHud_2: RscPicture
		{
			idc = 1101;
			x = 0.381406 * safezoneW + safezoneX;
			y = 0.016 * safezoneH + safezoneY;
			w = 0.5;
			h = 0.5;
			colorBackground[] = {-1,-1,-1,-1};
			text = "20.paa";
		};
	};
};

Share this post


Link to post
Share on other sites
colorBackground[] = {-1,-1,-1,-1};

Should this be 0,0,0,0 for transparent background?

Share this post


Link to post
Share on other sites
Guest

Nope, it does not work

Share this post


Link to post
Share on other sites

Nope, it does not work

Yeah, you're right. It wasn't that.

 

I tried your class definitions and the image was transparent as it should. So I guess your .paa is faulty? Recheck it with TexView to see if the background is transparent.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×