• Editor
  • [Feature Request] Masking

Related Discussions
...
Shiu wrote

-1000000 to masking! Ha! your idea has now been downvoted ๐Ÿ˜›

Nah seriously, we would love to do this, but the workload is already huge. I honestly don't know when we can get to it. For now I suggest using a bounding box as a mask. You won't be able to actually see the masking in effect inside of Spine, but at runtime you can write some code to make the magic happen.

How might you actually use a bounding box to create an animated mask? Is it possible?

a month later
Shiu wrote

-1000000 to masking! Ha! your idea has now been downvoted ๐Ÿ˜›

Nah seriously, we would love to do this, but the workload is already huge. I honestly don't know when we can get to it. For now I suggest using a bounding box as a mask. You won't be able to actually see the masking in effect inside of Spine, but at runtime you can write some code to make the magic happen.

Sooo.. I've come to want this feature, too. Last time you said something about this was 5 months ago.. Maybe something changed or is even in the works?

If not: You said something about using a bounding box as a mask. How would I go about doing this (can you point me in the right direction?)

Thanks!

Unfortunately there is still no masking yet.

To use a bounding box for masking you would grab the bounding box vertices at runtime and use them to apply masking using your game toolkit before rendering the skeleton. Eg, for OpenGL you can use the stencil buffer. In a nutshell, you enable writing to the stencil buffer, render white pixels everywhere you want drawing to happen (eg you'd use the bounding box vertices to render a white polygon), then you'd enable the stencil buffer for masking, then render the skeleton and it will only render where the bounding box is at. Another way with OpenGL is using glScissors, but this only gives you axis aligned clipping. That may be enough and you could still use bounding box vertices to determine where to clip.

6 months later

Hi guys, I don't want to open any old wounds, but I just wanted to ask if there has been any progress with this? Thanks ๐Ÿ™‚

Nate wrote

Unfortunately there is still no masking yet.

To use a bounding box for masking you would grab the bounding box vertices at runtime and use them to apply masking using your game toolkit before rendering the skeleton. Eg, for OpenGL you can use the stencil buffer. In a nutshell, you enable writing to the stencil buffer, render white pixels everywhere you want drawing to happen (eg you'd use the bounding box vertices to render a white polygon), then you'd enable the stencil buffer for masking, then render the skeleton and it will only render where the bounding box is at. Another way with OpenGL is using glScissors, but this only gives you axis aligned clipping. That may be enough and you could still use bounding box vertices to determine where to clip.

What about WebGL? When we used that method the FPS drops insanely low from 40 to 10 just with 3x small masks rendered in same time on a screen.

a year later

Most gaming studios have separate design and development teams and departments and very possibly in deferent locations. for example, our company's design and development departments separated by 2 continents!
as a designer or Character rigger, we always prefer to do most of our animation in-house that way we have better control in the final result.
also, I'm not sure what percentage of animators going that extra mile to learn the coding for a simple/indispensable masking ability!
by the way not sure in the feature still missing or it is somehow created which is led to another subject regarding the lack of tutorials and useful help documentation.

It's coming in the next 3.6 version.

Nate wrote

Image removed due to the lack of support for HTTPS. | Show Anyway

Clipping will be in 3.6.13-beta, which we'll release tomorrow. ๐Ÿ™‚