Home games Adding ray tracing (back) to my game engine [Voxel Devlog #17]

Adding ray tracing (back) to my game engine [Voxel Devlog #17]

by admin



Online demo: https://github.com/DouglasDwyer/octo-release
Additional voxel models: https://drive.google.com/drive/folders/1lXTpIvv9BGtOaAVj0oaVUmOKiZ_cfWwE?usp=sharing

It’s time for another devlog, and the engine has undergone a ground-up rewrite! In this video, I showcase the new ray marched graphics. I discuss the drawbacks of rasterization and the importance of two attributes in voxel engines: per-voxel colors and per-voxel normals. Then, I explain the performance improvements in this iteration of the engine over my initial attempts two years ago.

Music used in the video:
Karl Casey @ White Bat Audio – The Saga
Chris Doerksen – Chase
Karl Casey @ White Bat Audio – End Credits

source

Related Videos

34 comments

@DouglasDwyer September 18, 2024 - 8:43 pm

Want to learn how to write powerful, high-performance code? Then be sure to check out CodeCrafters using the link below, and help support my channel:

https://app.codecrafters.io/join?via=DouglasDwyer

They have one project which is completely free to complete during their beta, and you can begin any of their projects for free! Get 40% off if you upgrade to a paid account within three days.

@thHogBox September 18, 2024 - 8:43 pm

Need to support low end gpus, just knock the res to 480p haha

@PlayBASIC-Developer September 18, 2024 - 8:43 pm

The low res render looks very N64

@MrUbister September 18, 2024 - 8:43 pm

0:13 Idk why but that pixelated lens flare is so cute hahaha

@Permaviolet September 18, 2024 - 8:43 pm

I think one of the coolest things about averaged normals per-voxel is that you get nice edge bevels on sharp objects basically for free

@piewars12345 September 18, 2024 - 8:43 pm

Do you think your block tree thing is similar to Crytek's SVOGI or sparse voxel octre global illumination? I'm not a programmer at all, but I always find this stuff interesting.

@PdalyProductions September 18, 2024 - 8:43 pm

wow!

@Alferov_Igor September 18, 2024 - 8:43 pm

Вконце я удивился. Интересно.

@nomino3697 September 18, 2024 - 8:43 pm

nice W vid thx

@user-fi4zi5il9z September 18, 2024 - 8:43 pm

I like the new video format!

@YippeePlopFork September 18, 2024 - 8:43 pm

So you’ve switched to grouping 64 voxels together and using 64 bits to represent the presence – or absence – of a voxel in that group…but can I ask: what physical size you’ve designed an individual voxel to be? From the video it looks as if each voxel is supposed to be a few centimetres in size, but it’s hard to tell. I’m particularly curious because of the permanent storage requirements of “tiny” voxels (at least…tiny compared to the Minecraft 1m cubed voxels…). I’m working on my own system (as per my comment on another of your videos) and trying to balance the requirements of higher detail (smaller voxels) against permanent storage requirements (smaller voxels = higher voxel density = more voxels = more storage requirements).
Are your voxels ~5cm cubed or bigger or smaller?

@GamerSaga September 18, 2024 - 8:43 pm

I am a bit confused your video description says using raytracing but you talk about raymarching?

@lanefaulhaber1824 September 18, 2024 - 8:43 pm

Looks crazy cool!

@lanefaulhaber1824 September 18, 2024 - 8:43 pm

Do you think at some point you'll go for smaller voxels?

@Nevetsieg September 18, 2024 - 8:43 pm

I always wonder that what if a voxel is smaller than a pixel? Will this super hi-res voxel world do better than a polygonal world? Better than Unreal Engine maybe? And how the hell do I rig and animate these voxels characters?

@thesandwife September 18, 2024 - 8:43 pm

how well would this run on integrated architecture for devices like the Quest 2 / 3?

@drawishes September 18, 2024 - 8:43 pm

gonna go roll some of that tetrahexaconta

@dexio85 September 18, 2024 - 8:43 pm

Rerwriting is at the heart of gamedev 🙂

@monstercameron September 18, 2024 - 8:43 pm

Variable rate shading?

@StiffAftermath September 18, 2024 - 8:43 pm

Nice to see the project coming along! Very excited! Thank you!

@tommj4365 September 18, 2024 - 8:43 pm

great progress, I've been a fan of voxel worlds since I was a wee little child, so it's always a treat seeing some new progress in this arena

@Irowned September 18, 2024 - 8:43 pm

10:41 looks like when google street view doesn't load properly.

@reachmehere2194 September 18, 2024 - 8:43 pm

8:56 so I’ve got a question, it’s my understanding that the bit mask stores whether or not something is there. How do you tell it “what” is there rather than just “something”? This is the part that I’ve been struggling in my own journey, is encoding the “what” along with the “where” because either are easy on their own.

My initial guess was maybe you have a mask for each type of material?

@guigazalu September 18, 2024 - 8:43 pm

When resizing the screen, use something like ICBI / FCBI to upscale the image and get a almost high quality result!

@ZYZZinVR September 18, 2024 - 8:43 pm

just started my data structure/algorithms course and seeing why the efficiency can be so important even on personal projects is motivating

@Sovereing2027 September 18, 2024 - 8:43 pm

GJ

@detesla9575 September 18, 2024 - 8:43 pm

On your style of talking in this video, you remind me of that Rabbi in Seinfeld who councils Elaine

@MyKaosLife September 18, 2024 - 8:43 pm

Love this! I saw some other comments on further ways to optimize traversal & memory usage, but from now on the common term for the 4^3-tree models should obviously be the THC-tree model 😄

@bartomiejtudryk5649 September 18, 2024 - 8:43 pm

gpu memory is slow?
wtf are you talking about
it may be slow to access from cpu, but not from gpu itself

@INT41O September 18, 2024 - 8:43 pm

Do you upload the entire scene to the GPU memory at once? What if that does not fit, do you use any compression or out-of-core techniques?

@SpicyMelonYT September 18, 2024 - 8:43 pm

WEED MARCHING omg LOLOL

@deRNmEpRrMm September 18, 2024 - 8:43 pm

Please stop using ray tracing and ray marching interchangeably.

@trashman1358 September 18, 2024 - 8:43 pm

First time I've come across your channel. I've always felt voxels are like a computer making graphics like (checks notes) a Post-Impressionist oil painter. The church and village at the end of the vid? Both facinate and excite my brain for reasons I simply can't fathom. Love, love, love voxels and if that's your engine? You've absolutely cracked it visual wise. Subscribed.

@NyanCoder September 18, 2024 - 8:43 pm

Wow, that "low resolution" looks very interesting IMO. Idk why, but it reminds me ps1, and it's fascinating that it's all voxels. I think there would be a lot of cases of making use a such style. And it's true pixel-art (without shifting and rotating pixels)

Comments are closed.