It is currently 30 Apr 2017, 00:25



Flash Erase Blend Mode not keying in caspar

Videos, graphics, Flash templates – how to create and play them using CasparCG

Moderators: Macey, Jonas Hummelstrand, didikunz

Flash Erase Blend Mode not keying in caspar

Postby super-ienien » 28 Oct 2016, 15:41

Hi,

I have some troubles with a flash template where I'm using the Erase blend mode in order to mask some areas.

In flash everything looks great. But in Caspar CG the masked areas are black. They should be transparent...

Anybody knows something about this ?

Thanks
super-ienien
 
Posts: 12
Joined: 25 May 2016, 16:15

Re: Flash Erase Blend Mode not keying in caspar

Postby Jesper Stærkær » 28 Oct 2016, 17:35

It might be the same bug as you get with a vaniala TextField in CasparCG. Basically it calculates the wrong alpha, resulting in black areas.

I suggest enforcing CacheAsBitmap on your elements or a wrapper around your elements.
Jesper Stærkær
Independent Consultant at SuperFly.tv
User avatar
Jesper Stærkær
 
Posts: 841
Joined: 13 Apr 2010, 18:06
Location: Trondheim, Norway

Re: Flash Erase Blend Mode not keying in caspar

Postby super-ienien » 28 Oct 2016, 20:18

Hey Jesper, glade to see you :)

I tried to cache the clip that is in ERASE blend mode. It doesn't change anything.

I tested the swf in a browser. The transparency is good. So the problem is with caspar.
super-ienien
 
Posts: 12
Joined: 25 May 2016, 16:15

Re: Flash Erase Blend Mode not keying in caspar

Postby didikunz » 28 Oct 2016, 22:41

Set you system Like so:

SysSettings.PNG
SysSettings.PNG (591.82 KiB) Viewed 1460 times
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests
User avatar
didikunz
 
Posts: 3430
Joined: 10 May 2010, 09:08
Location: Aarau, Switzerland

Re: Flash Erase Blend Mode not keying in caspar

Postby super-ienien » 28 Oct 2016, 23:20

Yes I already did that. It doesn't change anything. Did you ever use a movieclip with blend mode set to ERASE in order to make a mask ? if yes did it work in caspar ?
super-ienien
 
Posts: 12
Joined: 25 May 2016, 16:15

Re: Flash Erase Blend Mode not keying in caspar

Postby didikunz » 28 Oct 2016, 23:31

super-ienien wrote:Yes I already did that. It doesn't change anything. Did you ever use a movieclip with blend mode set to ERASE in order to make a mask ? if yes did it work in caspar ?


No, never. Have you tried to set cacheAsBitmap = true on the target movieClip also (the one that is masked)?
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests
User avatar
didikunz
 
Posts: 3430
Joined: 10 May 2010, 09:08
Location: Aarau, Switzerland

Re: Flash Erase Blend Mode not keying in caspar

Postby super-ienien » 29 Oct 2016, 00:08

I will try that tomorrow but I don't think this is a good idea because the target movie clip contains a full HD flv video so bitmap caching will not work or if it does it will waste ressources.

If there is no solution for my issue do you think I should make a report on github ?
super-ienien
 
Posts: 12
Joined: 25 May 2016, 16:15

Re: Flash Erase Blend Mode not keying in caspar

Postby Jesper Stærkær » 29 Oct 2016, 01:16

I'm pretty sure there's a solution.

P.s..: blitting .flv manually from bytaarrays to bitmapdata gives you 3-5X performance gain...
Jesper Stærkær
Independent Consultant at SuperFly.tv
User avatar
Jesper Stærkær
 
Posts: 841
Joined: 13 Apr 2010, 18:06
Location: Trondheim, Norway

Re: Flash Erase Blend Mode not keying in caspar

Postby super-ienien » 29 Oct 2016, 16:25

@Jesper : Thanks for the tip about flv

So I tried everything and nothing worked. I give you a link to a very basic test case :

https://drive.google.com/file/d/0B7hQkH ... sp=sharing
https://drive.google.com/file/d/0B7hQkH ... sp=sharing

If somebody have an idea. It would be great :)

Thanks
super-ienien
 
Posts: 12
Joined: 25 May 2016, 16:15

Re: Flash Erase Blend Mode not keying in caspar

Postby sonny_xny » 31 Oct 2016, 10:57

super-ienien wrote:Hi,

I have some troubles with a flash template where I'm using the Erase blend mode in order to mask some areas.

In flash everything looks great. But in Caspar CG the masked areas are black. They should be transparent...

Anybody knows something about this ?

Thanks


The simple way to do this is using a PNG transparent file as a Mask.

This are the step :
1. If your Flash Template dimension in 1024 x 576 pixel
2. Create a new PNG file with the same dimension, I prefer using Adobe Photoshop to create this PNG Mask file
3. Create a new layer in Photoshop editor, click that new layer to start working on it.
4. fill certain area that you want to show in flash template (not trasparent), and leave the other as transparent, delete or hide layer "Background" if exist.
5. Save for web, choose "PNG-24", with option "Transparency" active
6. Put the PNG file into your Flash Template folder
7. On Adobe Flash Editor, import the PNG file into the library and put a name for that class, for example "myMask"
8. On ActionScript editor, you can apply the mask for your graphic or video :

