@@arzr_er There's a difference between not memorizing every API out there and not knowing how to do things. If you are implementing something that requires vector math, it's ok to look up what function/operator performs cross products in your engine/library of choice. In fact, that's expected. What's not alright is not knowing how to compute a cross product if you are writing code that uses them. Same goes for just about every algorithm, no matter how complex - within realm of game development, at least. You don't have to know all the intricate details involved in optimization - though, a good senior engineer will have a domain where they are an expert in these. But you have to understand how an algorithm works well enough to write a simple implementation. Naturally, I don't actually expect this to be the case for a junior engineer, but that should be the goal. That is something you strive towards throughout your career. That means taking an interest in things you are working with and not treating every API call as a black box. Digging into things, figuring out how they work, trying to write our own implementation, even if you know it won't ever be as good as what's already in the library - that's how we get better as engineers. People who don't do that don't get better. And since nobody gets born a good engineer, I can confidently say they never became a good engineer. There is, of course, a flip side to this. Engineers who re-write absolutely everything, because they never learned to search through documentation, the code base, or open source projects as applicable. In my experience, however, that's easier to fix, so it's not a deal breaker in new hires for junior or mid level, in my opinion.
@@konstantinkh It's in fact okay to look up how to do cross products too. Stop being a gatekeeper. It's much more about how workable the code becomes as it grows, if it scales, if it is readable, if it is modular. You are very right in that doing an implementation is good for learning. But then you misinterpret why. That is because you see how battle tested formulas were written. How they have been perfected on, and the structures that exists in the code, the polished optimization that mathematicians have evolved and then you get to imitate that. It has nothing to do with actually memorizing those implementations. You may look at google for even the simplest of things. It is okay. If you get stuck in the thought loop "Do you know how atan2 works?" "Can you write your own ik solver?" trying to just compare knowledge. Nothing like that is actually useful unless you take away how the structures and flow works. You rarely have to re-write any solved formula or tech. You do however need to study it to learn code structures and flow. You arrive at the conclusion that you need to balance rewriting stuff and not rewriting stuff. But that is actually not that useful, just like @ARZRer mentioned. Every function is already at your fingertips. Being competent is not in knowing the science that went into them. Just how to utilize them. How to structure the code so it builds a good architecture.
"Everyone knows that you can't have voxels in a game without being accused of coping Minecraft" The thumbnail actually made me think this was a Minecraft video before I watched this, so, yeah, that is true
Either you stole my comment or i stole yours or it is a total coincidence. I didnt see yours until I posted mine and I don't want to wrongfully accuse you of theft so its most likely a total coincidence.
I almost skipped over this video when it appeared in my recommended. Looked away for a moment and looked back and noticed the short 4 minute video length it had and said "Why not? I need a break from these 45 minutes videos I keep watching.". Well am I glad that I decided to click it. This was an interesting video and I kind of wish it was recommended to me sooner. Thanks for the insight.
@@gen157 yeah yeah there's like million of you lmao "i DİDnT İnTeaNd To GeT LiKeS" just reading the comment and seeing how made up it is already blows it ya know
You should make it so that it generates terrain with 2d noise and then does 3d noise and deletes all the blocks touched by it so it's like a world but with caves
@@ducky4303 That is one possibility, another one (Which Minecraft used before 1.18, and still partially uses) is an algorithm called Perlin worms. Basically, you sample 1D Perlin noise (Input is time) 3 times to get a value for x, y and z. Then use this vector for the direction the cave will move. Now you have the path a cave takes, and you can remove blocks around this path to remove volume.
Marching cube algorithm is an efficient way to generate meshes from a series of points. I think that if you could isolate every cube vertex that's facing outwards, and feed those vertices into the marching cube algorithm, you'd get something more or less interesting. You'll need to make sure that you treat any detached shapes as their own objects too
Technically, marching cubes work off a function defined over some space that you draw an approximate isobar for. But there are several good ways to convert points into such functions suitable for particular uses. E.g. in 3d reconstruction, point clouds, typically with an approximate normal defined for each point, can be converted into a gradient function using something called Poisson reconstruction. You then draw a surface using marching cubes where that gradient function is approximately zero. The resulting mesh then passes close to the original points and has roughly correct orientation. The reason you don't care about it being exact is usually because points you start from tend to have a lot of error and simply joining them together would result in a very bad mesh.
Very informative video, and it's refreshing to see a dev video that covers the difficulties of being a game developer, rather than present it as "and then you simply do x and it works exactly how you want/need it!"
Tbh, It's not that hard. As he did point out many times, He couldn't be asked to do the "Hard" stuff as you need to understand a ton of things but most things he's talking about can be learned by wiki, School, Collage.
you are indeed mistaken. (don't worry, i've been there) they're actually just custom generated worms. (spheres travelling in some randomly changing direction while changing radius) think back to when minecraft was just a small world size. after generating the general terrain, tons of these worms are generated to carve out the terrain. ores/trees are custom generations that populate the world too. in the "infinite" generation model, a single chunk generates all the worms in some radius to carve out that individual chunk. the ores/trees are only generated when adj chunks are present. (so they can generate over the boundaries to make it seamless. otherwise it'd all have to fit inside the chunk generating it. meaning we wouldn't have room for larger oak trees either) along with caves there's also ravines. it's just another type of cave generation. (obviously less common) then there's stuff like villages. they're simply a load of pre-made structures being randomly arranged. obviously they aren't generated chunk by chunk like caves are. (since they're obviously a lot less common too) they just generate out entirely into the world and those chunks are saved. like as if we just used some command to spawn a village that goes out of bounds.
I mean he has to be on your radar but Sebastian Lague did 2 phenomenal tutorials on this and included his source code. Definitely goes over my head, I’ve been experimenting with marching cubes and procedural terrain generation as well. Best of luck to you, looking forward to seeing more!
Didn't even realise this was from a smaller channel. Looks really cool! While perlin noise is beyond my capabilities as it stands, your more simplistic models make me feel good about my 3D art skills. Good luck, man!
Searched for hours looking for a procedural method to generating 3d Perlin noise without the permutation table and here in your video is a 3d solver combining lower orders together only 0:35 sec in. I love the internet. Also, I would recommend looking into erosion systems to add on top of your Perlin generation, it will give you those rolling hills you are after.
This is outstanding tutorial(I don't know if that is what this is but I copied your code to play with in unity and it works like a charm!) I tackled the Marching Cubes algorithm before, but I was never successful in implementing it. though i did get the marching squares to work. I would love to see more(Especially on Marching Cubes) so I subscribed
For some reason this was marked as spam :/ I still plan on trying to get marching cubes to work but I haven't gotten the chance to look into it yet. Glad you liked this!
Really nice video, I've been through a very similar process of learning about this subject, after learning about it for a long while I decided to write a story or a scientific explanation if you will of my learning process and explaining everything that I learned so that it would be easier for other people with the same passion as me to gather sources and information about it but being the lazy person that I am made me stop in the middle. All in all I really identify with you and your learning process and you've earned another sub :)
I don't know what the hell was going on in this video, but this man sounds pretty big brain if he can figure out how mojang generated structure in Minecraft
Just an fyi: the fastnoise library you mentioned is an *amazing* noise library. I believe the is an unpaid one, and one that makes use of SIMD instructions, which makes it noticeably faster. The paid version is just a port made by the author, as the original is written in C++ (which is available on GitHub by the way). It comes with an unbelievable amount of different noise types with numerous settings, including gradient en perturb variants. It is definitely worth checking out!
I know I'm a little late to the party, but if you haven't looked at marching cubes, you definitely should. It's super simple in concept- just appears way more complicated than it is. It will be your best friend with something like this in terms of a straightforward solution. I was able to learn how it works and whip up a simple implementation in about two hours in Java Processing 3 a while ago- really not too complicated.
This was very helpful, thank you so much! This plus your "Infinite Procedural Terrain in Unity" video make it really "easy" (on a reasonable level) to understand the topic :D
I went down almost the exact same rabbit hole a couple of months ago! I wanted to learn about being able to modify terrain and "dig" in real time after I saw a cool reddit post. I also downloaded the exact same example at 2:48, and I managed to find a working version of cubiquity from the description of a youtube video if i remember correctly. I also got to learn about marching cubes and the slightly better marching tetrahedra algorithm. It's so cool that I did basically the exact same journey as you without even knowing it! Edit: Here's the cubiquity video I found, with a bitbucket link to download the package in the description ruclips.net/video/xybv-aldhtI/видео.html
All algorithms require understanding of logic rather than just knowing formulas. Keep experimenting and you'll slowly stack up clues that will take you closer to your goal.
as far as I know, Sebastian Lague coding adventure does use marching cubes and in the description, you can download his project. And I see 10 000 people already posted this plus this video is over an year old. I have to program an procedural generated island for my college and only 2 months time. Which is frightening as an artist who did graphic design for over 10 years with almost zero programming knowledge. I'm glad for every bit knowledge I can find. Thanks for this video.
I don't know if you'll see this, but have you considered skipping the voxel step entirely? Sample the noise directly for each point as you have, and build a polyhedron out of those points as vertices depending on if the individual points pass the threshold. If a point passes the threshold, check if it's adjacent to a point which does not. If so, it's on the surface of your solid, so you consider it a vertex. That would limit your shape's polygons to the surface, and no faces will appear inside the shape.
Thank you for this and posting the code. Also, for anyone who reads this, the PerlinNoise function creates symmetry about the axes (x,y, and z), fyi. I just add 1, 2, and 3 respectively to x, y, and z inputs to the Perlin3D function to get around this. Makes the map a bit more interested and less redundant. Hope that helps people. Also, about to look into getting libnoise working in C#. I keep seeing people talk about how great those functions are for this type of thing.
Nova: "I needed to turn all the blocks into a mesh. So I did" Me, who's just figured out how to do that after months of on and off work trying to understand meshes: "what"
"If I hadn't went down this rabbit hole, then I would have spent these last few days wondering what would've happened if I had." I wish I could have come to this realization sooner, I usually phrase it along the lines of "what's stopping you?" I have a bad habit of NOT writing things down, and future me frequently suffers for it when trying to recollect those ideas.
Great review. I also used 3D perlin in my project (infinite "minecraft" like 3D space, but with dynamic constructions (videos on my channel)) I think about generating complex and various buildings/castles, the main restriction: they should be generated on the fly (no chunks, only user modifications stored as octtree)
In order to get a more flat terrain-like generation you need to create a height gradient that you combine with the sampled noise value. There's various ways of doing this - adding vs multiplying, messing with minimum and maximum values, power functions, etc. but the gradient will ultimately define the vertical region in which the terrain goes from all cubes to no cubes. On the surface (no pun intended) this looks a lot like 2D height map terrain, except it produces overhangs (nice ones if you get the weights and noise scales set to your liking). Unfortunately this method doesn't produce any underground caverns except maybe a few occasional pockets near the surface, so to add caves you need to use another noise layer that carves away the terrain you made in the first step. This can be plain perlin noise like you've experimented with already, or it can be more complex stuff like 'perlin worms' to get more tunnel-like caves (I believe this is what Minecraft uses). EDIT: Welp, looked at comment dates and not the video date, won't be surprised if this project has gone much further or died out already... Thanks youtube algorithm
I actually made my own working Marching Cubes Algorithm and Tested it on Unity. It's not so hard as time consuming! Now I choose how to Triangulate the Ambiguous cases. I could also make marching Tetraedra. Which have no ambiguities and are way simpler to program, but less CPU friendly. Well, in the future you could swap to ECS!
It's been a while since I made this video and I've made some progress on it. I have marching cubes working, and I was going to make a video on it hopefully sometime soon. I don't really get how to use ECS effectively, but I made a more basic threading system that splits it up and loads the parts at the same time. Good luck on your project!
@@nova84d yeah thanks. I do not know much about ECS either, but on UNITY 2019 they will add more ECS stuff to make it easier. Yeah, upload some video on your progress. Hmmm, maybe I should to :)
@@nova84d Hey, I actually uploaded a Video with my Marching Cubes algorithm. I just showcase it. If you are interesting you can watch it here: ruclips.net/video/YhhnLu1oBs0/видео.html It's meshy and blocky. However I will focus on Marching Squares, for now. Then start building a game on 2D, drop down RPG. Because, it is so much more easier and good practice for 3D. However, for now I need to pause my game for person reasons. So... Maybe a year from now I will resume it, part time.
You can use marching cubes but you will also have to do some proper interpolation between vertecies / tesselation to get better results. Marching cubes still does look chunky. You can use the voxels as a reference and as the camera moves around, generate a heigher resoulution mesh using interpolation in that area. Basically generate your world on demand where the camera is. Voxel Plugin for UE4 achived this and the results are very staggering. I made a 90000KM2 of endless soft dunes where you can drive a car anywhere and the physics work fine. Still got to shift world origin every 50km or so to prevent x,y,z positions from getting too large and overflowing. I think the industry really have to do away with heightmap terrain and jump into voxel technology.
I did not understand shit, I am high af, I just happened to be click baited into this video somehow. Believe me dude you had put me in an altogether different universe. Cheers mate!
To those who wanna do this all smooth jump on stack overflow and look up bevel algorithms and learn some math behind bevel calculations, you can apply that to the calculated space between 3 or 4 vertices and create some nice structure based off of median normals
"You can't make a voxel game without being accused of copying Minecraft"
...That is unbelievably true...
What's funny is Notch ripped off infiniminer.
@@getgle i though it was called spacecraft
me: makes a pixelated adventure game
MC 6 year olds: hey you copied Minecraft eeeeeee
Gta clones?
@@getgle By ripped off, you mean copied. Or your view of rip off is different to mine. I view rip off as an awful copy of a good game.
"i didn't really understand it, but it was isolated logic" - every programmer 2019
This is making hiring competent gameplay/engine engineers very difficult, sadly.
@@konstantinkh
My guy, you know anything about programming?
Guys with 20+ years of experience still google how to do basic stuff in most languages
@@arzr_er There's a difference between not memorizing every API out there and not knowing how to do things. If you are implementing something that requires vector math, it's ok to look up what function/operator performs cross products in your engine/library of choice. In fact, that's expected. What's not alright is not knowing how to compute a cross product if you are writing code that uses them. Same goes for just about every algorithm, no matter how complex - within realm of game development, at least. You don't have to know all the intricate details involved in optimization - though, a good senior engineer will have a domain where they are an expert in these. But you have to understand how an algorithm works well enough to write a simple implementation. Naturally, I don't actually expect this to be the case for a junior engineer, but that should be the goal. That is something you strive towards throughout your career. That means taking an interest in things you are working with and not treating every API call as a black box. Digging into things, figuring out how they work, trying to write our own implementation, even if you know it won't ever be as good as what's already in the library - that's how we get better as engineers. People who don't do that don't get better. And since nobody gets born a good engineer, I can confidently say they never became a good engineer. There is, of course, a flip side to this. Engineers who re-write absolutely everything, because they never learned to search through documentation, the code base, or open source projects as applicable. In my experience, however, that's easier to fix, so it's not a deal breaker in new hires for junior or mid level, in my opinion.
*2020
@@konstantinkh It's in fact okay to look up how to do cross products too. Stop being a gatekeeper. It's much more about how workable the code becomes as it grows, if it scales, if it is readable, if it is modular. You are very right in that doing an implementation is good for learning. But then you misinterpret why. That is because you see how battle tested formulas were written. How they have been perfected on, and the structures that exists in the code, the polished optimization that mathematicians have evolved and then you get to imitate that. It has nothing to do with actually memorizing those implementations. You may look at google for even the simplest of things. It is okay. If you get stuck in the thought loop "Do you know how atan2 works?" "Can you write your own ik solver?" trying to just compare knowledge. Nothing like that is actually useful unless you take away how the structures and flow works. You rarely have to re-write any solved formula or tech. You do however need to study it to learn code structures and flow. You arrive at the conclusion that you need to balance rewriting stuff and not rewriting stuff. But that is actually not that useful, just like @ARZRer mentioned. Every function is already at your fingertips. Being competent is not in knowing the science that went into them. Just how to utilize them. How to structure the code so it builds a good architecture.
I thought it was a picture of minecraft farlands.
Сейм
@@user-ne3sj5xf3j same
I thought it was custom terrain generation in Minecraft.
@@user-ne3sj5xf3j почему мы говорим по русски?
@@martinananas7894 идк бро
"Everyone knows that you can't have voxels in a game without being accused of coping Minecraft"
The thumbnail actually made me think this was a Minecraft video before I watched this, so, yeah, that is true
Same
Same
Either you stole my comment or i stole yours or it is a total coincidence. I didnt see yours until I posted mine and I don't want to wrongfully accuse you of theft so its most likely a total coincidence.
same
I hear numbers
I smell letters
I smell letters
Sanpuru tekisuto that’s amazing😂😂😂
@@sanpurutekisuto6709 sixty-nine four-twenty
69420
I almost skipped over this video when it appeared in my recommended. Looked away for a moment and looked back and noticed the short 4 minute video length it had and said "Why not? I need a break from these 45 minutes videos I keep watching.". Well am I glad that I decided to click it. This was an interesting video and I kind of wish it was recommended to me sooner. Thanks for the insight.
Thank you! Glad you liked it!
@@nova84d Curious to see if you got any further on this? It was nice to watch and I'll be checking out your channel for more interesting content soon!
I was actually in the same boat as you.
So basically "blabla i watched this video now give me likes"
@@gen157 yeah yeah there's like million of you lmao "i DİDnT İnTeaNd To GeT LiKeS" just reading the comment and seeing how made up it is already blows it ya know
I don't know how I ended up here but this was cool.
Lol thanks!
Same for me
I haven't seen my family in years
Vertices.
Mmmmmm tasty things, they are.
Huh.
@@privateger hey
@@h4724-q6j huhhellow
@@h4724-q6j I didn't expect you under a video about perlin noise ^^
Astronier is a classical example of closed source dev.
"was some free library"
tuxutku astroneer
its astroneer wtf
and? their job isnt to explain how they made something...
I have no idea what he's talking about but I'm fascinated.
same
Same
same
“You can’t make a voxel game without being accused of copying Minecraft”
NoCubes mod - Hold my beer
You should make it so that it generates terrain with 2d noise and then does 3d noise and deletes all the blocks touched by it so it's like a world but with caves
Cool
But how do you get a surface? That just makes holes in your 2d terrain, but no caves.
didnt realize thats how it was done until now, good explanation
@@ducky4303 That is one possibility, another one (Which Minecraft used before 1.18, and still partially uses) is an algorithm called Perlin worms.
Basically, you sample 1D Perlin noise (Input is time) 3 times to get a value for x, y and z. Then use this vector for the direction the cave will move. Now you have the path a cave takes, and you can remove blocks around this path to remove volume.
“Algebra, Math.. and cooking” -Nova
Marching cube algorithm is an efficient way to generate meshes from a series of points.
I think that if you could isolate every cube vertex that's facing outwards, and feed those vertices into the marching cube algorithm, you'd get something more or less interesting.
You'll need to make sure that you treat any detached shapes as their own objects too
Technically, marching cubes work off a function defined over some space that you draw an approximate isobar for. But there are several good ways to convert points into such functions suitable for particular uses. E.g. in 3d reconstruction, point clouds, typically with an approximate normal defined for each point, can be converted into a gradient function using something called Poisson reconstruction. You then draw a surface using marching cubes where that gradient function is approximately zero. The resulting mesh then passes close to the original points and has roughly correct orientation. The reason you don't care about it being exact is usually because points you start from tend to have a lot of error and simply joining them together would result in a very bad mesh.
Very informative video, and it's refreshing to see a dev video that covers the difficulties of being a game developer, rather than present it as "and then you simply do x and it works exactly how you want/need it!"
Glad you liked it! And yeah I know what you mean.
Hey! I'm a software developer and I've implemented the marching cubes algorithm in Unity before. Let me know if you want me to explain it to you!
Haskell > C#
Its one year old soo...
Explain it to me
Explain it to me pls
Im interested also
I have 0% knowledge of what you’re saying damn this seems hard
That's probably how he feels talking about the math involved in his project.
Tbh, It's not that hard. As he did point out many times, He couldn't be asked to do the "Hard" stuff as you need to understand a ton of things but most things he's talking about can be learned by wiki, School, Collage.
Dude I loved the way you did this video, more please!
Hopefully I'll have more soon. Procrastinating is very time consuming.
If I'm not mistaken, minecraft uses perlin worms for cave generation.
Cool. I'll look into it.
you are indeed mistaken. (don't worry, i've been there) they're actually just custom generated worms. (spheres travelling in some randomly changing direction while changing radius) think back to when minecraft was just a small world size. after generating the general terrain, tons of these worms are generated to carve out the terrain. ores/trees are custom generations that populate the world too.
in the "infinite" generation model, a single chunk generates all the worms in some radius to carve out that individual chunk. the ores/trees are only generated when adj chunks are present. (so they can generate over the boundaries to make it seamless. otherwise it'd all have to fit inside the chunk generating it. meaning we wouldn't have room for larger oak trees either)
along with caves there's also ravines. it's just another type of cave generation. (obviously less common)
then there's stuff like villages. they're simply a load of pre-made structures being randomly arranged. obviously they aren't generated chunk by chunk like caves are. (since they're obviously a lot less common too) they just generate out entirely into the world and those chunks are saved. like as if we just used some command to spawn a village that goes out of bounds.
@@nova84d did you actually believe him? or is it real..
didnt they massively change the cave generation in the cave update
unless that hasnt happened yet
damn its the man tyridge
See you bois in 8 years when RUclips decides to recommend this to everyone.
Or... today?
But isn't there a saying that "The algorithm never strikes the same video twice"?
You just gained yourself a sub this was interesteing af
But it seems like this channel is dead
Thanks!
I mean he has to be on your radar but Sebastian Lague did 2 phenomenal tutorials on this and included his source code. Definitely goes over my head, I’ve been experimenting with marching cubes and procedural terrain generation as well. Best of luck to you, looking forward to seeing more!
This is my third time watching this and I might watch it again
RUclips recommended this to me... after almost 2 years? I'm happy!
It showed up in my recommended feed too!
Finally, the recommend section gives me something good
Go watch Sebastian Lague, he has an entire video/series dedicated to marching cubes ^^
Those are such great videos. I love them.
Didn't even realise this was from a smaller channel. Looks really cool! While perlin noise is beyond my capabilities as it stands, your more simplistic models make me feel good about my 3D art skills. Good luck, man!
You have a great voice and execution for this. Keep it up
Sebastian Lague has a video up on combining Perlin noise with marching cubes, also there's a good Wikipedia article on the topic. /fyi
"Clearly you needed to be an expert on algebra, physics, calculus and *cooking* "
RUclips algorithm's having a fun time with this one!
Searched for hours looking for a procedural method to generating 3d Perlin noise without the permutation table and here in your video is a 3d solver combining lower orders together only 0:35 sec in. I love the internet.
Also, I would recommend looking into erosion systems to add on top of your Perlin generation, it will give you those rolling hills you are after.
okay , so who else thought its gonna be a minecraft world edit video ?
only me ?
okay
bitter nope... me too
@@thesadgamer1184 good times
This is outstanding tutorial(I don't know if that is what this is but I copied your code to play with in unity and it works like a charm!)
I tackled the Marching Cubes algorithm before, but I was never successful in implementing it. though i did get the marching squares to work.
I would love to see more(Especially on Marching Cubes) so I subscribed
For some reason this was marked as spam :/
I still plan on trying to get marching cubes to work but I haven't gotten the chance to look into it yet. Glad you liked this!
RUclips can be a little... Broken sometimes. XD
I hope your able to get it working, and anymore algorithms you find to improve the terrain generation.
This is the perfection of minecraft.
this is amazing, perfectly describes many of the coding and creative journeys ive been down.
Really nice video, I've been through a very similar process of learning about this subject, after learning about it for a long while I decided to write a story or a scientific explanation if you will of my learning process and explaining everything that I learned so that it would be easier for other people with the same passion as me to gather sources and information about it but being the lazy person that I am made me stop in the middle. All in all I really identify with you and your learning process and you've earned another sub :)
I'm glad you liked it
I can't pretend I have any knowledge on the subject, but the way this guy talks about what clearly interests him makes me want to see more videos.
Just got recommended this and my interest has peeked I would love to see more. Even if I am a year late...
i think you’re a smart person who knows what you’re doing
This Minecraft cave update looking awesome already
I love watching videos about topics that I don’t know anything about
ah yes,
*a video a year or older just getting into my recommended.*
I don't know what the hell was going on in this video, but this man sounds pretty big brain if he can figure out how mojang generated structure in Minecraft
Just an fyi: the fastnoise library you mentioned is an *amazing* noise library. I believe the is an unpaid one, and one that makes use of SIMD instructions, which makes it noticeably faster. The paid version is just a port made by the author, as the original is written in C++ (which is available on GitHub by the way). It comes with an unbelievable amount of different noise types with numerous settings, including gradient en perturb variants. It is definitely worth checking out!
High quality video recommended for me!
I know I'm a little late to the party, but if you haven't looked at marching cubes, you definitely should. It's super simple in concept- just appears way more complicated than it is. It will be your best friend with something like this in terms of a straightforward solution. I was able to learn how it works and whip up a simple implementation in about two hours in Java Processing 3 a while ago- really not too complicated.
Wow that was quite interesting!
I didn't understand everything but I'll be checking more stuff on your channel, seems like good content
Distractions can sometimes lead us in the right direction. Nice quote.
I like watching videos like this, absolutely all of this is alien language to me but I never fail to find it interesting, good stuff man.
I have been looking for this since weeks. I have never found anything. Now I find this on my reccommendet
This was very well written. Enjoyed the video a lot, keep it up :)
Lmao I did this same exact thing, with the same steps you did. I even ran through the same problems! I got stuck and then found this video.
how did i not find this channel before?
Great video, keep up the work!
This was very helpful, thank you so much! This plus your "Infinite Procedural Terrain in Unity" video make it really "easy" (on a reasonable level) to understand the topic :D
Well I'm glad I could help :)
thanks, multiplying my coordinates with the noise scale fixed my issue.
I went down almost the exact same rabbit hole a couple of months ago! I wanted to learn about being able to modify terrain and "dig" in real time after I saw a cool reddit post. I also downloaded the exact same example at 2:48, and I managed to find a working version of cubiquity from the description of a youtube video if i remember correctly. I also got to learn about marching cubes and the slightly better marching tetrahedra algorithm. It's so cool that I did basically the exact same journey as you without even knowing it!
Edit: Here's the cubiquity video I found, with a bitbucket link to download the package in the description ruclips.net/video/xybv-aldhtI/видео.html
You reference the example at 2:48, do you know the source or do you have a copy still?
fascinating video... I told you already but I love the way you narrate your investigation !
All algorithms require understanding of logic rather than just knowing formulas. Keep experimenting and you'll slowly stack up clues that will take you closer to your goal.
programmers: vertexes
3d artists: vertisee
Very cool, I'm using the same 3D perlin to distribute star systems in a wireframe box.
Sounds cool.
It's so fun to watch someone else go through the same steps of discovery :D
as far as I know, Sebastian Lague coding adventure does use marching cubes and in the description, you can download his project. And I see 10 000 people already posted this plus this video is over an year old.
I have to program an procedural generated island for my college and only 2 months time. Which is frightening as an artist who did graphic design for over 10 years with almost zero programming knowledge. I'm glad for every bit knowledge I can find. Thanks for this video.
i saw space engineers so i assume you are a man of culture
thank you youtube recommendations, i love this kind of stuff
I don't know if you'll see this, but have you considered skipping the voxel step entirely? Sample the noise directly for each point as you have, and build a polyhedron out of those points as vertices depending on if the individual points pass the threshold. If a point passes the threshold, check if it's adjacent to a point which does not. If so, it's on the surface of your solid, so you consider it a vertex. That would limit your shape's polygons to the surface, and no faces will appear inside the shape.
And that's how the Borg Cube was born...
Thank you for this and posting the code. Also, for anyone who reads this, the PerlinNoise function creates symmetry about the axes (x,y, and z), fyi. I just add 1, 2, and 3 respectively to x, y, and z inputs to the Perlin3D function to get around this. Makes the map a bit more interested and less redundant. Hope that helps people. Also, about to look into getting libnoise working in C#. I keep seeing people talk about how great those functions are for this type of thing.
for people just now watching this there is an excellent tutorial called "How to make 7 days to die in unity" that covers terrain generation like this
So interesting, I had the same sort of adventure when I was starting out as well! Glad to know we're not alone
Nova: "I needed to turn all the blocks into a mesh. So I did"
Me, who's just figured out how to do that after months of on and off work trying to understand meshes: "what"
space chickens 2.0 looks excellent. good job.
RUclips algorithm picked u up
I love it! Your really are like a detective.
"vorteces? Vorteckses?" Me
Great work, i'm ringing DAT bell.
I'm exited for what you will do!
Ow my!
This is a subscription worth!
I am looking forward for your next attemp! :D
Hopefully soon ;)
"If I hadn't went down this rabbit hole, then I would have spent these last few days wondering what would've happened if I had."
I wish I could have come to this realization sooner, I usually phrase it along the lines of "what's stopping you?" I have a bad habit of NOT writing things down, and future me frequently suffers for it when trying to recollect those ideas.
Great review. I also used 3D perlin in my project (infinite "minecraft" like 3D space, but with dynamic constructions (videos on my channel)) I think about generating complex and various buildings/castles, the main restriction: they should be generated on the fly (no chunks, only user modifications stored as octtree)
the final shot reminds me of Space Engineers, and i'm excited to see more
why does he sound like he's recounting an unsolved murder in the 1960's
Amazing and underrated video
You deserve more!
Heh, grabbed the 3D perlin noise function from here, thanks xD
Hipity Hopity, your code is now my property :)
Broo u just predicted caves & cliffs update
thank you you are insane programmer
Awesome video it is a shame you don't have more subs cause you deserve them.
Why am i watching this at 6am sunday
Because youtube always recommends the most interesting videos around midnight and 7 am
Captions: You need to be an expert in algebra , calculus and cooking
I like that little trailer at the end lol. If you could create a game that has the same sorta vibes as mario galaxy I reckon it could be real popular.
Really well written video :)
In order to get a more flat terrain-like generation you need to create a height gradient that you combine with the sampled noise value. There's various ways of doing this - adding vs multiplying, messing with minimum and maximum values, power functions, etc. but the gradient will ultimately define the vertical region in which the terrain goes from all cubes to no cubes. On the surface (no pun intended) this looks a lot like 2D height map terrain, except it produces overhangs (nice ones if you get the weights and noise scales set to your liking). Unfortunately this method doesn't produce any underground caverns except maybe a few occasional pockets near the surface, so to add caves you need to use another noise layer that carves away the terrain you made in the first step. This can be plain perlin noise like you've experimented with already, or it can be more complex stuff like 'perlin worms' to get more tunnel-like caves (I believe this is what Minecraft uses).
EDIT: Welp, looked at comment dates and not the video date, won't be surprised if this project has gone much further or died out already... Thanks youtube algorithm
1:33 the 3D noise is symmetrical across y=x=z
Yeah I didn't realize that until after I uploaded the video. oops
I actually made my own working Marching Cubes Algorithm and Tested it on Unity. It's not so hard as time consuming!
Now I choose how to Triangulate the Ambiguous cases.
I could also make marching Tetraedra. Which have no ambiguities and are way simpler to program, but less CPU friendly.
Well, in the future you could swap to ECS!
It's been a while since I made this video and I've made some progress on it. I have marching cubes working, and I was going to make a video on it hopefully sometime soon. I don't really get how to use ECS effectively, but I made a more basic threading system that splits it up and loads the parts at the same time. Good luck on your project!
@@nova84d yeah thanks. I do not know much about ECS either, but on UNITY 2019 they will add more ECS stuff to make it easier.
Yeah, upload some video on your progress. Hmmm, maybe I should to :)
Well let me know if you do, I'd be interested. Might be a while before I get around to it though, videos take a while.
@@nova84d Hey, I actually uploaded a Video with my Marching Cubes algorithm. I just showcase it. If you are interesting you can watch it here: ruclips.net/video/YhhnLu1oBs0/видео.html It's meshy and blocky. However I will focus on Marching Squares, for now. Then start building a game on 2D, drop down RPG. Because, it is so much more easier and good practice for 3D.
However, for now I need to pause my game for person reasons. So... Maybe a year from now I will resume it, part time.
You can use marching cubes but you will also have to do some proper interpolation between vertecies / tesselation to get better results. Marching cubes still does look chunky. You can use the voxels as a reference and as the camera moves around, generate a heigher resoulution mesh using interpolation in that area. Basically generate your world on demand where the camera is. Voxel Plugin for UE4 achived this and the results are very staggering. I made a 90000KM2 of endless soft dunes where you can drive a car anywhere and the physics work fine. Still got to shift world origin every 50km or so to prevent x,y,z positions from getting too large and overflowing. I think the industry really have to do away with heightmap terrain and jump into voxel technology.
THIS GUY DOING SOME MATH RIGHT NOW
I did not understand shit, I am high af, I just happened to be click baited into this video somehow.
Believe me dude you had put me in an altogether different universe.
Cheers mate!
To those who wanna do this all smooth jump on stack overflow and look up bevel algorithms and learn some math behind bevel calculations, you can apply that to the calculated space between 3 or 4 vertices and create some nice structure based off of median normals
good tuto, love it, noise3d really helpful when i test my marchingcube, and also met the limitation of mesh.