The PERFECT voxel rendering pipeline (and online demo) [Voxel Devlog #7]

Sdílet
Vložit
  • čas přidán 29. 08. 2022
  • Please check out the online demo: douglasdwyer.github.io/octo-r...
    In this devlog, I describe how I moved my engine from a limited proof-of-concept to a fully-scalable piece of software. Specifically, I highlight the custom GPU memory allocator used for storing voxels, the algorithms used to convert voxel octrees to GPU data, and the culling techniques employed to draw even more objects onscreen.
    Article describing voxel culling optimizations: nickmcd.me/2021/04/04/high-pe...
    Music used in the video:
    Corbyn Kites - Shadowing
    Corbyn Kites - Orbit
    David Cutter - Over There
    Corbyn Kites - Lilac Skies
  • Hry

Komentáře • 314

  • @JoelDev
    @JoelDev Před rokem +187

    I can't wait to see Ace Of Spades being remade with this engine

    • @MuteObserver
      @MuteObserver Před rokem +11

      Although it’s not nearly as great with voxel detail, I just discovered OpenSpades -a lot of shader detail and volumetrics, might like it ^^

    • @JoelDev
      @JoelDev Před rokem +11

      @@MuteObserver OpenSapes is great, I used to play a lot, there are other options too, Build and Shoot (the 0.75 old voxlap graphics) and BetterSpades (a quality of life improvement of build and shoot)

    • @pimeine
      @pimeine Před rokem +3

      Voxel is amazing, when I'll get time this next year I'm planning to make a AOS "remake" with unreal as it was firstly made (simple, multiplayer, free)
      It's sad the official game died, and I'm too much suspicious to try the private servers xD

    • @Grimm-hb7ek
      @Grimm-hb7ek Před rokem +5

      Miss this game so much haha

    • @qeqsiquemechanical9041
      @qeqsiquemechanical9041 Před rokem +2

      TRUE

  • @jaymarksum6542
    @jaymarksum6542 Před rokem +117

    This is really well done, thank you for explaining this in depth. I do highly recommend setting your gain a bit lower so you are not clipping the microphone, and then turn it up in post, it will help keep your audience engaged! Great work overall!

    • @RAndrewNeal
      @RAndrewNeal Před rokem +11

      Best practice is to talk your loudest and set the gain so the level peaks around -3dB - -6dB, depending on how much headroom you want for editing. After editing, normalize peak to 0dB.

    • @thebaconbreadful
      @thebaconbreadful Před rokem +3

      I can't stress how important this tipp is! The videoproduction is nice but the audio imediately set me off. Most likely he used his laptop or webcam microphone. His phone will have a much better mic. Also if channel growth is the goal here he will benifit from a nice mic immensly. It will do wonders.

  • @liamrealest
    @liamrealest Před rokem +26

    i absolutely adore this style of graphics of voxel games, less minecraft and more like teardown, very nice! keep up the work man

  • @baksoBoy
    @baksoBoy Před rokem +10

    that is so incredibly impressive! Both all the super cleaver things you did to optimize the code, but also how the whole engine looks! I couldn't even dream of doing something this incredibly! Keep up the amazing work!!

  • @tommycard4569
    @tommycard4569 Před rokem +2

    i’ve followed a lot of voxel series b4, this has been my favorite by far! been loving every update
    keep up the great work

  • @ScrawnyTreeDemon
    @ScrawnyTreeDemon Před 4 měsíci +3

    Got recommended your tree-felling log and immediately went to binge this series from the beginning. Holy shit, your prowess is insane. Your dedication to optimisation is on another level. As an integrated-GPU user,,, thank you lol 🙏
    The artstyle is beautiful, too. Can't believe I haven't seen the voxels being scaled-down to form the smaller parts of a bigger scene before. It's so unique, and really differentiates this project from others of its type.
    Off to continue watching 💖💖💖 Just had to throw my praises out here and now. Mark me impressed!

  • @flowelcat4340
    @flowelcat4340 Před rokem +4

    It's fascinating to see someone by himself is capable to do this. Thank you for sharing

  • @kryt7955
    @kryt7955 Před 3 měsíci +1

    This channel is wildly underrated. On my way to watch the rest of the devlogs!

  • @LegoDinoMan
    @LegoDinoMan Před rokem +4

    Very excited to see another long form video!

  • @etmonster7237
    @etmonster7237 Před rokem +5

    Wow, that looks amazing! Keep up the good work!

  • @odo432
    @odo432 Před rokem +2

    This is quite impressive. Checked out the online tech demo. Did notice some rendering/loading issues but that's entirely understandable given it's current development. Looking forward to seeing how this progresses. I quite like the voxel style.

  • @twomur_
    @twomur_ Před rokem +1

    wow this looks great! i especially love the pixelated light effects!

  • @ChipboardDev
    @ChipboardDev Před rokem

    Wow, you've come far with this! Congratulations! Keep up the great work, you're going places!

  • @cykboy3254
    @cykboy3254 Před rokem

    awesome work! you actually settled on a very similar idea to what i implemented for an old test project, except i was doing it in orthographic/isometric space. looking forward to more

  • @Dannnneh
    @Dannnneh Před rokem +52

    Assuming you have a different approach than John Lin, it would be cool to see further down the line potential pros and cons, especially for physics/simulations, if you're aiming for that.

    • @dude2542
      @dude2542 Před rokem +8

      i have love for physics, im curious if he could do a water simulation tho

    • @AfonsodelCB
      @AfonsodelCB Před rokem +1

      given John Lin's approach is probably called Blender, I don't think its very comparable

    • @dude2542
      @dude2542 Před rokem +16

      @@AfonsodelCB what?

    • @descai10
      @descai10 Před rokem +11

      @@AfonsodelCB If you think john lin's is too impressive to be real, you certainly won't believe Atomontage, a much higher detail real-time voxel engine made many years before john lin's was.

    • @uncertaintytoworldpeace3650
      @uncertaintytoworldpeace3650 Před rokem

      @@descai10 i mean is there any code or like? Anything? John Lin sus yes. Cuz that shit hasnt been published into a game yet... like??? Yeah im sure u just spend all ur time making builds in your... completed game instead of selling it and making a fortune? 🤔cmon guys.

  • @willvarlakov5436
    @willvarlakov5436 Před 2 měsíci

    this is awesome bro it looks very interesting evokes nostalgic feelings for old childhood games

  • @Kevroa1
    @Kevroa1 Před rokem

    Loving the devlogs, keep it up!

  • @nathanfranck5822
    @nathanfranck5822 Před rokem

    Yes! Glad someone found this out, I've done this but life got in the way from doing anything with it

  • @hikaroto2791
    @hikaroto2791 Před rokem

    Breath taking outstanding work

  • @Gwilo
    @Gwilo Před rokem +7

    wow! I feel honored to be one of the first to play this

    • @Gwilo
      @Gwilo Před rokem +7

      Douglas if you see this and this game ever gets big, can I have like the alternate of a Minecraft cape?

    • @Zevest
      @Zevest Před rokem +1

      lol

    • @DouglasDwyer
      @DouglasDwyer  Před rokem +2

      @@Gwilo I'm so glad that you enjoyed the video! Maybe we can set up capes for my early CZcams subscribers, ha ha.

  • @johnrambozosc
    @johnrambozosc Před 6 měsíci

    Great work here! Nice job!

  • @DanielRut
    @DanielRut Před rokem

    Looking good! Keep up the great work!

  • @ChuckSploder
    @ChuckSploder Před rokem

    YOU HIT 1K!!! Congrat(ulation)s!!!

  • @GregoryTheGr8ster
    @GregoryTheGr8ster Před rokem +2

    For a while, I had been daydreaming about the possibility of special structures and calculations that would lead to optimized voxel rendering, since the standard vertex-and-polygon approach for each voxel would be too slow for tiny voxels. Though I never put enough effort into my initial ideas to produce anything concrete, I'm glad to see that my hypothesis has been proven correct.

  • @pip7021
    @pip7021 Před rokem

    gorgeous and clever handling!

  • @MuteObserver
    @MuteObserver Před rokem

    Thanks for the continued updates ^^

  • @user-fj8ng3wt4p
    @user-fj8ng3wt4p Před rokem

    You're doing great! Good luck, my dude:)

  • @ilasilas3261
    @ilasilas3261 Před rokem

    This looks amazing lad! 👏

  • @Radonatos
    @Radonatos Před rokem

    I've been fascinated by voxel rendering ever since I played around with Ken Silverman's Voxlap engine some while ago - It's great to see developers pushing the boundaries of such a shamefully underestimated rendering method.

  • @theo8897
    @theo8897 Před rokem

    using it for a few years and now I want to upgrade and I'm happy I did that.

  • @bluebukkitdev8069
    @bluebukkitdev8069 Před 10 měsíci

    Gorgeous project! Love your progress so far. Subscribed to keep up.
    If you can make your shadows softer, I think it will light the terrain in a more aesthetically pleasing way, and will make the shadows from objects smoother and easier on the eyes.

  • @Bloodlinedev
    @Bloodlinedev Před rokem

    Tried the demo, really impressive!

  • @3bomb
    @3bomb Před rokem

    This is really cool, i'm eager to see how it develops.

  • @Mistereee
    @Mistereee Před rokem

    Lots of progress being made!

  • @grevel1376
    @grevel1376 Před rokem +2

    Looks amazing. I was longing for a full-length devlog. I love the shadows being the change of colors of individual voxels.

  • @jakestein8516
    @jakestein8516 Před rokem

    I am working on a voxel engine similar to this as well. However your approach is much more elegant.

  • @buttforce4208
    @buttforce4208 Před rokem +1

    So cool! Thanks a lot for sharing!

  • @NoCrispin
    @NoCrispin Před rokem

    This looks really cool and pretty as well.

  • @jarredeagley1748
    @jarredeagley1748 Před rokem

    Those resource sharing tricks are brilliant

  • @UliTroyo
    @UliTroyo Před rokem +33

    It looks amazing! Less like a voxel world and more like a 3D pixel scene. Great stuff!

    • @mkay2223
      @mkay2223 Před rokem +15

      Uhm voxel are 3D pixels...

    • @LimitedWard
      @LimitedWard Před rokem +4

      @@mkay2223 my Toyota looks less like a car and more like a 4-wheeled gas-powered passenger vehicle.

    • @MouseGoat
      @MouseGoat Před rokem

      @@LimitedWard Get a Tesla then :V

  • @TrentSterling
    @TrentSterling Před rokem

    This looks fantastic! Shocking that it runs in browser!

  • @leonstansfield
    @leonstansfield Před rokem +1

    this is really impressive!

  • @progoldfish7441
    @progoldfish7441 Před rokem

    looking good!

  • @Albanus15
    @Albanus15 Před rokem

    amazing project man!

  • @CHKNSkratch
    @CHKNSkratch Před rokem

    this is amazing! I'd love a downloadable version!

  • @rocknroll113
    @rocknroll113 Před rokem

    Playable demo is amazing, performs great and also is really cool you are able to ship something to people in the browser right now.

    • @Kaltinril
      @Kaltinril Před rokem

      Huh, I get half a frame a second on a good spec computer. I wonder what the difference is that's causing this.

    • @Kaltinril
      @Kaltinril Před rokem +1

      Figured it out. I forgot I had disabled hardware acceleration in Chrome because some 4K video's don't render fast enough and I would get Dropped frames.
      I tried it out in Edge and it worked well, so then I went back and enabled hardware acceleration (When I remembered it was off) and now it's smooth as butter.

  • @lowellrindler9454
    @lowellrindler9454 Před 6 měsíci

    man this is really impressive. and clever too!

  • @isacaaron
    @isacaaron Před rokem

    Wow this is amazing stuff!!

  • @hehe8138
    @hehe8138 Před rokem +15

    I'm surprised the demo ran so smoothly on my laptop, which wasn't plugged in, and doesn't have a GPU. I was expecting a little lag at least.

    • @mirabletest
      @mirabletest Před rokem +1

      everything is static, no background functions is running, my oven could run a static game

    • @hehe8138
      @hehe8138 Před rokem +11

      @@mirabletest you can add and remove voxels and there is chunk loading/unloading, which is dynamic. Having worked with voxels before I find it impressive

    • @GoatMen
      @GoatMen Před rokem

      @@mirabletest Link your GH

    • @mirabletest
      @mirabletest Před rokem

      @@GoatMen gh?

  • @80sVectorz
    @80sVectorz Před rokem

    This is incredible!

  • @JebacPresretac101
    @JebacPresretac101 Před rokem

    Dev to dev, big brain to 8x8x8 the voxels on GPU. Toying with further rendering improvements is just an icing on the cake.

  • @kairu_b
    @kairu_b Před rokem

    This is beautiful.

  • @zyansheep
    @zyansheep Před rokem +2

    Very cool! I can't wait until we have scale-of-the-universe voxel engines in rust 👀

  • @chucksneedmoreland
    @chucksneedmoreland Před rokem

    fantastic work

  • @theunskruger1211
    @theunskruger1211 Před 11 měsíci

    This is so cool!

  • @brickolo_
    @brickolo_ Před rokem +2

    I can only imagine this sorta tech implemented into something like minecraft, the amount of voxels that can run at once is insane! Looking forward to seeing the future of this project.

  • @jungervin8765
    @jungervin8765 Před rokem +1

    This is amazing

  • @altus1226
    @altus1226 Před rokem +3

    You should consider picking up either a stereo lapel lavaliere mic pair, or if you have a soldering iron and want to save 80% on the cost- a mono lapel lavaliere mic pair and rewire it to stereo.

  • @SpicyMelonYT
    @SpicyMelonYT Před rokem

    I am soooo gonna use this for games when its ready! Even if it costs!

  • @ThatLuckyBear
    @ThatLuckyBear Před rokem

    Lol. I never realized Navi doesnt say anything when she leaves. That's amazing.

  • @joeysipos
    @joeysipos Před rokem

    The artist who painted with dots - Georges Seurat would be proud!

  • @JunexOfficiaal
    @JunexOfficiaal Před rokem

    Really good looking it reminds me of cube world.

  • @noelboxtrot7034
    @noelboxtrot7034 Před rokem

    Organization is a key to success

  • @gandalfthegrey6592
    @gandalfthegrey6592 Před rokem

    Can't wait for a physics demo!

  • @KudeKube
    @KudeKube Před rokem +3

    How are you making progress so fast! This is just so cool.

  • @Alukard55
    @Alukard55 Před rokem

    Awesome!

  • @dr.maninderjitkaur7805

    you record with hardware outside of the program. Great tutorial btw it was very detailed but still just right for beginners.

  • @samtrafton8445
    @samtrafton8445 Před 6 měsíci

    This is very cool! I wonder what the performance impact would be of giving every rendered voxel a physics and collision mask

  • @GregoryTheGr8ster
    @GregoryTheGr8ster Před rokem +3

    Another question: when you draw a voxel as a hexagon or rectangle, how do you calc the depth value for the z-buffer?

  • @axelpothier2957
    @axelpothier2957 Před rokem

    This is sick! I've been wondering when someone would use ray marching for a voxel engine.

  • @invisibilities
    @invisibilities Před rokem

    wow actually, this game has potential, i have tried that online demo, but for real, it actually does look amazing and i'd love to play it if it ever gets released, and it might be even more interesting if it has had multiplayer and it's own accounts etc, more like minecraft but it's a different game basically.

  • @RhizometricReality
    @RhizometricReality Před rokem

    For your calculations for tree bending and sway, please consider building rulesets for materials, and have a value for how much pressure that material can flex before breaking. All connected materials of same type of material flex together as force is applied and distributed through the point of pressure. Wind will rustle but axe will cleave

    • @AlexK-jp9nc
      @AlexK-jp9nc Před rokem

      Doing plastic deformation in my voxel game

  • @keptleroymg6877
    @keptleroymg6877 Před rokem

    This is everything I wish game dev was always like

  • @goldfish2289
    @goldfish2289 Před rokem

    I understood the colors in this video

  • @zoidsynergy9304
    @zoidsynergy9304 Před rokem

    Pure beauty

  • @tannosetubal4658
    @tannosetubal4658 Před rokem

    Great job! wish i could see the code, keep it coming!

  • @PotatoImaginator
    @PotatoImaginator Před rokem

    Pretty cool ! I wish i could make this too 🥺

  • @spacelike4
    @spacelike4 Před 7 měsíci

    @DouglasDwyer Thank you so much for creating this and sharing the ideas. I've also been playing around with my own voxel engine which uses greedy meshing, but I think your method is so much better.
    I love how this method naturally allows LOD in the visible voxels. It feels more like how voxels were always meant to be rendered. Without actual geometry, just being painted from the voxel data itself.
    Also, if I'm not mistaken wouldn't this rendering method allow you to actually render "portals" accurately? Since all the voxel data is on the GPU each fragment can access data from the other side of the portal easily.

  • @user-xb6fl9ri6g
    @user-xb6fl9ri6g Před rokem

    Hell ya this is great :)

  • @balbek
    @balbek Před rokem

    That's a grate job! Very nice graphics
    But uneven pixel size looks so strange to me when lens flare shows up
    Hope you'll stick with this project

  • @crazydemon3890
    @crazydemon3890 Před rokem

    Voxel Engine + VR = BOOM

  • @dynamicgoose6829
    @dynamicgoose6829 Před rokem

    this seriously looks very promising! Keep it up. (maybe try improving the audio quality)

  • @loupgauvin-dufresne7402

    You should add ambient occlusion and an atmosphere

  • @guywithapotato1658
    @guywithapotato1658 Před rokem +1

    You should look at John Lin's sandbox. It's kinda sad it's not blowing up more.

  • @kvark1073
    @kvark1073 Před rokem

    This minecraft world is so huge!

  • @spookyskeleton5179
    @spookyskeleton5179 Před rokem

    Some bugs but so much potential keep the updates coming

    • @DouglasDwyer
      @DouglasDwyer  Před rokem

      I'm glad you enjoyed the video! If there is anything in particular that isn't working, if you could give me a short description of how to reproduce, that would be a big help :)

  • @agrihonoberjorn1612
    @agrihonoberjorn1612 Před rokem

    I had an idea for a video game for a long time is it possible to add a value to the groups of voxles so they can have different behaviour scripts mounted to them?

  • @UltimatePerfection
    @UltimatePerfection Před rokem

    Pretty cool. Considered implementing dual contouring or marching cubes to smooth out the terrain?

  • @gadget2622
    @gadget2622 Před rokem

    This is cool work, as someone working on their own voxel related software, I wonder if you would have been better served using OpenVDB as the underlying voxel structure, given how efficient it is and how it has existing GPU compatibility.
    The way you work with gpu buffer mapping feels similar to my own work with the difference being I’m dealing less with rendering, but you I think you might be leaving performance on the table by using octrees and not an OpenVDB data structure, just because of its access time improvements.
    Something to think about I guess, I could be wrong, I don’t know the specifics of your code.

  • @termisher5676
    @termisher5676 Před rokem

    can you make spawning threes animated like it was rising from ground. not actualy growing but renderign one block after another?

  • @swaggington
    @swaggington Před rokem

    Amazing stuff! Its amazing to see this kind of work being done in Rust as well :)
    (It would be great if you could get a better Mic, I bet that would really help with the youtube channel)

  • @TheLightningStalker
    @TheLightningStalker Před rokem

    You had me at "frustum".

  • @art.with.yashuu
    @art.with.yashuu Před rokem

    anybody why when i loop a soft, at the end of my loop, my soft starts a half a soft early or late. makes it super frustrating

  • @tokyospliff
    @tokyospliff Před 10 měsíci

    Are you casting rays into triangles representing the voxel faces/oct tree bounding boxes or are you stepping through the grid one "unit" at a time?

    • @DouglasDwyer
      @DouglasDwyer  Před 10 měsíci

      In this version of the engine, I drew triangles on the screen which dictate where rays will begin - then, I step through the grid one voxel at a time.

    • @tokyospliff
      @tokyospliff Před 10 měsíci

      @@DouglasDwyer Nice. Looks beautiful. Do you think that's faster than ray triangle intersection test? Is there a discord for this topic?

    • @DouglasDwyer
      @DouglasDwyer  Před 10 měsíci

      For voxels, it's absolutely faster than ray-triangle intersections because it better exploits the grid-based nature of the data. This technique is fast enough to run in realtime even on integrated graphics cards! While I don't administrate a Discord server myself, I do hang around on Gabe Rundlett's server - he's another voxel CZcams with a really innovative project. Feel free to join there if you'd like!

    • @tokyospliff
      @tokyospliff Před 10 měsíci

      @@DouglasDwyer Ok sweet, will rewrite. I started a voxel engine a few days ago, I'm not going for big open worlds but rather to use a voxel representation of the scene to propogate light through a grid to simulate indirect diffuse. Posted a clip of the work so far in Gabe's channel. Keen to see your project progress man, keep up the great work!

  • @netcore10
    @netcore10 Před rokem

    It reminds me of an art piece in 3d

  • @TiagoTiagoT
    @TiagoTiagoT Před rokem

    I think I found a bug. If you dig straight down and walk a bit to keep falling and going deeper as you dig, eventually you move inside the solid dirt and if you try to move you soon get quantum tunneled back to the surface (not sure if it's a random location or straight above where your tunnel was)

  • @user-uy8yt7ku4w
    @user-uy8yt7ku4w Před rokem +20

    Imagine if Mojang hired talented programmers like this guy

    • @TeskesLab
      @TeskesLab Před rokem +2

      The optimization done in that engine is pretty similar of what mojang does with minecraft chunking.

    • @MINIMAN10000
      @MINIMAN10000 Před rokem +1

      I mean he demonstrated knowledge of rendering techniques and backend work. At best we would see great improvements to optimization. But I don't know how many people say "Man I would love to play minecraft but it's too laggy for me" Teardown is probably the only game off the top of my head that actually took their backend and engine development into an actual game. They are two very different skillsets and passions.

    • @user-uy8yt7ku4w
      @user-uy8yt7ku4w Před rokem

      @@MINIMAN10000 True. But wouldn't you want to play with 500 chunks render distance? Just because you don't absolutely have to optimize doesn't mean you shouldn't.
      Btw I don't blame devs, it's all because of Microsoft.

    • @LegendLength
      @LegendLength Před rokem

      @@user-uy8yt7ku4w minecraft code is extremely bad even for 2010 standards, virtual no usage of gpu for physics or render

    • @user-uy8yt7ku4w
      @user-uy8yt7ku4w Před rokem +1

      @@LegendLength that's exactly what I'm saying. Sadly, Microsoft isn't pressured to improve the efficiency because it sells anyway. Another thing they could improve - make it open source and add official mod support. Minecraft would be just another indie game if not for the modding community and it should be acknowledged. Microsoft wouldn't even loose money on that because Minecraft is easiest game to pirate anyways

  • @benjaminhansen5554
    @benjaminhansen5554 Před rokem

    Does this technique support ray-marched reflections, or will you have to resort to traditional techniques?

  • @GregoryTheGr8ster
    @GregoryTheGr8ster Před rokem

    Also, it looks like each voxel is being rendered as a single hexagon (or rectangle) of a solid color. In reality, each face of the voxel ought to be a different shade, due to the angle of the light being different for each face. How do you decide which shade to make the voxel?

    • @DouglasDwyer
      @DouglasDwyer  Před rokem

      While per-voxel and per-face lighting are both possible, the current scheme is per-voxel lighting by averaging the lit color of the visible faces together.

  • @Thomas_wur
    @Thomas_wur Před rokem

    It can run on my i5-7200u igpu pretty well if the render distance isn't too high
    Though it froze when I tried to remove voxels from within the terrain (I dug down for a while, then clipped trough the wall and got stuck inside the terrain (I ended up just closing the window)
    Also, when chunks weren't loading (it was pretty slow) I could see black surfaces being rendered under the terrain, is that normal?

    • @DouglasDwyer
      @DouglasDwyer  Před rokem

      Thanks for checking out the demo, and reporting your experience! I really appreciate it.
      Yes, I believe the freezing is a bug that I'll patch when I get the chance. Basically if the game is trying to load a chunk, and it gets modified at the same time, the game expects the chunk to already be loaded and as such becomes confused.
      Black surfaces under the terrain are normal; they're an artifact of parallax ray marching. I could (at the expense of some additional processing cost) remove them, but since you shouldn't normally be able to see them, I don't think it's a big deal.