Code: Select all
var AllMask:Bitmap = new Bitmap(new myMask(0,0));
{your graphic / video}.cacheAsBitmap = true;
{your graphic / video}.mask = AllMask;
addChild({your graphic / video});
stop();


Cheers,
Sonny
User avatar
sonny_xny
 
Posts: 109
Joined: 06 Jul 2015, 08:59

Re: Flash Erase Blend Mode not keying in caspar

Postby super-ienien » 31 Oct 2016, 11:32

Hi,

thanks a lot, I will try that. Just one question : Can I do it without as3 ? My scene is very complex and if i can get a real preview of the stage when i'm working on it, it would be esier for me.
super-ienien
 
Posts: 12
Joined: 25 May 2016, 16:15

Re: Flash Erase Blend Mode not keying in caspar

Postby sonny_xny » 31 Oct 2016, 12:21

super-ienien wrote:Hi,

thanks a lot, I will try that. Just one question : Can I do it without as3 ? My scene is very complex and if i can get a real preview of the stage when i'm working on it, it would be esier for me.


Well, I prefer to do using AS3 :)
for "complex" graphics and text, I will put all in a Sprite variable,
and then if I want to mask the final result just put a PNG transparent mask over the Sprite.

here the example AS3 code :

Code: Select all
var AllMask:Bitmap = new Bitmap(new myMask(0,0));
var mySprite:Sprite = new Sprite();

mySprite.addChild({your grapich #1});
mySprite.addChild({your graphic #2});
mySprite.addChild({your graphic #3});
mySprite.addChild({your graphic #4});
mySprite.addChild({your graphic #5});

mySprite.addChild({your textfield #1});
mySprite.addChild({your textfield #2});
mySprite.addChild({your textfield #3});


this.addChild(mySprite);
mySprite.cacheAsBitmap = true;
mySprite.mask = AllMask;
stop();
User avatar
sonny_xny
 
Posts: 109
Joined: 06 Jul 2015, 08:59

Re: Flash Erase Blend Mode not keying in caspar

Postby super-ienien » 02 Nov 2016, 13:47

Hey sonny,

The procedure you talled me is the same as doing a mask with the flash editor... So it does'nt solve my issue. What i need is doing an inverted mask. none transparent ares in my mask object are not shown in the masked object.

This is possinle using Erase blend mode but erase blend mode do not work in caspar.

So I'm back to the same point.
super-ienien
 
Posts: 12
Joined: 25 May 2016, 16:15

Re: Flash Erase Blend Mode not keying in caspar

Postby sonny_xny » 02 Nov 2016, 23:26

This is the screenshot from CasparCG Consumer Screen :

screenshoot.jpg
screenshoot.jpg (101.31 KiB) Viewed 1343 times


here are the modification of your Flash Template, I am using AS3 :

Code: Select all
import flash.display.Bitmap;
import flash.display.Sprite;

var myBGFill:Bitmap = new Bitmap(new polkadot(0,0));
var AllMask:Bitmap = new Bitmap(new myMask(0,0));
var mySprite:Sprite = new Sprite();

myBGFill.width = 1024;
myBGFill.height = 576;
myBGFill.cacheAsBitmap = true;
AllMask.cacheAsBitmap = true;
myBGFill.mask = AllMask;

mySprite.addChild(myBGFill);
mySprite.addChild(AllMask);

this.addChild(mySprite);
stop();
User avatar
sonny_xny
 
Posts: 109
Joined: 06 Jul 2015, 08:59

Re: Flash Erase Blend Mode not keying in caspar

Postby super-ienien » 02 Nov 2016, 23:58

Ok thanks for your answer. I did it like you said but with the erase blend mode my scene was much more simpler than with this AS3 masking method.

Too bad that caspar do not work with this "erase" blend mode
super-ienien
 
Posts: 12
Joined: 25 May 2016, 16:15

Re: Flash Erase Blend Mode not keying in caspar

Postby didikunz » 03 Nov 2016, 06:58

Thank you Sonny for taking the time and for the good work.
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests
User avatar
didikunz
 
Posts: 3430
Joined: 10 May 2010, 09:08
Location: Aarau, Switzerland

Re: Flash Erase Blend Mode not keying in caspar

Postby Jesper Stærkær » 03 Nov 2016, 13:21

20161103T131945.png
20161103T131945.png (1.08 MiB) Viewed 1320 times
I did a quick test and got Erase blend-mode to work.
Just change your Layer-mode to Normal for your maskee instance.
Jesper Stærkær
Independent Consultant at SuperFly.tv
User avatar
Jesper Stærkær
 
Posts: 841
Joined: 13 Apr 2010, 18:06
Location: Trondheim, Norway


Return to Content

Who is online

Users browsing this forum: No registered users and 1 guest