News for hackers. Stuff that matters.
Re:Portals and Quake by paulryanrogers on Friday January 10, 2025 @07:49PM (#42662206)
Interesting. I recall Prey being the first game to hype portals for rendering, though I think theirs may have been for drawing not just culling? Does anyone know how it worked?

Dark Forces apparently also used portals for culling, IIRC.

Re:Portals and Quake by to11mtm on Friday January 10, 2025 @08:12PM (#42662355)
I think Build used some form of portals as well... primarily for water/underwater transitions, but there was at least one level in Duke3d that used it for some non-euclidian geometry.
Re:Portals and Quake by d3VwsX on Friday January 10, 2025 @08:24PM (#42662425)
Pretty sure water was just a teleporter? You may be thinking about the mirror effect? I think that was a kind of a portal effect. You had to make a large empty section behind each mirror that was used by the engine to render a mirrored copy of things in front of the mirror.

You could make some weird impossible geometries by just superimposing sections. Two sections could occupy the exact same coordinates, but movement and rendering were done across edges shared by sections and did not care about if there was some other section in the same space. As long as there was never a way to see those sections at the same time.

Re:Portals and Quake by CyberDildonics on Friday January 10, 2025 @08:31PM (#42662468)
Pretty sure water was just a teleporter? You may be thinking about the mirror effect?

That's what they just said? They didn't mention the mirror effect? The mirror effect was done with duplicate geometry? It occupied the overlapping space of what was behind it? The build engine also didn't have vertical levels.

Re:Portals and Quake by paulryanrogers on Friday January 10, 2025 @11:10PM (#42663219)
Shadow Warrior (Build) did have some room over room stuff. But IIRC it still leveraged offset sectors like Duke's water. FWIW some modern Doom ports appear to have this as well, at least with levels that support it.
Re:Portals and Quake by Sharlin on Saturday January 11, 2025 @04:56AM (#42664679)
A teleporter is just a portal that you can’t see through.

> You could make some weird impossible geometries by just superimposing sections. Two sections could occupy the exact same coordinates, but movement and rendering were done across edges shared by sections and did not care about if there was some other section in the same space. As long as there was never a way to see those sections at the same time.

This is exactly what portals are.

Re:Portals and Quake by smitelli on Friday January 10, 2025 @08:40PM (#42662522)
E2L11 “Lunatic Fringe.” The map has an outer ring containing 720 degrees of hallway. Surprisingly disorienting even when you know that’s what’s going on.
Re:Portals and Quake by phire on Friday January 10, 2025 @08:40PM (#42662525)
No. Prey was one of the first games to hype portals and non-euclidean maps for gameplay.

Portals for rendering date back to the dawn of 3d graphics and many early FPS engines used the concept.

But these portals were only there as a rendering optimisation. While you could abuse them to make non-euclidean maps, the tools were intended to make proper maps, and the portals would be invisible to players.

Re:Portals and Quake by chamomeal on Friday January 10, 2025 @11:50PM (#42663386)
Do you know anything about Prey 2017’s “looking glass”? Do you know if it involves any special techniques?

I know nothing about this stuff, but when I saw in-game I was really impressed. You can even break the screens into shards, and the little pieces still maintain the effect when they’re lying on the floor or flying through the air.

Re:Portals and Quake by adastra22 on Friday January 10, 2025 @11:59PM (#42663436)
I've never played the game, but your description doesn't sound very hard to implement. Keep in mind there is no physical camera when rendering, so tricks like this become rather easy to implement. You just setup the camera appropriately and render the perspective being shown by the portal, transformed into view space, using an alpha mask to make sure it only draws pixels where the glass fragment is.
Re:Portals and Quake by keyringlight on Saturday January 11, 2025 @07:40AM (#42665479)
Isn't the more common usage of this in skyboxes? You'd have one area where the gameplay is taking place, then another area in the map that shows the larger scale area surrounding where the player is and the portal makes it appear that the gameplay area is within the other.

The designer needs to confine the player so they can't break the illusion (where Prey lets Morgan Yu shatter that 4th wall), or you can do things like put the player on a speeding train traveling through a scenery and falling off is fatal

Re:Portals and Quake by adastra22 on Saturday January 11, 2025 @02:49PM (#42668460)
I’m old. For me a skybox is what it says on the tin: a box with a fisheye texture that when rendered looks like a 360 panorama. Does the word mean rendering actual geometry now?
Re:Portals and Quake by smolder on Friday January 10, 2025 @10:48PM (#42663138)
Marathon 2 by Bungie also had weird non-euclidean maps with overlapping sections in the late 90s I think.

I miss the customizability of that game. Early bungie works were up there with early blizzard or early valve. They sold a tool for fun instead of casting a bait for profit.

Re:Portals and Quake by Terr_ on Friday January 10, 2025 @11:35PM (#42663329)
I recall that some of the developer commentary for either Portal or Portal 2 mentioned that they began level-development by using a special version of the namesake non-euclidean Portals to connect different chambers and hallways that were being developed in parallel.

Then, later in development, they ran a tool to stitch together all that geometry in a more-normal way, and they only had one case of impossible-overlap, which continued to use the non-euclidean link.

Re:Portals and Quake by brobdingnagians on Saturday January 11, 2025 @07:08AM (#42665337)
For those wondering where the impossible space is:

https://gaming.stackexchange.com/questions/20601/where-is-th...

Re:Portals and Quake by hnuser123456 on Tuesday January 21, 2025 @11:43AM (#42782162)
I actually discovered this accidentally, because I found wheatley so damn annoying at this point, I was just noclipping through the levels to get to the next part of the game, and I couldn't noclip through that drop.
Re:Portals and Quake by endgame on Saturday January 11, 2025 @01:03AM (#42663682)
IIRC Duke3D also had a map where you had to walk a circular path twice to get back to where you started.
Re:Portals and Quake by Synaesthesia on Saturday January 11, 2025 @08:09AM (#42665615)
Duke3D used teleportation to simulate height, for instance in the beginning of the game when you drop down from the rooftop you actually teleport to a other part of the map.
Re:Portals and Quake by corysama on Friday January 10, 2025 @09:00PM (#42662610)
> Dark Forces apparently also used portals for culling, IIRC.

DF used BSP for culling. But, I made a mod level long ago playing with features and made a stairway in the middle of a room that you could only see from in front of it. It was some kind of free-standing portal with no surrounding support.

Fun fact: the creator of the DF engine told me he based it on a reverse engineering of a beta release of DOOM. Apparently, the final release of DOOM cut a lot of engine features to gain speed. But, DF shipped with them and maybe a few more.

Re:Portals and Quake by paulryanrogers on Friday January 10, 2025 @11:02PM (#42663177)
> Fun fact: the creator of the DF engine told me he based it on a reverse engineering of a beta release of DOOM.

Can you provide a source? As I understand it DF is based on the (pre release?) Tie Fighter engine, and DF began production before Doom released. That's why for example DF has some non-textured 3D models like the turrets and mouse droids. I follow The Force Engine (reverse engineered fan port) and Dev Game Club (hosts worked at LA).

Supposedly DF devs did see Doom (perhaps even a pre release version), but already had their own tech working by that point.

> Apparently, the final release of DOOM cut a lot of engine features to gain speed.

Doubt. There's a lot of interviews with the ID guys, and I don't recall anyone saying they cut significant technical features. They made Doom in only 13 months, minus almost a month to port Wolf3D to SNES. Maybe Carmack -- or the released alphas and betas -- can clarify? Or perhaps you are confusing some of the Doom porting efforts, which did cut down levels and sometimes features significantly.

Re:Portals and Quake by corysama on Sunday January 12, 2025 @03:13PM (#42676492)
> Can you provide a source?

All of this the DF engineer told me face to face. Might have been based on an alpha version of DOOM. He might have already had some tech for DF before studying DOOM. It was a casual conversation over ten years ago.

I don't recall what the changes were. Something about being less flexible to be faster. Only way to know would be to redo the reverse engineering of the BSP format from one of http://toastytech.com/dooma/

Re:Portals and Quake by bluedino on Friday January 10, 2025 @10:07PM (#42662941)
Descent used portals
Re:Portals and Quake by adastra22 on Saturday January 11, 2025 @12:01AM (#42663448)
As mentioned by others, Descent used portal rendering all the way back in 1995. It's a simple trick that only requires an alpha mask, which even the earliest hardware supported.

But certainly the game Portal (2007) hyped using portals for rendering prior to Prey.

Re:Portals and Quake by usea on Saturday January 11, 2025 @12:06AM (#42663462)
> But certainly the game Portal (2007) hyped using portals for rendering prior to Prey.

They were referring to Prey (2006).

Re:Portals and Quake by Tempat on Saturday January 11, 2025 @02:39AM (#42664101)
Also worth noting that Prey (2006) started development in 1995.
Re:Portals and Quake by keyringlight on Saturday January 11, 2025 @07:43AM (#42665490)
There are a handful of videos from E3 (97 or 98) showing off the original 3DRealms development of Prey. One of the things that didn't survive into Human Head's version on the Doom3 engine was rotating portals, or if they did they were rare that I don't remember them.
Re:Portals and Quake by bananaboy on Saturday January 11, 2025 @02:56AM (#42664168)
Original Descent was software rendered though.
Re:Portals and Quake by adastra22 on Saturday January 11, 2025 @04:14AM (#42664507)
2D graphics cards had alpha masking.
Re:Portals and Quake by rep_lodsb on Saturday January 11, 2025 @06:30AM (#42665160)
But not standard VGA.
Re:Portals and Quake by bananaboy on Saturday January 11, 2025 @04:43PM (#42669151)
That’s right, Descent ran in mode 13h 320x200 with 256 colours and drew directly to video memory. No alpha masking involved. The source is available here https://github.com/videogamepreservation/descent