Nintendo 64 Portal Tech Demo

From Zelda Wiki, the Zelda encyclopedia
Jump to navigation Jump to search

The "Portal Tech Demo" was a 3D demo created by programmer Giles Goddard on the Nintendo 64 hardware. The tech demo was created as part of the R&D process for The Legend of Zelda: Ocarina of Time.

Overview

The "portal" tech demo

In describing the tech demo, Goddard stated: "Recently, I found an old directory of source code that I sort of backed up and it was [...] Hyrule Castle. I was doing all these experiments, like you could have a portal where you look through, go in, and then you get teleported to a different part of the map. You know, you could see through a door to a different part of the map, and walk through it, and then walk back through it. It was R&D for the game, basically. It was, 'what could we do with the hardware on the N64,' and this was basically a demo of actual portals you could see through to other parts of the map."[1]

In describing how the tech demo was created, Goddard stated:

"The N64 only had [4KB] of texture memory and the portals could be anything from a few pixels in size to full screen, so drawing into textures was out of the question.[2] So after the entire scene was drawn I created a viewport around each portal polygon, cleared the Z-Buffer inside the viewport then drew the polygon with the max Z-Buffer value. Essentially creating a mask exactly where the portal polygon was.[3] Then I’d move the camera based on the angle of the current camera vs poly etc and draw the scene again from there. The viewport did most of the heavy lifting culling the new scene but it would get slower the closer you got, basically because you’re drawing 2 full scenes.[4] Once that new scene was drawn I’d then go through all the portals in that scene and do it all again recursively, of course ignoring any portals that fell outside of the viewport.[5] One cool thing was that to make a mirror you’d just reflect the camera position + rotation and to make glass/crystal etc you’d just move the camera slightly and change the angle depending on the refractive index.[6] Lastly, you know the cool tunnel effect you get when you put 2 mirrors facing each other? The same thing happens if the portal on the other side can see it’s 'parent'. So I had to limit the number recursions, that would also decide how far along the corridor you could see."[7]

The tech demo was developed prior to the release of Ocarina of Time.[8] It is unknown whether the code written by Goddard was ever utilized in a commercial Nintendo game.

Goddard, who was the programmer that designed the interactive Mario face in Super Mario 64, was also responsible for the programming of the Zelda tech demo shown off at the 1995 Space World event, which he created prior to the Portal tech demo.[9] After his work on the two Zelda tech demos, Goddard went on to serve as the main programmer on 1080° Snowboarding.

See Also

References

  1. "Recently, I found an old directory of source code that I sort of backed up and it was [...] Hyrule Castle. I was doing all these experiments, like you could have a portal where you look through, go in, and then you get teleported to a different part of the map. You know, you could see through a door to a different part of the map, and walk through it, and then walk back through it. It was R&D for the game, basically. It was, what could we do with the hardware on the N64 and this was basically a demo of actual portals you could see through to other parts of the map." —Giles Goddard (Exclusive: Early Zelda 64 Prototype Featured Portals.)
  2. "The N64 only had 4K of texture memory and the portals could be anything from a few pixels in size to full screen, so drawing into textures was out of the question." — @giles on Twitter, November 3, 2021 (Archive)
  3. "So after the entire scene was drawn I created a viewport around each portal polygon, cleared the Z-Buffer inside the viewport then drew the polygon with the max Z-Buffer value. Essentially creating a mask exactly where the portal polygon was." — @giles on Twitter, November 3, 2021 (Archive)
  4. "Then I’d move the camera based on the angle of the current camera vs poly etc and draw the scene again from there. The viewport did most of the heavy lifting culling the new scene but it would get slower the closer you got, basically because you’re drawing 2 full scenes." — @giles on Twitter, November 3, 2021 (Archive)
  5. "Once that new scene was drawn I’d then go through all the portals in that scene and do it all again recursively, of course ignoring any portals that fell outside of the viewport." — @giles on Twitter, November 3, 2021 (Archive)
  6. "One cool thing was that to make a mirror you’d just reflect the camera position + rotation and to make glass/crystal etc you’d just move the camera slightly and change the angle depending on the refractive index." — @giles on Twitter, November 3, 2021 (Archive)
  7. "Lastly, you know the cool tunnel effect you get when you put 2 mirrors facing each other? The same thing happens if the portal on the other side can see it’s 'parent'. So I had to limit the number recursions, that would also decide how far along the corridor you could see." — @giles on Twitter, November 3, 2021 (Archive)
  8. "A game like Zelda is this massive juggernaut, moving along its own course. If you say, "Here's some cool tech," they're gonna say, "Well, that's really cool but there's no way we can implement that in this thing now." Either it's too late or it's going to cause too much confusion or disruption. So it's very hard to introduce new tech later on in [the development cycle of a game]. It's quite easy at the start but not later on." —Giles Goddard (Exclusive: Early Zelda 64 Prototype Featured Portals.)
  9. "I think they wanted to show something, 'cause they announced the game and they wanted to show they actually had a game there, even though they had nothing. So we knocked up a game with [Yoshiaki] Koizumi-san... we knocked up a little demo of him fighting a metallic character with all these effects and stuff going on. [...] All these demos were always showing off some bit of new tech and I think at that point it was floating real-time lights. We had three lights spinning around, partial effects, and environment mapping." —Giles Goddard (Exclusive: Early Zelda 64 Prototype Featured Portals.)