Research done in Blender, which after a long time, is available for you to learn and download. This tutorial is long and complicated, so splited into 2 parts:

PART 1: Shows you the steps to prepare a room with objects and shows how to use calculations using Drivers. You must download the file expressions.txt or PortalTheFirstResearch.zip.

PART 2: Shows how to make the rendering of the Portal effect. If you want to skip the PART 1, I recommend downloading the file PortalTheFirstResearch.zip, access the TUTORIAL folder and watch PART 2.