# make mesh portal with geometry nodes?

IS it possible to make a portals ( planes ) which can be transition some vertices through the wall to the another plane?

Has anyone ever seen anything like this?:

• tags: tile trim grabdoc bake Commented Apr 15, 2022 at 12:47

Be aware of that you might have to change some values that it works for the size of your geometry!

This is my node tree:

result:

• cool result! Thank you! actually i am trying to improve the GrabDoc addon </br> Is it possible in this way to add offset on both sides so that the torn edges are not visible? </br> It is necessary for the clear baking of the trims Screenshot Commented Mar 24, 2022 at 10:47
• You are welcome. I think the higher the subdivision is the better will be the edges. Commented Mar 25, 2022 at 13:03

The basic idea of "portal" is that when your objects move across (or past) a position (1st portal), the vertices on your objects are somehow separated and translated to the opposite position (which is on the other side where the 2nd portal is located). This can be achieved if the things below are known:

a. The position of the 1st portal & 2nd portal. We can retrieve this using 2 Empties as our controllers so that we'd be able to manipulate the position through the Empties.

b. The length/distance of all the presented vertices on your objects (which will be calculated from the world space's origin point [0,0,0]).

From (a), you can use some vector math calculations to get:

• The distance from 1st portal -> 2nd portal.
• The directional vector which points from 1st -> 2nd portal.

-> Once you get the distance from 1st portal -> 2nd portal, divide it by 2 to get the distance limit threshold which you'll need to be able to determine (at what distance/length) the vertices will be separated.

->Take that distance threshold and compare it with (b). This will allow you to tell Blender only to separate those vertices that pass the portals. Combine this with the directional vector from portal 1st -> 2nd portal + the distance between the two, you'll also be able to tell Blender to translate the separated vertices from before to the position of the 2nd portal. In case the separation (or cut) is a bit "loose" or still has some remaining vertices left that haven't been fully separated, you can always adjust the threshold to "tighten" it a bit.

Here's the full setup.

The result:

In case you want to make these portals look a bit more interesting, here's a bit more advanced set-up where the object's twisted/bent once it gets closer to the portals.

I have also attached a blend file in case you want to take a look at it later.

• Thank you for your help! but i cant download the Blend file Commented Mar 24, 2022 at 10:48
• @SergeyIvanov Sorry about that and thanks for notifying me! I'd fixed the uploaded blend file, you can download it now. Commented Mar 24, 2022 at 11:08