How to do this? Cut Off Dimension/Portal Effect discussion

0:50 to end of this video-

I can’t find any good tutorial on this. How to do this in runtime? seems like he used sphere ‘cutoff’ material (not sure if that’s a thing) or… i don’t know… material dissolve effect? :expressionless: I am not even sure what I should call it, Dimension change/portal/cutoff effect/dissolve?

I am not sure if its possible to achieve this ‘dimension change effect’ using material dissolve… because he could change the camera angle or move inside the sphere and see mesh on the far side like a portal.

He may have use a scene capture.
For the dissolving effect just a noisy-gradiant-alpha stuff?

It’s just a sphere mask.

thanks a lot… I managed to do that.
My actual target was to make some invisible actor visible to player camera, and some visible actor invisible. How can I do that?

  1. This method seems to be only working with same material type(all objects and ray traced sphere have to be made of same master material)? any way to make a mask where different materials can be shown via ray traced sphere?
  2. also, I want to change the ray traced sphere to… a square? I can’t find any way to change the shape?

Yep, the meshes that need to be masked must have the same masking logic in their materials, you can’t mask a mesh otherwise.
You can add the same masking code to multiple materials if you need to of course.

If you just need an actor to be completely visible/invisible you can do that via blueprint (set visibility to true/false).

Would a clip plane work?

clip plane will not work for me… because my invisible enemies will be at a distance from the invisible-enemy-tracker-glasses.

basically i want inverse of this- Occlude specific object/actor behind actor/material. - Rendering - Unreal Engine Forums

where invisible enemies behind a glass(but 10 meters away from glass), will be visible to my camera

That looks like it’s done with a SceneCapture2D component (which is expensive, that essentially renders the scene twice which will half your fps).

If you still want to go with that approach then basically how it works is you set an array of actors that you want to hide to said SceneCapture2D component (for example you could set it to hide all skeletal meshes) and then place the resulting rendered image in a plane mesh which then you can put in front of the camera.

I don’t want to do scene capture 2d unless i want to make portals :stuck_out_tongue: which i am not.

i was wondering if i can just change ray traced sphere to ray traced rectangle or box or something like that, then put the ray traced box in that window… can’t find any clue…


I think the function ‘Box Intersection’ went into 4.13. It doesn’t have a ‘bool hit’ output but you can just check if T1 is greater than T0 I believe. Or check if box thickness is >0.

Note that it is an axis aligned box by default. If you want to rotate it, you need to inverse transform the Ray Direction into the rotated box transform.

Could anyone help with adding the emissive noise to the edge of the RayTracedSphere?