Create your own Cubemap // Intermediate OpenGL Series

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ม.ค. 2025

ความคิดเห็น • 32

  • @OGLDEV
    @OGLDEV  29 วันที่ผ่านมา +1

    To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/OGLDEV/ . You’ll also get 20% off an annual premium subscription.
    ******************************************************************************************
    Clone the sources:
    git clone --recurse-submodules github.com/emeiri/ogldev.git
    If you want to get the same version that was used in the video you can checkout the tag 'TUT_56_CUBEMAPS'.
    Build on Windows:
    Open the Visual Studio solution: ogldev\Windows\ogldev_vs_2022\ogldev_vs_2022.sln
    Build the project 'OpenGL\Tutorials\Tutorial56_Cubemaps'

    • @CodeParticles
      @CodeParticles 22 วันที่ผ่านมา

      Another great upload. But with all due respect, the title to this video tutorial should be Equirectangular Cubemapping!

    • @OGLDEV
      @OGLDEV  21 วันที่ผ่านมา

      Thanks! I think the original title will bring in more views... TH-cam now allows you to experiment with multiple thumbnails and see which works best but you are still limited to a single title at a time. Maybe in the future I'll try a different title and see if it works better :-)

  • @dantheplanner
    @dantheplanner 19 วันที่ผ่านมา

    Merry Christmas dude. 🎅🏾

    • @OGLDEV
      @OGLDEV  18 วันที่ผ่านมา +1

      Merry Christmas! 🎄

    • @dantheplanner
      @dantheplanner 12 วันที่ผ่านมา

      @@OGLDEV I wish you a great year. 🍀🥳

  • @CodeParticles
    @CodeParticles 17 วันที่ผ่านมา

    Another fun upload! Something neat of a rough benchmark test I found out that the 8k toned jpg file @ 6mg loaded about 2 seconds in equirectangular projection. I then took the same jpg file and cubemapped it into 6 separate files which blew up from 58mb to 73mb each to match the resolution and took 6 and a half seconds to load in cubemapping layout!

    • @OGLDEV
      @OGLDEV  16 วันที่ผ่านมา

      Thanks! So are you saying that it is actually better to run the algorithm in real time instead of using it as an offline tool to create a cubemap texture?

    • @CodeParticles
      @CodeParticles 14 วันที่ผ่านมา

      @@OGLDEV In the case of the 8k file yes! However, if the jpg file is 4k and lower the outcome may be different. Which I should've tested in advance I apologize.

    • @OGLDEV
      @OGLDEV  14 วันที่ผ่านมา

      Interesting, thanks.

    • @CodeParticles
      @CodeParticles 14 วันที่ผ่านมา

      @@OGLDEV another odd thing is I feel like the single jpg algorithm 'looks' better when looking up and down as opposed to the 6 file cubemap. However it could be all in my head.

    • @OGLDEV
      @OGLDEV  14 วันที่ผ่านมา

      Probably just a false impression. Since we are going through a cubemap texture anyway.

  • @typewriteraudio
    @typewriteraudio 4 วันที่ผ่านมา

    Great video! Just subscribed!

    • @OGLDEV
      @OGLDEV  4 วันที่ผ่านมา

      Thanks! Welcome aboard!

  • @aprile1710
    @aprile1710 23 วันที่ผ่านมา +3

    Something I would like to do is playback a video using hardware decoding. If you could do a video on using FFMPEG to decode video frames into textures on the GPU using OpenGL that would be amazing.

    • @theevilcottonball
      @theevilcottonball 12 วันที่ผ่านมา

      Reminds me that I wanted to try pl_mpeg

    • @OGLDEV
      @OGLDEV  2 วันที่ผ่านมา +1

      I've added this to the todo list. I have to admit that I'm not familiar with this so will require some research to implement.

    • @aprile1710
      @aprile1710 2 วันที่ผ่านมา

      @@OGLDEV I understand. Unfortunately ffmpeg examples are pretty rare and most of them do not decode to video memory but rather to system memory and then copy back to the GPU which is very inefficient but simpler I guess. Thanks for looking into it.

  • @coreC..
    @coreC.. 25 วันที่ผ่านมา

    @11:51 Maybe it's this? R = sqrt(x^2+y^2+z^2). But the documentation takes the arctan from something other than R. It uses only sqrt(x^2+y^2).

    • @OGLDEV
      @OGLDEV  25 วันที่ผ่านมา

      Perhaps the usage of 'R' is a bad naming choice because it confuses with the Greek rho. The docs indeed do the square root without Z.

    • @coreC..
      @coreC.. 24 วันที่ผ่านมา

      @@OGLDEV You're just picking the wrong lengths/ratios of the right-sided triangle when calculating the tangent of the angle.
      Tangent = opposite side / adjacent side. But you did hypotenuse / adjacent..
      *And we all thought that the part @**9:42** was the confusing part.* 🙂 fun..
      It really _is_ confusing with all the axis swapping and/or negating. It all looks the same, and it makes you simple. I had to do it too in a project, and i used a matrix to convert the values (looks cleaner?). But it didn't work the first time 😄 because of confusion(s) => mistakes.

    • @OGLDEV
      @OGLDEV  21 วันที่ผ่านมา

      sqrt(x^2+y^2) is the length of the projection of line on the XY plane. What I did is Z/sqrt(x^2+y^2) which is the arctan of (90-theta) instead of theta as it appears in the diagram. But I guess it makes sense because we get theta=0 on the XY plane (when Z is zero) and then v=0.5. When z=1 and sqrt(x^2+y^2)=0 we get theta=PI/2 and then v=0. When z=-1 and sqrt(x^2+y^2)=0 we get theta=-PI/2 and then v=1. So I was confused by then wikipedia diagram /equations which demonstrates the formal picture but for the cubemap case we should actually draw theta "below" the line rather than above it.

    • @coreC..
      @coreC.. 20 วันที่ผ่านมา

      @@OGLDEV You debugged it afterall. ;-)
      In any case, this video is of good help for me. I am writing a little program to make a flat Earth.
      A friend wants to decorate a wall with a map of our planet, but without any distortion of distances (so, not using any of the usual map projections).
      Now i don't have to think so much anymore about how to tackle that problem in the calculations. 👍

    • @OGLDEV
      @OGLDEV  20 วันที่ผ่านมา +1

      Yes, your comment gave me the motivation. Good luck with the project!

  • @oreostastegoods
    @oreostastegoods 19 วันที่ผ่านมา

    OpenGL cubemap coordinate space is horrid -- thanks for spending the time to break it down

    • @OGLDEV
      @OGLDEV  18 วันที่ผ่านมา

      You're welcome 😊

  • @TinyLittleEnormous
    @TinyLittleEnormous 4 วันที่ผ่านมา

    Does it work differently in vulkan ? I guess I will have to want until the series finishes, because it is an advanced topic.

    • @OGLDEV
      @OGLDEV  3 วันที่ผ่านมา

      It's actually not that advanced. I'm using the "3D Graphics Rendering Cookbook" as a guide for this series and this topic comes after textures and a few renderer restructuring.

  • @ortassa1096
    @ortassa1096 18 วันที่ผ่านมา +1

    may i ask where u from your accent sound really familiar

    • @OGLDEV
      @OGLDEV  18 วันที่ผ่านมา

      קרית חיים

    • @ortassa1096
      @ortassa1096 12 วันที่ผ่านมา

      @@OGLDEV טוב לדעת שיש לנו אנשים כמוך במדינה.
      תודה רבה אחי על התוכן הנהדר 🙏

    • @OGLDEV
      @OGLDEV  11 วันที่ผ่านมา

      בכיף!