How to do Marching Cubes (Unity 2020)

preview_player
Показать описание
Haven't made a video in a while. That's because this marching cubes algorithm took me awhile to unravel. Most of the work was in the 256 cube configurations and the isofaces it takes to build them. I figured them all out myself (even though there were probably daat available on internet somewhere). Oh well, learn the hard way, and I'll never forget.

In this video I'll go over how the marching cube algorithm works, how to use it, how to figure out the cube configurations. You'll see it animated in action. There is a cube configurator scene that helps you see what each cube configuration looks like.

- browse/search my entire video collection
- download source and assets for tutorials
- sign up for omarvision kids coding camps
Рекомендации по теме
Комментарии
Автор

Mad respect for this person, manually finding out all the triangle configurations

benhoneyfield
Автор

I love how you went from triangle, to quad, to cube and now raymarching, love it!

aikatheshibainu
Автор

A picture is worth a words! I think this is THE BEST explanation video about marching cubes on youtube so far. much better than those academic papers.

xshawn
Автор

Thanks for this tutorial. I'm attempting to make a vr game for the quest inspired by things like valheim and old beta versions of minecraft. I want my terrain to be mineable and voxel based, but didn't want it to be completely cuboid. this is a perfect happy medium of blocky to smooth and the low poly look goes perfectly with what I'm going for.

Freg-ldlo
Автор

I implemented something similar to this one yesterday. Thanks for making tutorial I learned new things from it and corrected my approach. Also you should look into connected component labeling next. It is used to identify if part of mesh is not connected or not.

prathameshpatil
Автор

Excellent work! I was looking for this for a long time and finally a walkthrough demo! Really nice done! Thank you🎉❤!

denghaoliu
Автор

How can i change the position in to the middle? i would like to create a sphere, but the sphere is on the one corner of my Grid, so that some parts are not render.

HoloDoctor
Автор

This is really well done! I wanted to incorporate this into my game, but the only thing I could find was Sabastion Lague, and his videos, while impressive, are not particularly... user friendly

forestlapointe
Автор

Bruh, I've been trying to figure this out for ages. You are the best. Subscribed.

themusicguy
Автор

Hi there, thank you for the tutorial and the code! I am trying to figure out how to generate as a player walks, but for some reason the marching cube algorithm can only correctly generate at (0, 0, 0). Right now, I have it generating so that the player is always in the center, but everything except for the first quadrant of the mesh (from top down, positive x, positive z quarter of the mesh) has all faces inverted. Any idea what I can do to fix this?

LucasErickson
Автор

I agree that some load times are longer than 2019.4. Actual editor gameplay is faster though. As well as lightmap baking

christianstarr
Автор

Hi, thank you for posting this; it helped me a lot. Still, I have difficulties adding a collider to the mesh. 😓 Have you posted a video explaining this or any kind of article?

osmium
Автор

Great video but how would you add collision to this so you could have a player running around exploring the caves? and not fall through the ground.

fronkis
Автор

thanks for explaining your marching cube script i coudnt figure out for the life of me how to do uvs but now that i had a look at your mine is finished thnxs

voidstudios
Автор

is there a way to confine the 3d perlin noise to a radius

jeandredegenaar
Автор

Amazing video really helped with a project im working on.

casualpigeon
Автор

This was awesome! Thank you so much for this resource

michaelanderson
Автор

great video i learnt so much i just had 1 question

how are you turning on the voxels with the sphere at the start of the video

thenubblet
Автор

How would you make destruction like mining?

drollestprawn
Автор

Hi Omar, your videos are so helpful! :) i would like to learn Dual contouring(Hermite data/QEF) algoryth but i don`t understand how DC work :( Will you do a tutorial about dual contouring too?? :)

powerofp