Can we mask out parts of the rendered PlayCanvas screen?

Hi,
What I mean is this:
Is it possible to define a texture (eg. part of the ui plane?) that overlays the whole screen and then use this texture as a mask for the rendering beneath it?

The reason for this is that I would like to create different transistion effects for the transistion between a PlayCanvas screen and an underlaying Html page.

You could use a stencil buffer / stencil testing for it. A simper version of this example:
https://playcanvas.github.io/#/graphics/portal

1 Like

An Editor example can be found here: Stencil Buffer - 3D Magic Card | Learn PlayCanvas

Wow, what an incredible interresting source of examples!
Why did I not know this?
Why is there no link from the PlayCanvas site to this? It is so valuable!

1 Like

Thx for all the great examples! I can work with this.

Generally, they aren’t Editor friendly/easy to understand if coming from the Editor. That real question is why some of the examples are not in the tutorials :wink:

Wat does Editor friendly mean? Does that mean we can not do those things when using the Editor? Or that it is to difficult to figure that out?

When we skip the Editor, would those things be easier for us to implement?

You can implement them in the Editor just fine, but some things are typically done differently in the Editor, using UI. For example that specific example adds layers in code, but in the Editor, you add them using the UI. If you add them in code, you need to do everything else with layers in code, as they don’t show up in any UI.

Everything those examples do can be done in the Editor, but you need to understand them. People looking for examples typically want to just copy & paste and done, and this is not that.

1 Like

I did do a video explaining some of the differences and how you could ‘port’ them to the Editor here:

2 Likes

Thanks.

I start to wonder if it would be better that we start our next project without the editor.
Can we get more out of PlayCanvas when not using the editor?

You get the same engine under the hood, and whatever is not exposed in the editor UI, you can always access using the editor scripts. So you get the same functionality under the hood, but with the Editor you get a user friendly way to edit the Scenes and inspector and all that stuff.

So it depends on the project.

With the engine only project, you pick an engine and can stay with that engine version, completely offline using your own version control. When you’re ready to update to newer version, you can do so at your convenient time, instead of when we release a version. Great advantage for some projects.