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?:
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?:
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:
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:
-> 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.
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.