How do I create a 'clipping plane' effect?

Hi, i’m very new to unreal engine, I would like to know if there is a way to create a clipping plane for make a cut effect on object, like if they pass through a stargate or a portal, the game i’m planing highly count on that feature and may be used on more than hundred object

thanks in advance

Absolutely. You just need to supply a worldposition where you want that blend to occur. Use the Worldposition node and subtract the location of the portal object. Divide by the number of units you want the gradient to be, if its masked and not translucent it won’t matter as it will always be hard edged. If your portal is on a cardinal axis (ie, facing the X or Y axis perfectly) then it will be very easy as you just use that worldpos-portalpos value by componentmasking either the X or Y value. If you need to rotate the portal, then you need to either rotate or transform that resulting position by the portal rotation.

You might need to multiply by -1 to flip the gradient, and you may need to add an offset value.

Make this a material function. Then you just make any material you want to have the portal fade to be translucent or masked. if you wanted to be able to move the portal and instantly and cheaply update all the various materials that use it to point to the correct new location or rotation, use a material parameter collection.

For cool glowing edge effects, you can use that same gradient but manipulate the width or offset, or even use the gradient to look up into a texture to map a custom color gradient to objects as they intersect the portal. That is similar to how the imulsion lake material effect in Gears of War was accomplished.

Thanks a lot for your answer !! that actually work well.

I am a programmer and have very little experience with materials. Could you upload the material or show what you did to achieve it? Thanks.

I’m also interested in this. Could you explain it a bit more detailed Ryan? And If you’re creating a material, this effect will take place at the whole mesh I think?

Is there a way, if you have i.e. a big ship which is one mesh, to let it pass through the portal with a realistic effect? I mean like having a clean cut where the portal is located?

Sure. A simpler way to do it is to do:

dot( (WorldPosition - Portal Center) ), PortalNormal)

If the object goes into the portal, the result will be negative. otherwise it will be positive. This is from a more general plane equation.

If you’re trying to clip a mesh, then is worth a look.

Is there any way to fill in the hole in the mesh which is created by the clipping? To kind of ‘cap’ the ends?

Is there any way to fill in the hole in the mesh which is created by the clipping? To kind of ‘cap’ the ends?

This video has been removed.