What happens if you put a portal in a portal? Simulation and explanation

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

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

  • @nad2040
    @nad2040 6 часов назад +30

    This was a great explanation. I hope minutephysics sees this.

  • @lukasjetu9776
    @lukasjetu9776 16 часов назад +34

    I was like "ayyy i have seen this video before!" but then i saw the date of creation and thought "wait... so i haven't seen this vi-" but before i could even finish the sentence, i looked and stared at the sub count and my mind completely filled up with "UNDERRATED, UNDERRAT-"

  • @LethalChicken77
    @LethalChicken77 9 часов назад +9

    The analytical approach works for rasterization too, just make a shader that sets the transparency to 1 on the backside of the portal. This is how it actually works in-game.

  • @classicmax794
    @classicmax794 16 часов назад +17

    3:00 no matter what, the cube must exit the blue portal at the velocity that the orange portal was moving, right? it can't exit the blue portal at a different rate, because then there would be a point in time where part of the cube is missing or duplicated.
    air resistance shouldn't really matter, because as the orange portal moves, i imagine air would be pushed through it, so when the cube goes through, the air around it would be matching its velocity.

    • @zentoa
      @zentoa 11 часов назад +3

      my view also. the exit speed will always be the relative velocity

    • @rennangandara7697
      @rennangandara7697 8 часов назад

      The cube can't exit the portal. The objects maintain its velocity, no matter if the portal is moving. If the velocity of the cube is zero, it doesn't get out of the portal

    • @classicmax794
      @classicmax794 8 часов назад +6

      @@rennangandara7697 velocity is relative. it has one velocity relative to the orange portal, and another velocity relative to the rest of its environment. there is no solution where neither of these is forced to change.

    • @erner_wisal
      @erner_wisal 7 часов назад

      ​@@rennangandara7697the cube must exit the second portal at the same speed as the cube entering the first portal relative to the portals.
      For example: cube stationary, orange portal moves at 1m/s then cube must exit blue portal at 1m/s relative to blue portal
      If 2 portals are placed back to back and the orange portal(bottom one) passed through a cube at 1m/s, then the cube won't be launched out of the blue portal at 1m/s because the blue(exit) portal is already moving away from the cube at 1m/s

    • @optozorax_en
      @optozorax_en  6 часов назад +2

      > the cube must exit the blue portal at the velocity that the orange portal was moving
      Of course

  • @ZaccoOfficial
    @ZaccoOfficial 7 часов назад +3

    I am so thankful for this... UNIMAGINABLY underrated video. This has answered every question about portals I've had over the years, and I was RIGHT.

  • @rossbob6107
    @rossbob6107 9 часов назад +7

    Truly an amazing video. I reckon this channel will gain thousands of subscribers in not time

  • @MrMrCraftmine
    @MrMrCraftmine День назад +25

    immediately recognized egui

  • @nictunehledej1164
    @nictunehledej1164 3 дня назад +4

    Amazing video! I hope this blows up and more people get to see this!

  • @L1Q
    @L1Q 3 дня назад +57

    of course it's made by a rust nerd 😅

  • @jeffreyblack666
    @jeffreyblack666 День назад +8

    The moving portal onto a stationary block problem at around 3:00 is a quite simple thing to do if you simply remove gravity.
    The mass of the block and velocity of the portal then do not matter for the problem at all.
    What the problem is effectively asking is if the object retains its momentum relative to the portal or relative to the space around the portal.
    And the answer is clearly B.

    • @optozorax_en
      @optozorax_en  День назад +9

      Of course it's B, but there are so many A people that I decided not to say anything until I have an unbeatable math proof.

    • @arekrekas213
      @arekrekas213 9 часов назад +3

      @@optozorax_en my argument for B is simply "well, it would feel better gameplay-wise!" i think your average player would be pretty disappointed if a portal crushing a cube wouldn't launch it into the stratosphere

    • @rennangandara7697
      @rennangandara7697 8 часов назад

      ​@@optozorax_en here is an unbeatable proof. The cube ALWAYS go out based in the OBJECT speed, not the portal, if the object speed is zero it can't get out of the portal. If you say otherwise, you're objectively wrong, because the game is coded like this, and you can test it

    • @optozorax_en
      @optozorax_en  6 часов назад +4

      I'm talking about abstract pure portals, not about some game (that was answer to someone's comment, and they deleted it)

    • @jeffreyblack666
      @jeffreyblack666 4 часа назад

      @@arekrekas213 I would say that depends how you look at it.
      If you replace the cube with a person, some may want them to fly out, others would want to be stationary relative to the environment.

  • @MCSteve_
    @MCSteve_ 4 часа назад +2

    Ah, I swore I've seen the original video pop up but did not watch it because of language, glad you've adapted it!
    Amazingly explained and with several perspectives too
    Did you modify the style of Imgui for Rust (egui) or is that default for it? It looks great

  • @galvinvoltag
    @galvinvoltag Час назад

    Thinking portals as just one doorway split in half is a very good way of explaining it. For the portals, they are just one same thing.
    Also, about the moving portals thing. Portals connect space together, and when you move one of them you kind of move space which confuses the hell out of people. It is very hard to think both with portals and with relativity in mind. Very nice video.

  • @WilliamFancyFace
    @WilliamFancyFace 4 часа назад +2

    This is fucking sick
    I've been looking for more intuitive explanations of portals and other spatial shenanigans for a comic I'm writing up, and this just gave me a bonfire of inspiration
    I hope you can get those links soon man!

  • @Kram1032
    @Kram1032 16 минут назад

    EDIT: 6:56 - oh maybe you have already thought about what I was saying below here.
    5:59 I wonder if there is a way to relax this a bit? My guess is that what you need here is some sort of differentiable map between both portals so you know how one portal might deform an object compared to another:
    You should always be able to split up a portal pair into many tiny portal pairs without a change, right? It makes no difference whether you walk through a big doorway or many tiny doorways where the ones that directly neighbour other doorways have their frames removed, so long as both ends of the multiple doorways are attached in this way (otherwise you might end up cutting shapes. However, even then you aren't *removing* shapes: All pieces will always be accounted for, so maybe even that can be relaxed, though it would be violent)
    But once you have this sort of process, splitting one large portal into many tiny ones, you can consider what happens "in the limit" and you can get *curved* portals and even *closed up* portals (like a spherical portal - that would actually be a classic wormhole)
    And furthermore, you can consider *small* and *continuous* deformations of one side of the portal which should still work out. You'd just get deformations as an object goes through.
    A simple case would be two rectangular portals where one is a tall rectangle and the other is wide. You can completely fulfill all your rules in this case if you allow objects passing through to get stretched and skewed. You just don't want to *delete* the object. Every piece always must have *some* place to go.
    And mass conservation isn't a problem here either: You are simply affecting the density.

  • @Vykori
    @Vykori День назад +5

    ahhh, I love the visualizer and demos in this video. Very excited to think about those new portals you teased at the end.
    One quick note about 3:00, I'm quite sure the question the comic asks is just if the cube has any amount of momentum coming out of the blue portal, it is not asking how much. It's just intended to exercise your understanding of portals, perspective, and paradoxes. It is not asking you to calculate how much momentum, so there is no need for variables like cube mass etc.
    From the perspective of watching the blue portal, the cube is moving at the same speed of the orange portal. When the two platforms contact and stop, the cube must preserve momentum, so the answer must be B. But where did the energy to launch the cube come from? The platform that the orange portal is attached to just exerted all its energy into the landing platform, not into the cube, so the answer must also be A.

    • @Vykori
      @Vykori День назад +1

      It's worth noting that when the orange portal lands, it is no longer interacting with the cube since it has just finished passing through the portal. it truly only puts energy into the platform it lands on.
      Since you can view the universe both outside of the portal and inside the portal, I like to think portals have the same inertia as the entire universe. so when the yellow portal lands, maybe everything starts flying away from the cube and the cube stays in place. 😂

    • @optozorax_en
      @optozorax_en  День назад +3

      Open my demo, Load -> Physics -> Speed model, click "Stopping" checkbox. This is A. Don't you think it's wrong?

    • @verlioh8000
      @verlioh8000 3 часа назад +3

      hello mysterious internet user that I don't know from anywhere in particular
      perhaps the act of an object passing through a portal results in a force being applied to the portal, like a drag of sorts
      this could be a solution to the energy problem in scenario B if the math is reasonable

  • @dexterman6361
    @dexterman6361 3 часа назад

    3:50
    The triangle that passed the portal and made it to the other has a velocity V w.r.t to the camera
    The part that has not entered the portal has a velocity 0 w.r.t to the camera
    But parts of the triangle must have zero relative velocity w.r.t to all the other points within the triangle.
    How do you reason this works?

  • @jupiterbjy
    @jupiterbjy 58 минут назад

    This experiment was already tested 2 years ago via minutphysics, but not gonna say no to another one hehe. Looks much more intuitive and extensive too! Quad portals!

  • @fnytnqsladcgqlefzcqxlzlcgj9220
    @fnytnqsladcgqlefzcqxlzlcgj9220 4 часа назад

    Amazing stuff dude

  • @Gxaps
    @Gxaps 6 часов назад +2

    Could you not have different shaped portals that then warp and distort light and objects that pass through?

    • @optozorax_en
      @optozorax_en  6 часов назад +1

      You don't wanna enter that portal, it will distort you alive

  • @Mordinel
    @Mordinel 14 минут назад

    Fantastic video

  • @JerryDX
    @JerryDX Час назад

    Great video!

  • @yellowmarkers
    @yellowmarkers 6 часов назад +1

    1:00 There is no link in the description.

    • @optozorax_en
      @optozorax_en  6 часов назад +7

      It is, it just written in plaintext, see closely, youtube does not allow new channels to have links :( When it allows me, I will update the description.

    • @birdbrid9391
      @birdbrid9391 4 часа назад

      @@optozorax_en i suggest putting newlines at least

  • @Izzythemaker127
    @Izzythemaker127 8 часов назад +4

    If your channel is too new to put links in the description, does that mean that they are in the older Russian version of the channel? I don't know Russian but it shouldn't be to hard to find a link in a description.

    • @optozorax_en
      @optozorax_en  6 часов назад +2

      The only link you need is demo - and it's written in plaintext here, you just need to write dots and slashs

  • @nnicanbuak
    @nnicanbuak 3 дня назад +4

    где-то я уже это видел

  • @635574
    @635574 Час назад

    The games are simplified a lot by fixed wall placement so they don't have to compute any crazy collisions

  • @sophiegrey9576
    @sophiegrey9576 54 минуты назад

    My gut guess would have been that the portals would simply collide like solid objects. This is an interesting alternative to that?

  • @spiderpig20
    @spiderpig20 9 часов назад +1

    Can you pretty please update egui macroquad

  • @BloodKrieg21
    @BloodKrieg21 5 часов назад

    Great video : )

  • @NickyJWho
    @NickyJWho 6 часов назад

    Bounced on my boys portal for hours to this

  • @enderprism
    @enderprism 23 минуты назад

    awesome video

  • @XBloodRedRageX
    @XBloodRedRageX 7 минут назад

    I love how he says portal

  • @NoenD_io
    @NoenD_io 3 часа назад

    Wasnt this made like 2 years ago?

  • @glaudeo2908
    @glaudeo2908 4 часа назад +2

    Капец, я уж подумал, что твой видос украл какой-то англоязычный ютубер

  • @DarkwitchBea
    @DarkwitchBea 9 часов назад

    This is great

  • @arcturuslight_
    @arcturuslight_ 2 часа назад

    I'm confused, is this a reupload? I swear I watched this a while ago?

    • @optozorax_en
      @optozorax_en  2 часа назад

      Basically after the intro I said that this is translation and improvement over my russian video. Did you really watch the russian video with english subtitles? Because I've seen basically no english comments and emptiness on the analytics.

    • @arcturuslight_
      @arcturuslight_ 51 минуту назад

      ​@@optozorax_en ой, извините, я скипнул через дисклеймер сразу к середине видео чтобы убедиться что это то видео что я уже смотрел. Я говорю на обоих языках, но не смотрел российских видео уже много лет, и труба мне их не предлагает очень давно, за исключением вашего, и я просто напросто не запомнил на каком языке оно было, только содержание!
      Sorry for not engaging on the original channel, I just must not have had any thoughts to add. Just subscribed to this new translated channel, and I'm sure it's gonna pick up, cuz the work you did there is very juicy. Good luck!

  • @jakeaustria5445
    @jakeaustria5445 6 часов назад +1

    Can we make an electricity generator if we drop a magnet on a portal and then another portal above will spit it out.

    • @aureole6383
      @aureole6383 6 часов назад

      i mean you could just make a weight attached to a pulley that spins a generator and the fact you can move a heavy weight from the ground to the top of a building with little effort using a portal means you can generate as much electricity as you want

  • @r0nyyn303
    @r0nyyn303 4 часа назад

    Cool ahh video

  • @mishazerg
    @mishazerg 3 часа назад

    Вижу вы из Британии, сер

  • @wilville3752
    @wilville3752 11 часов назад +2

    Im just going to make a stupid prediction before i watch and say its going to act like quatnerions

    • @optozorax_en
      @optozorax_en  6 часов назад +1

      Projective geometric algebra > quaternions (but I don't use both btw)

  • @NullzeRT
    @NullzeRT 8 часов назад

    Rust - победа

  • @shynodaa
    @shynodaa 49 минут назад

    Очень интересно но на английском слушать не буду

  • @rennangandara7697
    @rennangandara7697 9 часов назад +1

    3:00 let's consider a lightweight cube and a high speed moving portal, you're still wrong. Thr box velocity is not calculated relative to the portal, it's calculated relative to the rest of the universe. The box goes out at the speed it is moving, which 0 m per second, that means the box doesn't go to the other side at all

    • @CloudCuckooKing
      @CloudCuckooKing 7 часов назад

      I disagree very slightly. Consider from the box's frame of reference. The box is holding still, although its gravitational situation will change. It will appear to emerge from the portal, but its apparent-velocity is an illusion and has zero or momentum. So the box WILL go to the other side, but it will then just plop.
      That it isn't going to launch, I agree with. Unless we also establish physics wherein the portal's motion somehow transfers energy to the box, in which case a slow portal and heavy box does have the possibility of just wedging half-in-half-out because the portal surface doesn't have enough force to overcome the box's inertia. While I feel this overcomplicates the situation, it does still make sense from the box's perspective, so there's nothing against it but a principle of not adding things we don't need to.

    • @CloudCuckooKing
      @CloudCuckooKing 6 часов назад

      I take back that last bit actually, from the box's perspective the box must feel the impulse, making it physically nonsensical to be in the space where the portal is. It becomes tangibly nonflat so ceases to work as a portal. The portal can't be applying force to the object, therefore the result will always be A.

    • @optozorax_en
      @optozorax_en  6 часов назад

      Open my demo, Load -> Physics -> Speed model, click "Stopping" checkbox. This is A. You think it will plop like that?