I added portals into software Quake

Поделиться
HTML-код
  • Опубликовано: 27 авг 2024

Комментарии • 137

  • @MattsRamblings
    @MattsRamblings  Год назад +80

    As I mentioned there's a lot more work to make this robust, and there's also more I could do to make it faster. For instance, I could use (something like) frustum culling to ignore geometry outside of the portal edges. These test levels work well enough on my modern PC though, so I'll leave it here for now...

    • @orbatos
      @orbatos Год назад +5

      Nice work! I was wondering why you don't mention frustum culling As part of the partitioning step. Looking forward to more on this.

    • @user-yh7ry7uu9o
      @user-yh7ry7uu9o 11 месяцев назад +1

      Hello, I have one multiplayer project on ue5 in which I would like to add motion as in quake 3, could you give a formula to calculate motion in quake 3, in the form of a normal mathematical formula(Maybe with some notes. ) ? I searched for it on the Internet, found only the source code, but in them I do not know where to look for the piece of code I need, and I saw a little of it, after which I realized that it would be easier to ask a knowledgeable person for a formula and write everything from scratch than to try to rewrite the original code.
      I would be very grateful if you would provide this.
      PS
      I apologize for my English, I used a translator.

    • @victorluchitz7907
      @victorluchitz7907 7 месяцев назад

      Hi! Ive worked on a similar feature for qfusion and also worked on my software quake engine tochris so I feel I need to share my thoughts on this ;)
      To facilitate near plane clipping, I would suggest adding the fifth plane to the frustum in the generic rendering pipeline, this will eliminate a huge amount of polygons that need to be clipped

  • @karlmehltretter2677
    @karlmehltretter2677 Год назад +86

    During Quake's development, 3dRealms was working on the original Prey. Prey had portals as its main VSD (visible surface determination) structure instead of Quake's PVS. The abilitry to have these gameplay portals was quite hyped in the media at that time.

    • @sarkies_proxy
      @sarkies_proxy Год назад

      ruclips.net/video/dMfen_wicEA/видео.html

    • @wreagfe
      @wreagfe Год назад +3

      @AletheiaBasin Prey was never released though, until Human Head made the 2006 Prey based on idtech4.

    • @meateaw
      @meateaw Год назад +9

      Narbacular drop was released in 2005.
      It was some of the team that ended up making portal. Gabe Newell liked it, so he hired the whole team, and they subsequently made portal.
      So valve still win :)

    • @SuperAlgae
      @SuperAlgae Год назад +8

      The original Unreal had portals back in 1998, but the game didn't use them heavily even though they were pretty advanced. Two portals could be at any angle to each other. They didn't have to be vertical, but some angles could result in your view angle jumping when passing through them, and some kinds of weapons didn't work when shot through them.

    • @wallabra
      @wallabra Год назад +7

      ​@@SuperAlgae yes, UT made some use of them too, eg DM-Fractal. OldUnreal's modern versions fix hitscan weapons through portals if I recall correctly.

  • @SillyOrb
    @SillyOrb Год назад +73

    Very nice! :D I especially applaud your decision to adhere to the original principles while looking for possible solutions to the issues.

  • @ataraxianAscendant
    @ataraxianAscendant Год назад +14

    babe wake up new matt's ramblings video

  • @hotmultimedia
    @hotmultimedia Год назад +19

    Thank you for your contributions in the field of Quakelogy

  • @jimmyhirr5773
    @jimmyhirr5773 Год назад +30

    Chapter 70 of the Graphics Programming Black Book mentions that the Quake developers tried using portals for rendering instead of PVS. However they ultimately decided against it because it made worst-case performance worse without improving average performance.
    If you haven't checked that out, you should. It might give you some ideas.

    • @MattsRamblings
      @MattsRamblings  Год назад +18

      Yes, that did spring to mind! It's pretty much the same problem only with portals between each leaf, I think.

    • @SerBallister
      @SerBallister 11 месяцев назад +1

      IIRC the original Unreal engine was portal based

  • @Spartanhero613
    @Spartanhero613 Год назад +11

    Not exactly Quake spirit, but those portals would look sick with some see-through vertical, wavey water with maybe a little translucent animated texture.

  • @dantescanline
    @dantescanline Год назад +27

    you're wild man, doing this in the spirit of the original software implementation is very cool. now you just need a time machine and you can make a mod of Portal for Halflife goldsrc

  • @quakespeedrunsexplained
    @quakespeedrunsexplained Год назад +22

    🤯🤯 incredible work as always. Mappers would have a blast with this!

    • @MattsRamblings
      @MattsRamblings  Год назад +11

      Thanks! Good to see you here.

    • @ShadesMan
      @ShadesMan Год назад +3

      @MattsRamblings heck yeah! It's in GZdoom and now, Quake!

  • @TouchdownTFTD
    @TouchdownTFTD Год назад +3

    That reminds me of the old days when I've been listening to Carmack's QuakeCon keynotes as in I do not understand 95% of the technical stuff... but I still had a lot of fun listening to it. :)

  • @GegoXaren
    @GegoXaren Год назад +8

    divVerent made portals in QuakeC code about 13 years ago.
    It is what is used in Xonotic and old Nexuiz.
    In those games they are called Warpzones. (xonotic-data pk3dir- > qcsrc -> lib-> warpzone)
    But that is a hack of the water render implementation (also in QuakeC), iirc, and is not the same approach as your implementation.

  • @Stomj
    @Stomj Год назад +1

    your profile picture fascinates me the more i downscale it the more it looks like a regular image that is not made of lines

  • @miloheh
    @miloheh Год назад +7

    I love this channel. Jedi Academy taught me how to program and helped me learn the quake engine. I wonder if you’d explain how bsp inception and subsequent child map entity tracking could be improved compared to the implementation of misc_bsp. one of my favorite game mods from back then let you save and load map entities, but you couldn’t sub tree the map entity logic when placing a bsp. That would’ve been cool

  • @electrocatalyst
    @electrocatalyst Год назад +3

    Man, even this "basic" implementation of portals looks totally awesome! This could be an amazing addition to the Retroquad engine.

  • @guilhermecampos8313
    @guilhermecampos8313 24 дня назад

    This is one of the coolest things I've seen about Quake. Congratulations on the work!

  • @Tenetri
    @Tenetri Год назад +13

    All your videos are so fascinating! I was 10 when i started playing Quake 1 in the late 90's, and these give a cool sense of nostalgia, and curiosity at the same time. Wish you the best, and thanks for the great vid!

  • @delphicdescant
    @delphicdescant Год назад +2

    We need to start using BSP trees in more stuff again tbh.
    The fact that we *can* kill it with hardware instead does *not* mean we *should.*
    A beautiful program running just as fast as it needs to is ok. But a beautiful program running 10,000x faster than it needs to is *exquisite.*
    Let us not be like the engineers, who build bridges that barely stand. Let us be obsessed with over-engineering, to build bridges that will stand until the sun consumes the Earth.

    • @charlieking7600
      @charlieking7600 Год назад +1

      BSP is very sensitive to geometry details. So it would be inefficient in modern games. Manually placed sectors, portals, occluders should prevail.
      Modern games lack quality development. Nowadays you can see highpoly meshes with absurd polycount, so it's done with colliders too. And LODs are automatically generated without any manual fixing. You can see smallest hairs on character faces, but not detailed skin textures. You can see highpoly rocks, but not detailed wall corners, which are represented as geometrically perfect. And so on.

  • @ostratego167
    @ostratego167 Год назад +2

    Now you're thinking with portals!

  • @brobbeh
    @brobbeh 11 месяцев назад +1

    Oh man I really hope we can get fully functional ones allowing grenades and monsters as well. Could really make some trippy lovecraftian stuff and mess with players with infinite corridors and labyrinths.

  • @william.lubelski
    @william.lubelski Год назад +3

    I fist pumped when you got to the nested portal queue

  • @SilverstringsMusings
    @SilverstringsMusings Год назад +3

    Great video, programming, explanations, etc. Really hoping you expand on this concept in the future and turn it into a publicly available mod

  • @jembishop3509
    @jembishop3509 Год назад +3

    Very cool video, reminds me of the guy doing portal on the n64!

  • @willtheoct
    @willtheoct Год назад +2

    thank you for doing the thing i've wanted to see and do

  • @sibvrv
    @sibvrv 6 месяцев назад

    Awesome! Implementation as in Duke Nukem 3D ))) There where lot of custom levels in use with non-euclidean geometry, the most fun experience for multiplayer setups.

  • @Sp00n00n00n00
    @Sp00n00n00n00 Год назад +12

    I don't think portals like this tend to use stencil buffers in modern games. I think they render the destination scene to a separate off-screen texture backed by another frame buffer and then place that in the portal location.

    • @octopusx9801
      @octopusx9801 Год назад

      Stencils used to mask portal area

    • @delphicdescant
      @delphicdescant Год назад +6

      There are lots of ways to do it. Imo the best way to do something is the one that takes the least frame time and memory to do. Idk which one that is, but it's probably one that doesn't use very many extra buffers.

    • @Spikehead777
      @Spikehead777 Год назад +5

      IMO, I would rather use a stencil and depth buffer to clip the destination geometry to the portal's surface in the source source geometry. That way, I could use a single deferred lighting/shading pipeline to light both sides of the portal with lights/shadows being able to pass through.

    • @randomcatdude
      @randomcatdude Месяц назад

      stencils are superior to rendertextures in pretty much every way

  • @ShadesMan
    @ShadesMan Год назад +1

    4:17 and 5:54 - aah, like the real life 'infinite mirror' effect when u place two of them facing each other.

  • @dhonex
    @dhonex Год назад +1

    Simply incredible

  • @evanbooth1441
    @evanbooth1441 Год назад

    I really like how you laid everything out, and the portals look amazing.

  • @Terminatorm101
    @Terminatorm101 Год назад

    Mindblowing! Looking incredible using old-school software rendering!

  • @Levi_OP
    @Levi_OP Год назад +2

    Very cool video! keep up the good work

  • @julianpopa-liesz3345
    @julianpopa-liesz3345 Год назад

    Thanks Matt for another wonderful video! Unparalleled video editing and explanations!

  • @barrupa
    @barrupa Год назад +3

    Opening the doors (or dare I say, portals) for someone to remake MyHouse.wad in Quake running on period accurate hardware.

  • @Davesoft
    @Davesoft Год назад +1

    That's pretty unreal bruh

  • @mfaizsyahmi
    @mfaizsyahmi Год назад +3

    I get a feeling this is being developed to get a Quake version of myhouse.bsp.

  • @vadimtaranov3041
    @vadimtaranov3041 Год назад +7

    What an amazing job! I just discovered your camapaign for Quake and after playing it for a couple of minutes it's really something good, thank you! Btw, do you think it could be possible to pre-render portals into a set of images or a compressed video, maybe even a couple of parallax cubemaps to save some performance?

    • @MattsRamblings
      @MattsRamblings  Год назад +7

      Thanks for the kind words. To be clear, I had nothing to do with the development of the Alkaline mod, I merely used it in this project. It is a fantastic campaign though. To answer your question: I suppose that would be possible, although it'd only ever be an approximation since you'd want it to appear right from all angles. Thanks again.

    • @vadimtaranov3041
      @vadimtaranov3041 Год назад +2

      @@MattsRamblings ok, yes, this is exactly why I say it should be a series of images, taken from multiple angles.

    • @thegibusguy4969
      @thegibusguy4969 Год назад

      @@vadimtaranov3041Similar to a cubemap?

  • @hobbified
    @hobbified Год назад +6

    Would you be able to apply any effects (even very cheap ones like desaturation / palette changing) to stuff that's rendered through a portal, to make them a bit less transparent? Maybe just needs a stack of renderer parameters.
    A bit of geometry wobble would be cooler, but probably not doable :)

  • @bobbycomputers
    @bobbycomputers Год назад

    What an absolute gift of a video! Thanks, Matt

  • @jane5886
    @jane5886 Год назад

    God damn my man is a legend

  • @PierreDurand87
    @PierreDurand87 Год назад +2

    awesome

  • @sergeiohotskiy815
    @sergeiohotskiy815 Год назад

    Awesome! When I was a kid in 1999 I used to mess with QuakeC and the source files. I wanted to make rockets and grenades to jump the teleports too, which they didn't. It added an extra layer of fun. And I managed to do it without knowing anything about coding! The only problem that I encountered was that the rockets and grenades were choosing seemingly random trajectories when leaving the teleports on the other side. Couldn't beat that bug then due to lack of knowledge. Even played my mod at a lan party:)

  • @Artman009
    @Artman009 Год назад

    Awesome work!

  • @AndyGaskin
    @AndyGaskin Год назад

    Really exciting work. Thanks for sharing this

  • @ChristianIce
    @ChristianIce День назад

    Outstanding job!
    Any news?

  • @nooby8187
    @nooby8187 Год назад

    fascinating stuff!

  • @-Kerstin
    @-Kerstin 11 месяцев назад

    Hope you keep trying to improve it. Would be really cool to have maps with these portals that run on oldish hardware.

  • @w3sp
    @w3sp Год назад +4

    Nice, I did something similar in Q3 many years ago, basically modifying the standard teleporter and combined that with the portal camera. A few of these videos are still scattered around, e.g. "roomillusion4".
    PS: I like your technical approach.

    • @MattsRamblings
      @MattsRamblings  Год назад +3

      Yeah, I did think about the Q3 see-through portals when I was doing this (eg. the one near the lava in q3dm7). I seem to remember there were some technical limitations, so the renderer couldn't handle portals looking at portals?

    • @Eraesr
      @Eraesr Год назад

      ​@@MattsRamblingscorrect. Portals couldn't look at other portals and if I remember correctly, things also broke down if the player could see two portals simultaneously as well.

  • @Harekiet
    @Harekiet Год назад +1

    That's pretty damn cool and indeed really wonder at the performance of running this and the original level on an old pentium

  • @Edgebotv4
    @Edgebotv4 Год назад +1

    Id like to see this in a mod.

  • @eadweard.
    @eadweard. Год назад

    Amazing. I saw that other fellow (the one writing his own engine) did this recently.

  • @Nikku4211
    @Nikku4211 Год назад

    Reminds me of when they got portals in vanilla Doom by exploiting the BSP.

  • @JMPDev
    @JMPDev Год назад

    Would love to see further work on this as you optimize this further in a future video :)

  • @tomeofkeep7842
    @tomeofkeep7842 Год назад +4

    I wonder how this differs from the warpzone implementation in Darkplaces. I hope you look into how this might be done with a GPU OpenGL render path.

  • @JohnDobak
    @JohnDobak Год назад +6

    can... can you fire rockets through them?
    🤠

    • @MattsRamblings
      @MattsRamblings  Год назад +1

      It can't even render rockets correctly at the moment! That would be amazing though. 😅

  • @fryziu
    @fryziu Год назад

    Love your work 😀😃😄😁🤩😍

  • @r.g.thesecond
    @r.g.thesecond Год назад +3

    Wow I keep forgetting how fast software rendererers can get messy. Another youtuber, jdh, just gave up debugging his renderer for his game. (it makes for a good content I suppose...)
    Though, I'm more interested how physics might interact with portals. The original Portal (2007) is a mess trying to deal with player AABB going through non-AA portals, collision etc (It makes for amazing speedruns though). I wonder if there are cleaner, more elegant solutions.

    • @user-sl6gn1ss8p
      @user-sl6gn1ss8p Год назад

      there's a guy porting portal to the N64, he discusses some techniques (which run well on a N64)

  • @Foxtrop13
    @Foxtrop13 Год назад

    cool now we need someone to make Prey

  • @just__khang
    @just__khang Год назад

    very nice

  • @brucetungsten5714
    @brucetungsten5714 Год назад

    Impressive work!

  • @tacokoneko
    @tacokoneko Год назад

    technically CPU can render everything that a GPU can because there is a fully complete and well-defined software implementation of OpenGL 4.5 called freedesktop mesa llvmpipe that enables any OpenGL code to run on any CPU even when there is no hardware OpenGL accelerator present. Slower result than most hardware GPU of course, but this GPU emulator is optimized to the greatest extent it is possible to optimize a CPU to render 3D, so its performance on very large modern CPUs like AMD Ryzen 9 5950X should not be underestimated

  • @PanzerschrekCN
    @PanzerschrekCN Год назад

    It's possible to clip triangle models by clearing depth buffer outside portal area. Yes, it is not cheap. But some optimizations are possible, like clearing it only around models that needs to be clipped.

  • @vvviiimmm
    @vvviiimmm Год назад

    love it

  • @kuklama0706
    @kuklama0706 Год назад

    XashXT for Half-Life has this, it lets pushables through and I've managed to make env_shooter projectiles to pass as well.

  • @AdamChristensen
    @AdamChristensen Год назад

    My 486 and PII are ready. 😁

  • @AmaroqStarwind
    @AmaroqStarwind 2 месяца назад

    This video gives me DmRadicus (DmRadikus?) vibes.
    It was a non-euclidean map from the first Unreal. (Not Unreal Tournament, regular Unreal.)

  • @Wobbothe3rd
    @Wobbothe3rd Год назад

    Next step: raytraced lighting through portals ;~)

  • @_general_error
    @_general_error Год назад

    95's Portal. Let make this.

  • @MillywiggZ
    @MillywiggZ Год назад +6

    Not clever enough to keep up with this. So to look clever I’ll quote someone:
    “Huh?”
    Quake Guy (or Ranger)

  • @oaooaoipip2238
    @oaooaoipip2238 11 дней назад

    Mazing

  • @TheSoulmarine
    @TheSoulmarine Год назад

    Finally!!

  • @Kppot
    @Kppot Год назад

    Whoa!

  • @antivanti
    @antivanti 8 месяцев назад

    I seem to remember that the original Unreal engine had support for portals like this?

  • @RoideJaneiro
    @RoideJaneiro Год назад +2

    What about mirrors? Aren't they similar?

    • @MattsRamblings
      @MattsRamblings  Год назад +2

      Yes, you could implement mirrors like this, you just need to reflect the far side of the "portal" too.

    • @RoideJaneiro
      @RoideJaneiro Год назад

      @@MattsRamblings And probably also the player. But nice! Mirrors in games are way too seldom.

  • @linguini1517
    @linguini1517 Год назад +2

    narbacular drop

  • @hanssondaniel
    @hanssondaniel Год назад

    Awesome! Now add a portal gun 😅

  • @fredriksandebert7450
    @fredriksandebert7450 Год назад +2

    Am I the only one who thinks this video was quite dark and sometimes difficult to see what was going on?

    • @charlieking7600
      @charlieking7600 Год назад

      Depends on your screen brightness.

    • @Spartanhero613
      @Spartanhero613 Год назад

      I agree, I think his gamma must be lower than the game's default

  • @1_1bman
    @1_1bman Год назад

    has anyone ever tried an implementation of portals that _doesn't_ just consist of rendering another scene?

  • @Bacontsu
    @Bacontsu Год назад

    I've stumbled onto same issues when implementing the same thing onto Goldsource engine, thought its mostly hardware accelerated

  • @MenkoDany
    @MenkoDany Год назад

    Bro made Quake 1.5

  • @appalling22
    @appalling22 8 месяцев назад

    Did you try using this technique to make reflective surfaces? I think this is how duke nukem and Unreal did mirrors, IIRC

  • @gdclemo
    @gdclemo 3 месяца назад

    How do you avoid the portal clipping the near plane as you pass through it? Also doesn't Quake use PVS, so are you doing PVS lookup for the viewpoint transformed into the portal destination space (which might be behind a wall) or from the portal itself somehow?

  • @SirYodaJedi
    @SirYodaJedi Год назад

    finally

  • @UdderlyEvelyn
    @UdderlyEvelyn Год назад +1

    I have a feeling my 20MB Pentium Overdrive @73MHz would be too just-barely-runs-Quake to handle this, eh? Heheh.

  • @Buhroocykins
    @Buhroocykins Год назад +2

    👌

  • @JohnSmith-wolandworld
    @JohnSmith-wolandworld Год назад

    would this be possible in the goldsrc engine or would that be difficult due to the engine overhauls that goldsrc has had?

  • @ch4mba
    @ch4mba Год назад

    something for Netflix

  • @Kengur8
    @Kengur8 Год назад +1

    This is like ray casting, but for 1996... genious

  • @Biel7318
    @Biel7318 Год назад

    how do you organize the tree of portal spaces if one leaf node of the three connects back to a trunk node?

  • @karpai5427
    @karpai5427 Год назад

    Aren't portals already a thing in Quake? Is it something that was created this month?
    They are in original Duke Nukem 3d and gzdoom.

    • @charlieking7600
      @charlieking7600 Год назад

      But not seamless ones, only these using black textures, imitating some kind of cursed sky with stars.

    • @karpai5427
      @karpai5427 Год назад

      @@charlieking7600 Well, as a mod obviously. I would be surprised if it was not done before.
      Makes me think if there are other Quake engine games that have portals. I can't remember any.

  • @tuff_lover
    @tuff_lover Год назад

    If only we had real portals back then...

  • @Jkauppa
    @Jkauppa Год назад

    why dont you just render from the portal plane forward, in the new location

    • @Jkauppa
      @Jkauppa Год назад

      yep the portal is a screen surface

    • @Jkauppa
      @Jkauppa Год назад

      so that the portal is the camera surface and the origin is the player, any number of new cameras, portals, and the portal is the forward clipping plane

  • @PanzerschrekCN
    @PanzerschrekCN Год назад

    Recently i implemented portals myself in my experimental softwarte rendering engine. But my portals works differently - this is just a render into texture. And result portal looks not so smooth as yours (is blocky).

  • @TheGreatSpiff
    @TheGreatSpiff Год назад

    How different is this from how Build engine games handled portals? It seems similar, but my knowledge is very limited.

    • @Ehal256
      @Ehal256 Год назад +1

      Somewhat, but build is still "2.5D", which simplifies the occlusion tracking, it only needs two integers per raster column to achieve zero overdraw.
      However, build has its own sophistication to handle concave sectors (as opposed to doom's convex sectors and quake's convex leaves)

  • @CsendesMark
    @CsendesMark Год назад

    I used to play a mod for Q3 which had portals like this, and it was long before Valve's Portal
    Does anyone know that? maybe?
    I wondering what it would like to play that again!!!

    • @charlieking7600
      @charlieking7600 Год назад

      You probably played Xonotic (previously Nexuiz), which is basically Unreal Tournament with bunnyhopping.
      It's built upon Darkplaces and uses gameplay feature known as warp zones. These are seamless portals.

  • @havocking9224
    @havocking9224 Год назад

    Hello Prey 1995

  • @teiman
    @teiman Год назад +3

    :-O

  • @-m.zenterra-5001
    @-m.zenterra-5001 Год назад

    Welp, time to make myhouse.bsp

  • @Snedd99
    @Snedd99 Год назад

    Great stuff, it'd be interesting to see somebody attempt myhouse.wad in the Quake engine using this, the portal rendering would be perfect to pull off some of the tricks required.

  • @lucashoffmannn
    @lucashoffmannn Год назад +1

    I'd like to see that working on original hardware to some extend. Imagine how mind blowing it would be for people back then if this existed at the time? Pretty good video

    • @martin-vv9lf
      @martin-vv9lf Год назад

      i think i heard about a portal quake mod back then that was available, but it was so cpu intensive nobody dared use it.

  • @skope2055
    @skope2055 Год назад

    awesome