Correct way to achieve Portal Effect


I’m reaching you out to know what is the right way to create a portal effect like Encounters Dinosaurs or Synth Riders :

This is not really documented and i’m struggling a lot …

I see this topic is a little bit relative to this one but there is no clear answer …

And also this one, it mentioned the ARBasicOcclusion, it’s seems to be a way to achieve what i want, but I don’t understand how to use the shader … if someone can explain it to me, it will be awesome !

Thanks a lot

You can create a material with the occlusion shader and set that shader to the virtual object that you are using to occlude virtual content. I can put together another small demo to show this off and will post it here in a bit.

Thanks you very much because I think I’ve done what you are describing, but i’m sure I’m missing something obvious.
I’ll try your demo as soon as possible

Hey Dan,
Facing similar issues. I’d love a demo of how to accomplish this. Thank you in advance!

Hey @GabrielTargo and @Lexokon sorry about the delay. Try importing this package into a project that has the PolySpatial Package Samples already added.

Here’s a small video of the scene

How the scene works:

It’s an unbounded scene that has a small 3D scene that is “hidden” behind 4 planes. The 4 planes have an occlusion shader applied to them. I then animate the left and right planes in the outward direction to “reveal” the scene. The planes also have colliders so the virtual objects bounce off the outside of the portal but are able to pass through the inside of the portal.

Hope this helps, I’m working on adding this as a package sample for future releases.


Awesome Dan thank you very much for the quick response!