The PERFECT voxel rendering pipeline (and online demo) [Voxel Devlog #7]
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
I can't wait to see Ace Of Spades being remade with this engine
Although it’s not nearly as great with voxel detail, I just discovered OpenSpades -a lot of shader detail and volumetrics, might like it ^^
@@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)
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
Miss this game so much haha
TRUE
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!
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.
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.
i absolutely adore this style of graphics of voxel games, less minecraft and more like teardown, very nice! keep up the work man
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!!
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
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!
It's fascinating to see someone by himself is capable to do this. Thank you for sharing
This channel is wildly underrated. On my way to watch the rest of the devlogs!
Very excited to see another long form video!
Wow, that looks amazing! Keep up the good work!
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.
wow this looks great! i especially love the pixelated light effects!
Wow, you've come far with this! Congratulations! Keep up the great work, you're going places!
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
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.
i have love for physics, im curious if he could do a water simulation tho
given John Lin's approach is probably called Blender, I don't think its very comparable
@@AfonsodelCB what?
@@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.
@@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.
this is awesome bro it looks very interesting evokes nostalgic feelings for old childhood games
Loving the devlogs, keep it up!
Yes! Glad someone found this out, I've done this but life got in the way from doing anything with it
Breath taking outstanding work
wow! I feel honored to be one of the first to play this
Douglas if you see this and this game ever gets big, can I have like the alternate of a Minecraft cape?
lol
@@Gwilo I'm so glad that you enjoyed the video! Maybe we can set up capes for my early CZcams subscribers, ha ha.
Great work here! Nice job!
Looking good! Keep up the great work!
YOU HIT 1K!!! Congrat(ulation)s!!!
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.
gorgeous and clever handling!
Thanks for the continued updates ^^
You're doing great! Good luck, my dude:)
This looks amazing lad! 👏
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.
using it for a few years and now I want to upgrade and I'm happy I did that.
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.
Tried the demo, really impressive!
This is really cool, i'm eager to see how it develops.
Lots of progress being made!
Looks amazing. I was longing for a full-length devlog. I love the shadows being the change of colors of individual voxels.
I am working on a voxel engine similar to this as well. However your approach is much more elegant.
So cool! Thanks a lot for sharing!
This looks really cool and pretty as well.
Those resource sharing tricks are brilliant
It looks amazing! Less like a voxel world and more like a 3D pixel scene. Great stuff!
Uhm voxel are 3D pixels...
@@mkay2223 my Toyota looks less like a car and more like a 4-wheeled gas-powered passenger vehicle.
@@LimitedWard Get a Tesla then :V
This looks fantastic! Shocking that it runs in browser!
this is really impressive!
looking good!
amazing project man!
this is amazing! I'd love a downloadable version!
Playable demo is amazing, performs great and also is really cool you are able to ship something to people in the browser right now.
Huh, I get half a frame a second on a good spec computer. I wonder what the difference is that's causing this.
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.
man this is really impressive. and clever too!
Wow this is amazing stuff!!
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.
everything is static, no background functions is running, my oven could run a static game
@@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
@@mirabletest Link your GH
@@GoatMen gh?
This is incredible!
Dev to dev, big brain to 8x8x8 the voxels on GPU. Toying with further rendering improvements is just an icing on the cake.
This is beautiful.
Very cool! I can't wait until we have scale-of-the-universe voxel engines in rust 👀
fantastic work
This is so cool!
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.
This is amazing
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.
I am soooo gonna use this for games when its ready! Even if it costs!
Lol. I never realized Navi doesnt say anything when she leaves. That's amazing.
The artist who painted with dots - Georges Seurat would be proud!
Really good looking it reminds me of cube world.
Organization is a key to success
Can't wait for a physics demo!
How are you making progress so fast! This is just so cool.
Rust is the reason why >:3
Awesome!
you record with hardware outside of the program. Great tutorial btw it was very detailed but still just right for beginners.
This is very cool! I wonder what the performance impact would be of giving every rendered voxel a physics and collision mask
Another question: when you draw a voxel as a hexagon or rectangle, how do you calc the depth value for the z-buffer?
This is sick! I've been wondering when someone would use ray marching for a voxel engine.
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.
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
Doing plastic deformation in my voxel game
This is everything I wish game dev was always like
I understood the colors in this video
Pure beauty
Great job! wish i could see the code, keep it coming!
Pretty cool ! I wish i could make this too 🥺
@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.
Hell ya this is great :)
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
Voxel Engine + VR = BOOM
this seriously looks very promising! Keep it up. (maybe try improving the audio quality)
You should add ambient occlusion and an atmosphere
You should look at John Lin's sandbox. It's kinda sad it's not blowing up more.
This minecraft world is so huge!
Some bugs but so much potential keep the updates coming
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 :)
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?
Pretty cool. Considered implementing dual contouring or marching cubes to smooth out the terrain?
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.
can you make spawning threes animated like it was rising from ground. not actualy growing but renderign one block after another?
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)
You had me at "frustum".
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
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?
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.
@@DouglasDwyer Nice. Looks beautiful. Do you think that's faster than ray triangle intersection test? Is there a discord for this topic?
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!
@@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!
It reminds me of an art piece in 3d
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)
Imagine if Mojang hired talented programmers like this guy
The optimization done in that engine is pretty similar of what mojang does with minecraft chunking.
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.
@@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.
@@user-uy8yt7ku4w minecraft code is extremely bad even for 2010 standards, virtual no usage of gpu for physics or render
@@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
Does this technique support ray-marched reflections, or will you have to resort to traditional techniques?
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?
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.
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?
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.