This is fantastic. Really appreciate the deliberate and detailed explanations.
@DreamaxeOfficiel12 күн бұрын
How do you handle hot reloading of wasm ?
@Gameout5017 күн бұрын
11:00 that actually looks amazing.
@LyrelGaming27 күн бұрын
What a great explanation! Was looking for exactly this. Would love to see more of optimization tricks / rendering techniques
@FrankHarwaldАй бұрын
One thing: importance sampling is still beneficial even for an optimized path tracer, because even if you don't need to increase the number of rays anymore, importance sampling also increases the quality of the resulting image for the same number of rays (by further lowering its signal-to-noise ration) - especially in dimly lit areas. This means you might lower the amount of filtering/blurring without getting the image to become all noisy again. One problem which importance sampling has & will probably also be true here is that it has trouble getting high variance spikes of indirect light right, meaning to get this to look noise-free you'll either have to blur at least the overly sharp indirect scattering coefficients making reflections & refractions look a little more blurred or using a hybrid approach to only use importance adjusted random sampling only for direct light & broader lobes of the BRDF while for sharper spikes of the BRDF to fall back to the old method of uniformly sample them. (Not: does your engine even supposed to support reflections / refractions at this point? Because if not then this issue with sharp variance spikes of indirect light won't be an issue itfp)
@FrankHarwaldАй бұрын
10:30 Note: this isn't necessarily the case if you're using a regular grid but the shape of the higher resolution voxels of an object might have a very long diagonal shape on screen so that it lies entirely between all of the horizontal & vertical coarse grid voxels - but this depends on the shape that the voxels of high-res objects can have.
@HiHi-iu8gfАй бұрын
neat optimisation
@thegameengineblueprintАй бұрын
Hi, thanks for making the video! I was wondering in 2d do you only ever have to check corners with all other voxels? And do you do continuous collision detection, I saw it was mentioned in the Teardown talk but Denis didn't expand on it. Just checking if you knew more about it?
@smangalangАй бұрын
what did you end up doing to check if a chunk of voxels becomes disconnected to the environment?
@DouglasDwyerАй бұрын
That's a great question. Indeed, I use a version of flood-fill/depth first search to find groups of voxels that aren't touching anything else. (The flood-fill algorithm is highly optimized to work with a custom binary voxel data structure.)
@smangalangАй бұрын
@@DouglasDwyer thanks for the response. do you run this every time there is a change to the voxel occupancy bitmask thing? and how do you choose which voxel to use as the seed for the flood fill algo?
@DouglasDwyerАй бұрын
@@smangalang Yes, the algorithm is re-run for all user edits. Regarding a seed, the flood-fill algorithm involves multiple searches, so it can categorize every single connected component within the edited region. As such, the flood-fill algorithm is repeatedly run using a new voxel as the seed until all voxels in the edited region have been detected.
@smangalangАй бұрын
@@DouglasDwyer neat! thank you
@FrankHarwaldАй бұрын
Nice, but keep an eye out on the memory consumption of the loaded voxel scene for large maps - large detailed volumetric maps can easily eat more system memory than any system can handle if stored naively without any kind of deduplication (object instantiation) or sparsification/compression of the assets.
@EngineeringKa14Ай бұрын
Do you use floodfill to convert floating chunks into rigid bodies?
@DouglasDwyerАй бұрын
That's a great question. Indeed, I use a version of flood-fill/depth first search to find groups of voxels that aren't touching anything else. (The flood-fill algorithm is highly optimized to work with a custom binary voxel data structure.)
@markusangrignon5758Ай бұрын
Please never stop! This is amazing.
@Paloma1337Ай бұрын
so how do you get the color weighting if you don't know the order of the objects? Distance to the camera is the same as ordering of objects, no?
@tristotechАй бұрын
Cool! First of all, its a moddable game. The second one its WASM game
@robinmattheussen2395Ай бұрын
Very cool! I was just wondering if you happened to make use of the Parry or Rapier crates when implementing this, and if so, how did that work out for you?
@DouglasDwyerАй бұрын
@@robinmattheussen2395 nope! While off-the-shelf physics engines can be handy, they're not that useful for large-scale voxel engines since for performance all of the collision detection needs to be custom anyway. As such, I can't comment on those crates :)
@robinmattheussen2395Ай бұрын
@DouglasDwyer Understandable, I was just curious. Still, really impressive stuff man!
@voxoking32Ай бұрын
I love you douglas
@lkjh161Ай бұрын
Dude, how do you update the svo? It's supposed to be static. I'm trying to build my svo game engine
@m4rt_2 ай бұрын
Have you looked at GJK/EPA? (Casey Muratori has a good video explaining GJK, both in his "Papers I Have Loved" talk, and his old video "Implementing GJK" where the former talks about it in more general terms, and the latter goes more into the details of how it works. Also, Kuju has a good video visualizing and explaining GJK. GJK is the base collision detection, EPA figures out how much it is overlapping, etc.) With GJK you may end up having to test less verticies/edges, as 1. you just check the verticies and 2. you use some clever tricks to figure out which ones to check. And if you end up doing this, you could gather the edge verticies to make a collision mesh, and just do the GJK on those, rather than directly on each voxel. Though you may have to subdivide the mesh if it isn't convex, as it has to be convex to work.
@hatersgonnalovethis2 ай бұрын
Have you seen Dawn Apart?
@luuk36562 ай бұрын
This looks sick af i hope you'll make it vr compatible
@eliteengineer73402 ай бұрын
This man is literally making history
@noviui2 ай бұрын
What about opensource?
@MountainLabsYT2 ай бұрын
Looks fabulous, Also your video quality has gone up substantially.
@MountainLabsYT2 ай бұрын
Gosh 0:15 looks so satisfying.
@lennart253112 ай бұрын
Can you make an in depth tutorial for the 2D version of the physics engine?
@VcSaJen3 ай бұрын
I understand why it's like that, but still, "real" rotating and moving in the voxel world wouldn't involve rotation of voxels themselves (just like how pixels don't rotate and move on a 2D screen when 2D objects are rotated and moved).
@Harald7233 ай бұрын
Can you make a toutorial for making mods?
@quetolical_51783 ай бұрын
I absolutely love the per-voxel lighting. I can’t explain it but the specular highlights and sharp shadows give a really nostalgic feel. The GI adds just enough realism 😇
@haydennorris29133 ай бұрын
Simulating soft body voxels i think is usually hardware intensive. Minute papers had a video about a paper where people trained AI to handle the physics and made it an order of magnitude faster while being a very convincing fake simulation.
@MountainLabsYT3 ай бұрын
Awesome.
@TeltStory3 ай бұрын
I can't wait to use this as a voxel renderer in godot
@thHogBox3 ай бұрын
Need to support low end gpus, just knock the res to 480p haha
@PlayBASIC-Developer3 ай бұрын
The low res render looks very N64
@MrUbister3 ай бұрын
0:13 Idk why but that pixelated lens flare is so cute hahaha
@crytracker3 ай бұрын
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
@cosmo97623 ай бұрын
This technique is amazing and so simple! I've just implemented this in my own engine and it looks very promising. Thank you!
@sambubu41953 ай бұрын
Very cool
@Gandalf_Le_Dev3 ай бұрын
Quick question, how would you load assets such as new textures or models from a mod ?
@marc51373 ай бұрын
I'm working on building a modding system for Bevy. It's tough getting all the different parts working together, especially between wasm and the engine but very rewarding when it finally does. Great work!
@marceloferrante3 ай бұрын
What about using lua for scripting?
@gsestream3 ай бұрын
nice webassembly hijacked the wasm name, from a native assembly compiler, lol. also your engine works like unreal engine visual coding with the mods. kinda. yep the mods are like visual coding system. xbox controllers are used often on pc games too. how about party animals, gang beasts or human fall flat style of physics game. also 3d worms style landscape pixel destruction game. or just 3d destructive landscape shooter.
@felix83073 ай бұрын
is the engine/game itself written in rust?
@DouglasDwyer3 ай бұрын
Yes, it's Rust all the way down :)
@felix83073 ай бұрын
@@DouglasDwyer thanks for taking your time to reply!
@dmitry-diehl3 ай бұрын
Please, look at Voxtopolis game. It is amazing and author releases video about his new building system yesterday.
@JanoschNr13 ай бұрын
Well duckless, I hope you find your duck! :D
@daveyboon94333 ай бұрын
I'm loving it! Multi player would be something I would be interested in.
@TheJasonParser3 ай бұрын
This is one of the best voxel engine's I've ever seen. Probably not that fastest but wow, the compatibilities are insane. It's very well thought out.