Dickensian

video alpha channel approaches

Recommended Posts

On 9/8/2016 at 1:41 AM, tranlong021988 said:

 

This is a solution using chromakey Shader for video texture: https://makc3d.wordpress.com/2014/04/01/transparent-video-texture-in-three-js/

It's working with threejs but you can implement Chroma Key Shader to BabylonJS with a little modification. 

 

I keep coming back to the above Three.js demo, as it's already passed through a few versions and issues such as normalizing color has shown to be less useful in the final demo. I had to abort this currently, as I have a new build due with GUI and form changes tomorrow. But looking at the examples of the basic framework adjusting transparency, we shouldn't be that far away. I'm glad to see @Pryme8 on this, as he's already ahead of what I was building by making the code MUCH simpler.

I would however, love to see support of .webm alpha channels, as this should work in most every browser currently. And their are newer H.265 formats coming soon which support an alpha channel with very little overhead.

DB

Share this post


Link to post
Share on other sites

In case anyone else stumbles on this thread like I did yesterday, here is a working example on how you can faux do this. Basically rather than use a transparency channel I discard black pixels, and allow a discard threshold to be set, which will call discard on any pixel whose sum of r.g.b < discard threshold.

https://www.babylonjs-playground.com/#TQUA6H

I am however having some issues with video textures/instances but going to open a separate issue for that.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.