1:27 using example 1:55 simple version 14:50 [start using normal script] 15:15 making water 18:15 tree 🎄🌴 20:45 script explain 26:45 player zero script 39:45 place object 35:45 making perlin noise imagin
I agree with your usage of the word 'Tile'. IMHO Tile is better because it is 2D (a terrain mesh) whereas a Chunk is 3D containing information on everything with the chunks bounds.
That`s awesome!! You made it work perfectly, I was working on this for 4 weeks now, and always finding a huge amount of bugs, but now I can try with your code! Thaaaanks! PS: If I can give you a tip about the video, don`t make one so long, as this video explained a lot of different things, make a serie, so it`s faster and easier to find what we`re looking for ;)
Thanks for the feedback! I just made this in a hurry because someone asked me to so not much thought went into it. I'll probably try that in the future.
actually, to fix the light source problem, you could attach it to the player, keep the light source in the same position, just make the player controller the parent, so the light source follows you
You need to download from the link because they have it updated so it is different but you can always import it from the link into your project (I did that). And then follow along. You have to change the version when you start up the downloaded one. And that's all!
Not really. You will need to adjust your controller. If you are using physics it is generally better to move with transforms instead of rigidbodies. By nature, meshes are thin like that, and you can't adjust a mesh colliders "thickness" like you can another collider.
I actually made this for someone else in the comments. We talked over email and I made this little demo for them. Hope this helps. drive.google.com/open?id=1Qew0y_jKriVOGBa_tyJeaVcA6XRW0ydv Link to original comment thread: th-cam.com/video/f9uueg_AUZs/w-d-xo.html&lc=UgzjzQ3zM6xvAzNXm6l4AaABAg (scroll down to highlighted comment)
Minecraft calls it chunks because its a 3d space (you can dig down). Tiles is more used for a 3d no depth terrain. Orgin it com es from 2d games like Mario sidescrollers. Great vid thumbs up..
after @0:46 tile is a junior of chunk; chunks are limited conglomerates of neighboring tiles. of course, if you're making a continuous terrain, you basically don't have tiles, so you can upscale it, so to speak, but this is why the terms should not be interchangeable, as tiles should always be the discrete and atomic units of area so that we communicate on the same level. chunk, as a word, refers to the map above it. though you could also call it a supertile, if bottom-up is your thing.
I understand what you're trying to say, but I don't understand the reasoning. (also I think you meant to say chunks in the 2nd paragraph) In Minecraft a chunk is a collection of blocks, which are the atomic unit (assuming you mean they can't be subdivided). In this example, a vertex is the equivalent of a block, so a tile would be the equivalent of a chunk, though, saying chunk implies volume. So for that reason I think you're right that they're not interchangeable, it's just that tiles can be subdivided and aren't the base unit.
No, you got it all wrong. I didn't mean to say chunks in the 2nd paragraph. Let me reiterate: if you're making a continuous terrain, you don't use 'tiles' per se, and you are free to call your pieces of geometry whatever you want, but bear with me while I try to explain why proper nomenclature matters. It goes like this: tiles (atomic) -> chunks (collection) -> map In Minecraft, due to its volumetric nature, replace tiles (which are traditionally two dimensional) with three-dimensional blocks, thus: blocks (atomic) -> chunks (collection) -> map There is a reason why Notch called it a chunk, and the reasoning behind this is technical. There is a natural limit on a GPU to how large a mesh can be when it's uploaded. Also if you work with a map that's practically infinite in its size, like the one in Minecraft, you need to divide it into something finite to work with. There is a huge requirement to be able to partition the map space into smaller units, large enough to not tediously transfer tile by tile (or block by block), or likewise when you do some meaningful transformations to somehow optimize the mesh before the upload. The limit is typically 65k vertices per mesh (16-bit), though on modern GPU it's now 32-bit, but that's still not the case on many platforms (especially mobile ones). Sometimes this is done to balance the work load, for example, when interacting with one chunk of the map you don't necessarily interact with the whole, which is much more efficient etc. So the map tends to be logically organized (chunked) in partitions of 2D or 3D space (chunks) that include some predefined amount of atomic elements (tiles or blocks). Of course, this is just nomenclature, and you are free to rename chunks, as I mentioned, to supertiles, or terrain elements, or space partitions, or anything else that simply addresses the eponymous problem, but calling them just tiles is incredibly ambiguous, because tiles, as a term in game dev, imply being generic and indivisible, while chunks imply being a spatial partition that is also a collection of smaller generic and indivisible units. Also, both tiles and blocks have this property of being aligned to a grid, so you can pinpoint any one without knowing anything about its surroundings. Chunks don't have to be like that. If you work with a sphere, there is a significant geometrical difference between a tile and the chunk it belongs to. As a programmer, when I see the word tile, for me it represents something tileable, which is a mathematical quality. Chunks do not have to tile a plane or volume, though it might be a convenient thing if they do. These terms are in place for a reason. Of course you don't have to stick with any of this, but I thought you'd gain some insight, especially if you're already using some 3rd-party code for procedural generation that you don't understand well, perhaps you could understand it a bit better?
I'm still confused. Here's how I see it. You first sample the noise and get back an array of values. In Minecraft it would represent whether or not a block exists at that point, where here it's how high the vertex is. This would be the atomic unit. Next is the collection of the atomic unit, like tiles or chunks. blocks (atomic) -> chunks (collection) -> map vertexes (atomic) -> tiles (collection) -> map I just called them tiles because they looked like tiles to me. I've made basic Minecraft-like terrain before and explained it (badly) in a different video of mine. It sounds like you understand quite a bit about this so I'm not sure where the confusion is. I would see the atomic unit as the thing that represents the point sampled. Tiles are just collections of vertexes so wouldn't the tiles be more representative of chunks? btw I wrote this code over a year ago and don't remember it very well. I'll link the video if you're interested th-cam.com/video/TZFv493D7jo/w-d-xo.html&lc=UgxbJ7fbEK4dVjHDlQx4AaABAg. The code is in the description if you want to take a look.
Well, you're mixing up two entirely different structures. It's vertices -> triangles -> mesh and this structure is the structure of the 3D graphics geometry, and not the logical structure that we're talking about, namely tiles -> chunks -> map, though I can perfectly see how you arrived at this point. From the logical standpoint -- which is your application abstraction, and not the low level technology you have to satisfy to get it running at all -- tiles have nothing to do with the vertices -> triangles -> mesh. However, to implement them you have to stratify your application and make it translate one concept to the other, because this is the language the GPU speaks in. From the point of your game, though, you want to speak only in terms of tiles and collections of such tiles whenever it's possible, and this is how you maintain the logic of your game. However, you have to cross that gap between your desired level of abstraction and the one that is presupposed by the GPU, and this is where you have to describe your logical elements in terms of vertices, triangles, and finally the mesh as a whole. The confusion is right here "blocks (atomic) -> chunks (collection) -> map vertexes (atomic) -> tiles (collection) -> map" You could state that blocks aren't really atomic as well, as they're still comprised of vertices, right? As there are exactly 24 vertices in each Minecraft block (due to the faces being flat), and exactly 12 triangles, ofc if the block was exposed from all sides. But this is not how you talk about it, or make your code work with it. The "block" *is* the most atomic _logical_ structure in Minecraft, regardless of whether it has to be represented by vertices. It is a block by deliberate design choice, not as a technical necessity. Everything is built around a block in that game. Likewise, if you pay close attention to your project, and turn Wireframe in the top left corner of the Scene view, it's likely you'll see that your mesh consists of quad tiles, and not just vertices. And when it moves, when the player is moving, it's regenerating a chunk mesh around those tiles, and this is how your map is revealed optimally, so the parts you couldn't see aren't transcribed into a mesh in the first place. So the fact still holds, that your logical structure is tiles (or quads) -> chunks -> map whether you like it or not. Now, that being said, there is one more thing. From the topology standpoint, it's the Unity that enforces triangles as the most basic middle ground between the vertices and the mesh, in other 3D paradigms there are more complex objects that are, similarly to chunks, divisible collections of vertices (and other data and metadata). This is important because you could say, "yeah, but triangles aren't divisible so they're atomic and not truly indivisible," but this is simply due to Unity's deliberate design choice. If you had quads, for example, or NURBS surfaces, or any kind of a polygon larger than a quad, these structures would have more than just 3 vertices describing them. So, practically speaking, this middle ground is always something that represents a practical unit of organization, enabling highly abstracted logical maneuvering on top the primitive data. So it's a programming pattern, basically, to always have something like this: primitive unit of structure -> organizational unit of structure -> complex structure. Now whether you'd like to call the elements A, B, C, or tile, chunk, map, it doesn't really matter, but it's important to stay unambiguous with the described identities. It doesn't help if you mix the two structures with different semantics, like you did with vertices -> tiles -> map. GPU doesn't appreciate anything called a map, unless it's a bit map, or a normal map... Yes, in the end, everything gets down to vertices, triangles, and a final mesh, but that's just the nature of our current technology based around 3D polygons. When you try to depict, let's say, a chess board, to describe the logic of chess you try to think in terms of 64 squares -> 8 ranks x 8 files -> 1 board. So squares are your tiles, while ranks, files and diagonals are your units of organization, some of which are clearly redundant, so you wouldn't use them all to represent this data, but some of them would probably become useful once you get to implement the rules of chess, i.e. Triangles clearly stay in the way of describing the chess logic conveniently, and are frankly quite irrelevant, and this is what levels of abstractions are for, even though in the end you still need vertices (many of which have to be doubled to preserve the color information, so 256 in total) and 64 quads (= 128 triangles) and 1 mesh to represent this structure on the GPU. For the tile-based terrain, it just happens that the terms are already settled with tiles -> chunks -> map. If a terrain is continuous (not aligned to grid of any sort), you could state that its tiles are technically triangles or quads, but chunks (as units of organization) are still required for the mesh to be optimally represented on the GPU. Therefore non-uniform tiles (triangles and quads) -> chunks -> map. If a map is small enough, you could state that only 1 chunk was ever needed, and that's a way to skip this step altogether, so units of topology -> map (the difference between a map and chunk in this form is only semantical). I hope this helps you understand the reasoning a bit better. Again, it's not a big deal, you can name it whatever you want, but it really helps communicating this all better and analyzing other people's code if we speak the same high-abstract language. Tiles should be tiles, chunks should be chunks. Sorry for the long post.
I like you, you're very thorough :) I'm sorry, I should have made it a bit more clear. I was referring to the vertex height, not the vertex. But what you said about it being a logical structure is what I've been trying to say. Both a block (logical) and a vertex (logical) require 2 components: a position relative to the grid and a noise value. It's the same data, just a different method of using it. They're practically identical at this stage. Next you'd create the mesh around those points, the only difference being one determines vertex (mesh) height and the other determines if the block (mesh) exists. Also you keep mentioning how a tile is an atomic unit, but you're able to shift where you draw the bounds, make them contain more or less vertexes (again logical), or even just split it into quarters. A vertex (yep... logical) is 0 dimensional, as is a cube (logical) since they're quite literally represented by the exact same data. I've read through you're previous comments and I think I get where you're coming from now. You're saying that a tile is the base/indivisible unit, like a block in Minecraft, and a chunk would be a group of tiles. A group of tiles would effectively be equivalent to a chunk of chunks. As I've explained, tiles can be subdivided. But I've done one better. I threw together a little demo to show a side by side comparison of voxel (or pixel since it's 2D?) and heightmap terrain, showing the only difference is how you draw the mesh around the logical block/vertex and using the block/vertex data interchangeably. On one side is indubitably a chunk of blocks (logical), so the other must be a tile of vertexes (logical). Here's the demo: drive.google.com/open?id=1qXU0pb5UqXL6GKjNHvgaB616z-2l3Rzr Also, I don't want it to sound like I'm getting defensive, I just have reason to believe that these are the correct parallels between voxel and heightmap terrain.
That is a great video indeed, thanks for sharing it. I'm trying to make it work with textures but I'm a failure at UV mapping, do you have do any progress on it?
I was literally just researching UV maps as I read this. Spoopy. No, I hardly know anything about texturing because I'm bad at art. I prefer using solid colors :).
i found your playerZero script really useful as i am making a space game, so not a lot of terrain being generated but had the same problem of going to far away from origin. you may want to consider doing a small video detailing more on that or making it its own video. your video is the only one that explains it in like 2 mins but its buried in a 36 min video.
I'm trying to do something like this, looking at the comments, apparently, the Procedural Toolkit is very different now. Is it still possible to do this with the new one? Also, how could I make this randomly generate, but not replace the randomly generated tiles if you go over them again, (like, I'm trying to make a low poly neighborhood, with randomly generated house tiles. I think I was originally thinking I was going to make roads random too, but I think that would be too crazy, so I'm going to probably make it be a grid of roads, with random tiles connected to the sides of the road, surrounding the road.)? Sorry, essentially, there'll be a tile, which will have a randomly generated house in the middle, with randomly generated trees, and such. But I don't want them to get replaced, once they generate, I want them to stay. My thinking of doing this is because I'm going to probably try to make this project / game multiplayer, and I want it to be the same. Sorry if this question doesn't make sense. Thanks!
Help pls what is this NullReferenceException: Object reference not set to an instance of an object TerrainController.CreateTile (System.Int32 xIndex, System.Int32 yIndex) (at Assets/TerrainController.cs:157) TerrainController.ActivateOrCreateTile (System.Int32 xIndex, System.Int32 yIndex, System.Collections.Generic.List`1[T] tileObjects) (at Assets/TerrainController.cs:134) TerrainController.Update () (at Assets/TerrainController.cs:104)
Hi! This video really helped me out and remarkably I kind of understand it! Now I’ve been fiddling with the trees trying to make structures that randomly spawn (I want to make randomly spawning ruins) kind of like villages in minecraft but I just can’t seem to do it. Do you think you could help me? It’s fine if you don’t have time your tutorial helped a lot either way.
Thanks for the help. I actually didn't know I wanted to try infinite terrain until I saw this. I'm bad at level-making, procedural generation is my friend. Do you have any links to that Spheres game you're working on? It looks pretty interesting.
This is an amazing tutorial but there's one problem caves i understand youve been looking for a way to do them and once you do PLEASE make a tutorial on it
Awesome, thanks for this. I have been struggling with this topic for a while! I am trying to assign my own material to the tile but no matter how I adjust it always comes out like water etc. I am not using any bumps, ridges etc just a flat floor with hopefully my texture. Can you advise?
i haven't watched the video yet but out of my own understanding of procedural generation you are creating chunks. I think that on the moment you build something you let the builded object scan for the ground and make the ground( the chunk) its parent. This way the building should be a child of the chunk and be loaded again when the chunk is turned on. i could be wrong tho cause i am also still learning :)
Btw for properly functioning water you could add a plane of water to your characters coordinates and make it static on the Y axis. then there will always be a layer of water at let's say y = 0.25
I'm getting this error with then new script: Assets/Advanced/GenerateMesh.cs(115,71): error CS0120: An object reference is required to access non-static member `GenerateMesh.uvScale' Any idea what could be causing this, or how to fix it?
That's just a mistake on my part. I've updated the description with a new link. I just uploaded the new version a few hours ago, I'm surprised someone found it so quickly.
It seems that in TileFromPosition you are dividing the position by the length of tiles and then you want to round. That is, round up any decimal places equal to or greater than 0.5 or round down decimal places less than 0.5. Is there not a simple rounding function to do that? Perhaps not if you used Floor and then simply added 0.5 to ensure that it worked the same as normal rounding works.
thank you for the amazing video and codes really saved me lot of time but what if i want the cells to be square (four corners) how can i do that ? when i try to change the vertexCount value in the GenerateMeshSimple code it return error (The number of supplied triangle indices must be a multiple of 3.)
I don't understand what the purpose of putting them in an array would be. Are you asking how to make it collapse like the other arrays in the inspector?
Is that for example in the TerrainController has a variable that adjusts the size of each place object that is added to the terrain, what I try to do is that some objects appear in lesser quantity than other terrain place objects :/
Alright I think I know what you mean. I'm going to paste some instructions in the replies to this thread. You might have to copy them out into notepad or something because I don't know how they'll get formatted.
In TerrainController: add class [System.Serializable] public class MinMax { public int min, max; } replace [SerializeField] private int minObjectsPerTile = 0, maxObjectsPerTile = 20; public int MinObjectsPerTile { get { return minObjectsPerTile; } } public int MaxObjectsPerTile { get { return maxObjectsPerTile; } } with [SerializeField] private MinMax[] frequencies; public MinMax[] Frequencies { get { return frequencies; } } In PlaceObjects: surround everything in Place() with for (int f = 0; f < TerrainController.Frequencies.Length; f++) { //stuff } replace int numObjects = Random.Range(TerrainController.MinObjectsPerTile, TerrainController.MaxObjectsPerTile);//Bug. Should actually be MaxObjectsPerTile + 1. for (int i = 0; i < numObjects; i++) { int prefabType = Random.Range(0, TerrainController.PlaceableObjects.Length); with int numObjects = Random.Range(TerrainController.Frequencies[f].min, TerrainController.Frequencies[f].max+1); for (int i = 0; i < numObjects; i++) { int prefabType = f;//Random.Range(0, TerrainController.PlaceableObjects.Length);
I'm trying to create trees but can't seem to instantiate them into the right position (They are either too high or too low but spawn in the relatively correct x,z area). Where did you put your code to spawn trees and what Vector3 did you use to position it?
It's all in the PlaceObjects script. It will place the prefab's root transform exactly on the ground (in pivot mode, not center), so make sure the root's transform is where you want the ground to be. You should also probably make it extend below the ground a bit so it will work on a slope. I can't see exactly what your problem is so I might not understand.
What code would I use if I wanted to be able to control the number of an item in a more precise way, such as campsites that should only appear at least 20 tiles away from another campsite?
There's a pinned comment on this video that should give you some idea. I'll probably update the description eventually with that information. Tiles have no way of communicating with each other, it's just a matter of probability. You could store them in an array and destroy them if they spawn too close to another one. I made this code over a year ago; I'd probably do it a lot differently now.
Are there any issues with regards to size when you run this on mobile? It does not look like any of the generated terrain tiles get deleted,l or is the size insignificant?
Do you mean size in memory? There's a destroy distance variable (in the advanced one) that destroys tiles when you get too far away from them. If memory is a problem then you can turn it down.
How can I add water after a certain time or as a level in my game. I am using ur script to create infinite terrain which is working fine but I want water to spawn and the terrrain to vanish at a certain point. Pleas help
Obrigado amigo, vou usar em um projeto, vou deixar os agradecimentos, muito Obrigado! Só precisei modificar o sistema de spawn de objetos, pois o meu precisa ter uma % para cada objeto especifico, fora isso tudo OK! você é nota 10!
How'd you create the world shown in the first 20 seconds? I've tried to create a terrain, but I can never get the water to behave properly. Which settings are you using on the controller? Thanks!
I'm not sure I understand what you mean. The water in the beginning of the video is the same as the water in the tutorial. I took a screenshot of the settings I had for the forest biome (what you see in the beginning) but I made significant changes to the script so it's apples to oranges really. You should still be able to do the same things though. I usually just adjust it to suit my needs rather than trying to replicate something else. Hopefully you can extrapolate what you need. Screenshot: drive.google.com/open?id=19z5yMx4w2v6Q-bZxfiKex6y46HLarcwt
Oh and if the water is at the incorrect altitude you have to adjust the Y position on the water GameObject before you start the game. I did it that way because I'm stupid.
I've already had a lengthy discussion about it with this guy (highlighted comment): th-cam.com/video/f9uueg_AUZs/w-d-xo.html&lc=UgyTRULVjOVFmonxC5V4AaABAg
hello, good work with this procedural low poly terrain generation, I have a doubt, do you know in any way to be able to implement biomes to this terrain controller?
I tried this in my game, but I settled for each world selecting just one biome. It would take some serious adjustments to implement, but it depends on how simple you want to make it. I don't know, I'd have to look into it.
I've been researching some way to achieve biomes, I found a reddit article www.reddit.com/r/Unity3D/comments/6wdlzu/procedural_low_poly_terrain_with_biomes/, but I do not know much about programming
Well it is largely a programming task, but I think I have an idea. There's already functionality to change the color at certain altitudes, so you could have different colors at certain heights represent different biomes. So first you'd have to make the terrain a lot larger, that's already achievable by changing values. Next you'd change the color to represent different biomes, so for example the lowest could be desert and have a sand color, medium could be forest and be green, and highest could be snow and be white. Lastly you could change the trees into other objects based on altitude, so for example if it tried to spawn a tree at the lowest altitude it would change into a cactus, and at a higher altitude it would be a snow covered tree. I've seen other games do this, like Space Engineers for example changes the ground texture and certain spawns based on altitude. But like I said, any changes you make are going to involve a bit of programming, but this way a lot of the functionality is already there.
I have thought about implementing height-based biomes but that way of implementing biomes is very limited, although this way of implementing biomes is very useful for people who want to add normal biomes to their terrain
Hey, Liked the video :) Was wondering if you have thought about making a discord channel to help people share unity tips and tricks :) I would love to have a small community with people who want to learn more stuff like this! And I would actively try and help people where I can :)
hai, actually yes just add this to your awake method in the terrain controller script :) if(seed == 0) { seed = Random.Range(100000, 999999); } if you want to randomize the seed make it 0 after you add this :>
@@GLITCHYSKY228 Lets say you want to make a world that generates green fields and gray mountains, what I'd do is make a flat noise function for the fields and a more extreme noise function for the mountains. Then I'd make a third 'biome map' noise function. For every vertex of the mesh you'd first check what biome it is in by checking if the biome map noise function returns a value above or below a constant. Based on the biome you'd have the generated surface be green or gray and the vertexes height be controlled by the value from the biome's corresponding noise map.
@@GLITCHYSKY228 As for how to actually make this happen in unity I wouldnt be able to tell you because all the procedural terrain generators I've made I made in Godot engine
I'm not really sure what you mean. 2D terrain like in Terraria? It's the same concept just instead of the sampled point on the noise representing height it would represent whether or not there is a block there (like if it's above a threshold).
I'd suggest you focus on generic networking first (like UNET or something). Once you become proficient at networking this should be pretty easy. If you didn't already know, the game I used this for is multiplayer. It works by synchronizing the world's seed in the beginning to ensure the terrain generates the same for everyone. After that it works the same as any multiplayer game. I could potentially do a networking tutorial in the future, but there's already so many out there and I doubt I could do it better.
Compress arrays representing elevation and save, this is why minecraft worlds grow over time. You could also record for each chunk/ tile whether it has been changed after generation and only saving if it has. This assumes static seed.
i would want that thing that u showed on start.. the multiplayer thing... because i dont want to make a join or leave thing coz it would take me 999999 years EDIT: atlease how to add trees and the car anaaadadadadadadndandandnandandndnddddd the generation values
I cant follow along using Procedural Toolkit download from Unity Asset store, the script names seem to have changed significantly, even the script names in the google drive link are different.
It's been a while since this video, and it looks like they've changed Procedural Toolkit since this was uploaded. It's already in the project folder with the version that's in the video though.
I can't remember the last time I've seen someone actually use the light theme for VS
Indian youtubers use it
Wait some one uses it it hurts my eyes when I'm in the dark at 1am trying to fix a bug thats I have not fixed to the last 10 hours
@@Funnypoison671 dark theme hurts me eyes, I use light theme. I guess it depends on what you are used to.
It was actually outlawed a while back, I'm calling the police
1:27 using example
1:55 simple version
14:50 [start using normal script]
15:15 making water
18:15 tree 🎄🌴
20:45 script explain
26:45 player zero script
39:45 place object
35:45 making perlin noise imagin
The Tutorial does not work
I did not not not not not not not not understand everything! keep up the good work!
Thanks ;)
you did understand...?
@@mohamedmusamustafa3324 Even number of 'nots' (eight in my comment) means that I did understand 😂
@@winterboltgames ye i know and odd means you didnt understand 😂
not not not not not not not not = yes
I agree with your usage of the word 'Tile'. IMHO Tile is better because it is 2D (a terrain mesh) whereas a Chunk is 3D containing information on everything with the chunks bounds.
That`s awesome!! You made it work perfectly, I was working on this for 4 weeks now, and always finding a huge amount of bugs, but now I can try with your code! Thaaaanks!
PS: If I can give you a tip about the video, don`t make one so long, as this video explained a lot of different things, make a serie, so it`s faster and easier to find what we`re looking for ;)
Thanks for the feedback! I just made this in a hurry because someone asked me to so not much thought went into it. I'll probably try that in the future.
thank you for taking the time to make this video! it helped me out!
Glad I could help!
actually, to fix the light source problem, you could attach it to the player, keep the light source in the same position, just make the player controller the parent, so the light source follows you
I'm the same person, this is just my official account, I sent a friend request on gamejolt, your awesome!
You need to download from the link because they have it updated so it is different but you can always import it from the link into your project (I did that). And then follow along. You have to change the version when you start up the downloaded one. And that's all!
is there a way to make the floor mesh thicker? im having clipping issues wit h the player i believe are caused by the thinness of the floor
Not really. You will need to adjust your controller. If you are using physics it is generally better to move with transforms instead of rigidbodies. By nature, meshes are thin like that, and you can't adjust a mesh colliders "thickness" like you can another collider.
i am getting an error at assest/advanced/placeobjects.cs:12
i can t place more objects than 1
this is gonna save me a lot of time
This is an excellent video, thanks for sharing!
Hippedy Hopedy your code is now my property
Has anyone managed to modify this to add layers of noise? I'm having trouble adding things like octaves, lacunarity and persistance.
Great Tutorial Thank you!, just a question: How could i make the terrain move towards player?, like an infinite runner kind of game?
I actually made this for someone else in the comments. We talked over email and I made this little demo for them. Hope this helps.
drive.google.com/open?id=1Qew0y_jKriVOGBa_tyJeaVcA6XRW0ydv
Link to original comment thread: th-cam.com/video/f9uueg_AUZs/w-d-xo.html&lc=UgzjzQ3zM6xvAzNXm6l4AaABAg (scroll down to highlighted comment)
@@nova84d Hey Nova could you maybe one day make a tutorial on how you made that car?
WOW, this is amazing dude!!!
:D
Thanks!
Thanks Bro I just learnt the Magic
Minecraft calls it chunks because its a 3d space (you can dig down). Tiles is more used for a 3d no depth terrain. Orgin it com es from 2d games like Mario sidescrollers. Great vid thumbs up..
Its so cool! Thank you!
after @0:46
tile is a junior of chunk; chunks are limited conglomerates of neighboring tiles.
of course, if you're making a continuous terrain, you basically don't have tiles, so you can upscale it, so to speak, but this is why the terms should not be interchangeable, as tiles should always be the discrete and atomic units of area so that we communicate on the same level.
chunk, as a word, refers to the map above it. though you could also call it a supertile, if bottom-up is your thing.
I understand what you're trying to say, but I don't understand the reasoning. (also I think you meant to say chunks in the 2nd paragraph) In Minecraft a chunk is a collection of blocks, which are the atomic unit (assuming you mean they can't be subdivided). In this example, a vertex is the equivalent of a block, so a tile would be the equivalent of a chunk, though, saying chunk implies volume. So for that reason I think you're right that they're not interchangeable, it's just that tiles can be subdivided and aren't the base unit.
No, you got it all wrong.
I didn't mean to say chunks in the 2nd paragraph.
Let me reiterate: if you're making a continuous terrain, you don't use 'tiles' per se, and you are free to call your pieces of geometry whatever you want, but bear with me while I try to explain why proper nomenclature matters.
It goes like this: tiles (atomic) -> chunks (collection) -> map
In Minecraft, due to its volumetric nature, replace tiles (which are traditionally two dimensional) with three-dimensional blocks, thus: blocks (atomic) -> chunks (collection) -> map
There is a reason why Notch called it a chunk, and the reasoning behind this is technical. There is a natural limit on a GPU to how large a mesh can be when it's uploaded. Also if you work with a map that's practically infinite in its size, like the one in Minecraft, you need to divide it into something finite to work with. There is a huge requirement to be able to partition the map space into smaller units, large enough to not tediously transfer tile by tile (or block by block), or likewise when you do some meaningful transformations to somehow optimize the mesh before the upload. The limit is typically 65k vertices per mesh (16-bit), though on modern GPU it's now 32-bit, but that's still not the case on many platforms (especially mobile ones). Sometimes this is done to balance the work load, for example, when interacting with one chunk of the map you don't necessarily interact with the whole, which is much more efficient etc.
So the map tends to be logically organized (chunked) in partitions of 2D or 3D space (chunks) that include some predefined amount of atomic elements (tiles or blocks). Of course, this is just nomenclature, and you are free to rename chunks, as I mentioned, to supertiles, or terrain elements, or space partitions, or anything else that simply addresses the eponymous problem, but calling them just tiles is incredibly ambiguous, because tiles, as a term in game dev, imply being generic and indivisible, while chunks imply being a spatial partition that is also a collection of smaller generic and indivisible units. Also, both tiles and blocks have this property of being aligned to a grid, so you can pinpoint any one without knowing anything about its surroundings. Chunks don't have to be like that. If you work with a sphere, there is a significant geometrical difference between a tile and the chunk it belongs to. As a programmer, when I see the word tile, for me it represents something tileable, which is a mathematical quality. Chunks do not have to tile a plane or volume, though it might be a convenient thing if they do.
These terms are in place for a reason.
Of course you don't have to stick with any of this, but I thought you'd gain some insight, especially if you're already using some 3rd-party code for procedural generation that you don't understand well, perhaps you could understand it a bit better?
I'm still confused. Here's how I see it.
You first sample the noise and get back an array of values. In Minecraft it would represent whether or not a block exists at that point, where here it's how high the vertex is. This would be the atomic unit. Next is the collection of the atomic unit, like tiles or chunks.
blocks (atomic) -> chunks (collection) -> map
vertexes (atomic) -> tiles (collection) -> map
I just called them tiles because they looked like tiles to me. I've made basic Minecraft-like terrain before and explained it (badly) in a different video of mine. It sounds like you understand quite a bit about this so I'm not sure where the confusion is. I would see the atomic unit as the thing that represents the point sampled. Tiles are just collections of vertexes so wouldn't the tiles be more representative of chunks? btw I wrote this code over a year ago and don't remember it very well.
I'll link the video if you're interested th-cam.com/video/TZFv493D7jo/w-d-xo.html&lc=UgxbJ7fbEK4dVjHDlQx4AaABAg. The code is in the description if you want to take a look.
Well, you're mixing up two entirely different structures.
It's vertices -> triangles -> mesh and this structure is the structure of the 3D graphics geometry, and not the logical structure that we're talking about, namely tiles -> chunks -> map, though I can perfectly see how you arrived at this point.
From the logical standpoint -- which is your application abstraction, and not the low level technology you have to satisfy to get it running at all -- tiles have nothing to do with the vertices -> triangles -> mesh. However, to implement them you have to stratify your application and make it translate one concept to the other, because this is the language the GPU speaks in.
From the point of your game, though, you want to speak only in terms of tiles and collections of such tiles whenever it's possible, and this is how you maintain the logic of your game. However, you have to cross that gap between your desired level of abstraction and the one that is presupposed by the GPU, and this is where you have to describe your logical elements in terms of vertices, triangles, and finally the mesh as a whole.
The confusion is right here
"blocks (atomic) -> chunks (collection) -> map
vertexes (atomic) -> tiles (collection) -> map"
You could state that blocks aren't really atomic as well, as they're still comprised of vertices, right? As there are exactly 24 vertices in each Minecraft block (due to the faces being flat), and exactly 12 triangles, ofc if the block was exposed from all sides. But this is not how you talk about it, or make your code work with it. The "block" *is* the most atomic _logical_ structure in Minecraft, regardless of whether it has to be represented by vertices. It is a block by deliberate design choice, not as a technical necessity. Everything is built around a block in that game. Likewise, if you pay close attention to your project, and turn Wireframe in the top left corner of the Scene view, it's likely you'll see that your mesh consists of quad tiles, and not just vertices. And when it moves, when the player is moving, it's regenerating a chunk mesh around those tiles, and this is how your map is revealed optimally, so the parts you couldn't see aren't transcribed into a mesh in the first place.
So the fact still holds, that your logical structure is tiles (or quads) -> chunks -> map whether you like it or not.
Now, that being said, there is one more thing. From the topology standpoint, it's the Unity that enforces triangles as the most basic middle ground between the vertices and the mesh, in other 3D paradigms there are more complex objects that are, similarly to chunks, divisible collections of vertices (and other data and metadata). This is important because you could say, "yeah, but triangles aren't divisible so they're atomic and not truly indivisible," but this is simply due to Unity's deliberate design choice. If you had quads, for example, or NURBS surfaces, or any kind of a polygon larger than a quad, these structures would have more than just 3 vertices describing them. So, practically speaking, this middle ground is always something that represents a practical unit of organization, enabling highly abstracted logical maneuvering on top the primitive data.
So it's a programming pattern, basically, to always have something like this:
primitive unit of structure -> organizational unit of structure -> complex structure.
Now whether you'd like to call the elements A, B, C, or tile, chunk, map, it doesn't really matter, but it's important to stay unambiguous with the described identities. It doesn't help if you mix the two structures with different semantics, like you did with vertices -> tiles -> map. GPU doesn't appreciate anything called a map, unless it's a bit map, or a normal map... Yes, in the end, everything gets down to vertices, triangles, and a final mesh, but that's just the nature of our current technology based around 3D polygons. When you try to depict, let's say, a chess board, to describe the logic of chess you try to think in terms of 64 squares -> 8 ranks x 8 files -> 1 board. So squares are your tiles, while ranks, files and diagonals are your units of organization, some of which are clearly redundant, so you wouldn't use them all to represent this data, but some of them would probably become useful once you get to implement the rules of chess, i.e.
Triangles clearly stay in the way of describing the chess logic conveniently, and are frankly quite irrelevant, and this is what levels of abstractions are for, even though in the end you still need vertices (many of which have to be doubled to preserve the color information, so 256 in total) and 64 quads (= 128 triangles) and 1 mesh to represent this structure on the GPU.
For the tile-based terrain, it just happens that the terms are already settled with tiles -> chunks -> map. If a terrain is continuous (not aligned to grid of any sort), you could state that its tiles are technically triangles or quads, but chunks (as units of organization) are still required for the mesh to be optimally represented on the GPU. Therefore non-uniform tiles (triangles and quads) -> chunks -> map. If a map is small enough, you could state that only 1 chunk was ever needed, and that's a way to skip this step altogether, so units of topology -> map (the difference between a map and chunk in this form is only semantical).
I hope this helps you understand the reasoning a bit better. Again, it's not a big deal, you can name it whatever you want, but it really helps communicating this all better and analyzing other people's code if we speak the same high-abstract language. Tiles should be tiles, chunks should be chunks. Sorry for the long post.
I like you, you're very thorough :)
I'm sorry, I should have made it a bit more clear. I was referring to the vertex height, not the vertex. But what you said about it being a logical structure is what I've been trying to say. Both a block (logical) and a vertex (logical) require 2 components: a position relative to the grid and a noise value. It's the same data, just a different method of using it. They're practically identical at this stage.
Next you'd create the mesh around those points, the only difference being one determines vertex (mesh) height and the other determines if the block (mesh) exists.
Also you keep mentioning how a tile is an atomic unit, but you're able to shift where you draw the bounds, make them contain more or less vertexes (again logical), or even just split it into quarters. A vertex (yep... logical) is 0 dimensional, as is a cube (logical) since they're quite literally represented by the exact same data.
I've read through you're previous comments and I think I get where you're coming from now. You're saying that a tile is the base/indivisible unit, like a block in Minecraft, and a chunk would be a group of tiles. A group of tiles would effectively be equivalent to a chunk of chunks. As I've explained, tiles can be subdivided.
But I've done one better. I threw together a little demo to show a side by side comparison of voxel (or pixel since it's 2D?) and heightmap terrain, showing the only difference is how you draw the mesh around the logical block/vertex and using the block/vertex data interchangeably. On one side is indubitably a chunk of blocks (logical), so the other must be a tile of vertexes (logical). Here's the demo: drive.google.com/open?id=1qXU0pb5UqXL6GKjNHvgaB616z-2l3Rzr
Also, I don't want it to sound like I'm getting defensive, I just have reason to believe that these are the correct parallels between voxel and heightmap terrain.
love the landmark
Very nice tutorial!! Thanks!!
That is a great video indeed, thanks for sharing it.
I'm trying to make it work with textures but I'm a failure at UV mapping, do you have do any progress on it?
I was literally just researching UV maps as I read this. Spoopy.
No, I hardly know anything about texturing because I'm bad at art. I prefer using solid colors :).
I manage to make it work but youtube doens't allow me paste here the solution.
Check out your twitter to see the solution
Thank you for the good video
Is there any way to change the background of the first infinite map?
I want to flatten the terrain
how to add more pleceable object i have a rock and a tree and i neeed more trees and less rocks how can i do that in this script
Me: already has made platformer system
Also me: *y o i n k*
i found your playerZero script really useful as i am making a space game, so not a lot of terrain being generated but had the same problem of going to far away from origin. you may want to consider doing a small video detailing more on that or making it its own video. your video is the only one that explains it in like 2 mins but its buried in a 36 min video.
Noted. Glad it helped!
Hello, can I use your script for commercial purposes ?
I'm trying to do something like this, looking at the comments, apparently, the Procedural Toolkit is very different now. Is it still possible to do this with the new one? Also, how could I make this randomly generate, but not replace the randomly generated tiles if you go over them again, (like, I'm trying to make a low poly neighborhood, with randomly generated house tiles. I think I was originally thinking I was going to make roads random too, but I think that would be too crazy, so I'm going to probably make it be a grid of roads, with random tiles connected to the sides of the road, surrounding the road.)? Sorry, essentially, there'll be a tile, which will have a randomly generated house in the middle, with randomly generated trees, and such. But I don't want them to get replaced, once they generate, I want them to stay. My thinking of doing this is because I'm going to probably try to make this project / game multiplayer, and I want it to be the same.
Sorry if this question doesn't make sense.
Thanks!
Help pls what is this
NullReferenceException: Object reference not set to an instance of an object
TerrainController.CreateTile (System.Int32 xIndex, System.Int32 yIndex) (at Assets/TerrainController.cs:157)
TerrainController.ActivateOrCreateTile (System.Int32 xIndex, System.Int32 yIndex, System.Collections.Generic.List`1[T] tileObjects) (at Assets/TerrainController.cs:134)
TerrainController.Update () (at Assets/TerrainController.cs:104)
Hello can you please give me the terrainControll scirpt please
I'm expireincing fps drops when the new chunks with objects are being rendered in, how to fix????
how to make randomly generating structures
okke
@OctoFlo Designs i hav a problem! when i try to do anything it just adds more and more errors! i cant do shiet with unity!
in minute 2. you take from somewhere two scripts. From where you take it?
Hi! This video really helped me out and remarkably I kind of understand it!
Now I’ve been fiddling with the trees trying to make structures that randomly spawn (I want to make randomly spawning ruins) kind of like villages in minecraft but I just can’t seem to do it.
Do you think you could help me? It’s fine if you don’t have time your tutorial helped a lot either way.
have you had any luck with this?
Thanks for the help. I actually didn't know I wanted to try infinite terrain until I saw this. I'm bad at level-making, procedural generation is my friend. Do you have any links to that Spheres game you're working on? It looks pretty interesting.
Go to his youtube account, then click about, then click gamejolt, it will lead to his gamejolt profile which has the game
when itry to assign multiple placeable objects it doesnt work.
This is an amazing tutorial but there's one problem
caves
i understand youve been looking for a way to do them and once you do PLEASE make a tutorial on it
Look at Cube Marching its a good way to make caves
Awesome, thanks for this. I have been struggling with this topic for a while! I am trying to assign my own material to the tile but no matter how I adjust it always comes out like water etc. I am not using any bumps, ridges etc just a flat floor with hopefully my texture. Can you advise?
I'm not really sure that you mean. could you just turn up the terrain size on the Y axis?
really good tutorial tho i have a question. is it possible to save each "tile" once loaded so it saves things like builds or etc?
i haven't watched the video yet but out of my own understanding of procedural generation you are creating chunks. I think that on the moment you build something you let the builded object scan for the ground and make the ground( the chunk) its parent. This way the building should be a child of the chunk and be loaded again when the chunk is turned on. i could be wrong tho cause i am also still learning :)
How would I be able to save the world? For example, If I broke down a few trees, how would I go about saving the modified state of the world?
How do you add textures to the terrain? When I add a texture it is just a solid color.
Btw for properly functioning water you could add a plane of water to your characters coordinates and make it static on the Y axis. then there will always be a layer of water at let's say y = 0.25
Yeah I would do things a lot differently now then I did back then.
Only problem for me being that the tiles are not deleting themselves
How do I make it so the terrain doesn't clear when I stop the game?
I'm getting this error with then new script:
Assets/Advanced/GenerateMesh.cs(115,71): error CS0120: An object reference is required to access non-static member `GenerateMesh.uvScale'
Any idea what could be causing this, or how to fix it?
That's just a mistake on my part. I've updated the description with a new link. I just uploaded the new version a few hours ago, I'm surprised someone found it so quickly.
Hey Nova, im thinking of using your script for a game im planning to sell, do I have your permission?
what happens if you want to go back?, the generated map will reset or it will still be there as you left it?
Road to 1k!
It seems that in TileFromPosition you are dividing the position by the length of tiles and then you want to round. That is, round up any decimal places equal to or greater than 0.5 or round down decimal places less than 0.5. Is there not a simple rounding function to do that? Perhaps not if you used Floor and then simply added 0.5 to ensure that it worked the same as normal rounding works.
thank you for the amazing video and codes really saved me lot of time
but what if i want the cells to be square (four corners) how can i do that ? when i try to change the vertexCount value in the GenerateMeshSimple code it return error (The number of supplied triangle indices must be a multiple of 3.)
Thanks!
You're welcome :)
Can you do a tutorial about this car in intro, you know, how to create a car :)
I'll add it to the stack ;)
@@nova84d please...
Hey the mesh collider doesnt seem to be working, fix pls
Hi, I want the minobjectsfortile and maxobjectsfortile in array but I don't know, you can help me please? thanks, I tried :(
I don't understand what the purpose of putting them in an array would be. Are you asking how to make it collapse like the other arrays in the inspector?
Is that for example in the TerrainController has a variable that adjusts the size of each place object that is added to the terrain, what I try to do is that some objects appear in lesser quantity than other terrain place objects :/
Alright I think I know what you mean. I'm going to paste some instructions in the replies to this thread. You might have to copy them out into notepad or something because I don't know how they'll get formatted.
In TerrainController:
add class
[System.Serializable]
public class MinMax {
public int min, max;
}
replace
[SerializeField]
private int minObjectsPerTile = 0, maxObjectsPerTile = 20;
public int MinObjectsPerTile { get { return minObjectsPerTile; } }
public int MaxObjectsPerTile { get { return maxObjectsPerTile; } }
with
[SerializeField]
private MinMax[] frequencies;
public MinMax[] Frequencies { get { return frequencies; } }
In PlaceObjects:
surround everything in Place() with
for (int f = 0; f < TerrainController.Frequencies.Length; f++) {
//stuff
}
replace
int numObjects = Random.Range(TerrainController.MinObjectsPerTile, TerrainController.MaxObjectsPerTile);//Bug. Should actually be MaxObjectsPerTile + 1.
for (int i = 0; i < numObjects; i++) {
int prefabType = Random.Range(0, TerrainController.PlaceableObjects.Length);
with
int numObjects = Random.Range(TerrainController.Frequencies[f].min, TerrainController.Frequencies[f].max+1);
for (int i = 0; i < numObjects; i++) {
int prefabType = f;//Random.Range(0, TerrainController.PlaceableObjects.Length);
But that's actually an inferior way of doing it. I would recommend having them all in the same dropdown in the inspector. You would do that like this:
I'm trying to create trees but can't seem to instantiate them into the right position (They are either too high or too low but spawn in the relatively correct x,z area). Where did you put your code to spawn trees and what Vector3 did you use to position it?
It's all in the PlaceObjects script. It will place the prefab's root transform exactly on the ground (in pivot mode, not center), so make sure the root's transform is where you want the ground to be. You should also probably make it extend below the ground a bit so it will work on a slope. I can't see exactly what your problem is so I might not understand.
Placeable object stop generating after player back to origin(by player zero sricpt) help me fix this😢
What code would I use if I wanted to be able to control the number of an item in a more precise way, such as campsites that should only appear at least 20 tiles away from another campsite?
There's a pinned comment on this video that should give you some idea. I'll probably update the description eventually with that information. Tiles have no way of communicating with each other, it's just a matter of probability. You could store them in an array and destroy them if they spawn too close to another one. I made this code over a year ago; I'd probably do it a lot differently now.
Ok, thanks for the info
No problem :)
Are there any issues with regards to size when you run this on mobile? It does not look like any of the generated terrain tiles get deleted,l or is the size insignificant?
Do you mean size in memory? There's a destroy distance variable (in the advanced one) that destroys tiles when you get too far away from them. If memory is a problem then you can turn it down.
Thanks.
I can't find TerrainControllerSimple anywhere
How can I add water after a certain time or as a level in my game.
I am using ur script to create infinite terrain which is working fine but I want water to spawn and the terrrain to vanish at a certain point.
Pleas help
Obrigado amigo, vou usar em um projeto, vou deixar os agradecimentos, muito Obrigado!
Só precisei modificar o sistema de spawn de objetos, pois o meu precisa ter uma % para cada objeto especifico, fora isso tudo OK! você é nota 10!
you neeeeeed more subs
Sub sandwiches? I'm pretty hungry.
Nova840 B O T H
How'd you create the world shown in the first 20 seconds? I've tried to create a terrain, but I can never get the water to behave properly. Which settings are you using on the controller? Thanks!
I'm not sure I understand what you mean. The water in the beginning of the video is the same as the water in the tutorial. I took a screenshot of the settings I had for the forest biome (what you see in the beginning) but I made significant changes to the script so it's apples to oranges really. You should still be able to do the same things though. I usually just adjust it to suit my needs rather than trying to replicate something else. Hopefully you can extrapolate what you need.
Screenshot: drive.google.com/open?id=19z5yMx4w2v6Q-bZxfiKex6y46HLarcwt
Oh and if the water is at the incorrect altitude you have to adjust the Y position on the water GameObject before you start the game. I did it that way because I'm stupid.
Ok, that makes more sense now. Just wanted to check to see if I'm uning all the built in controls correctly. Thanks!
No problem :)
Minecraft blocks are tiles, then it does chunks, then worlds
I've already had a lengthy discussion about it with this guy (highlighted comment): th-cam.com/video/f9uueg_AUZs/w-d-xo.html&lc=UgyTRULVjOVFmonxC5V4AaABAg
I dont know were is this two scripts.Help
same
where is the two scripts u dragged in located?
i would like a COMPLETE script if possible...
could biomes be implemented into this somehow?
Is it better to do procedural generation in c# or shader code?
if i make a house and go away and back again to house,are that house lost?
Edit : no answer?
hello, good work with this procedural low poly terrain generation, I have a doubt, do you know in any way to be able to implement biomes to this terrain controller?
I tried this in my game, but I settled for each world selecting just one biome. It would take some serious adjustments to implement, but it depends on how simple you want to make it. I don't know, I'd have to look into it.
I've been researching some way to achieve biomes, I found a reddit article www.reddit.com/r/Unity3D/comments/6wdlzu/procedural_low_poly_terrain_with_biomes/, but I do not know much about programming
in this article the asset procedural toolkit is also used as a base
Well it is largely a programming task, but I think I have an idea. There's already functionality to change the color at certain altitudes, so you could have different colors at certain heights represent different biomes.
So first you'd have to make the terrain a lot larger, that's already achievable by changing values. Next you'd change the color to represent different biomes, so for example the lowest could be desert and have a sand color, medium could be forest and be green, and highest could be snow and be white. Lastly you could change the trees into other objects based on altitude, so for example if it tried to spawn a tree at the lowest altitude it would change into a cactus, and at a higher altitude it would be a snow covered tree.
I've seen other games do this, like Space Engineers for example changes the ground texture and certain spawns based on altitude.
But like I said, any changes you make are going to involve a bit of programming, but this way a lot of the functionality is already there.
I have thought about implementing height-based biomes but that way of implementing biomes is very limited, although this way of implementing biomes is very useful for people who want to add normal biomes to their terrain
Hey, Liked the video :) Was wondering if you have thought about making a discord channel to help people share unity tips and tricks :) I would love to have a small community with people who want to learn more stuff like this! And I would actively try and help people where I can :)
I've had someone else say that to me actually, I'm just afraid it would be a ghost town. Maybe if I get a bit more popular.
@@nova84d Understandable :)
It's making jumps and shaking the camera when is creating new tiles :(
Can you tell is this good for mobile or pc game?
One more question, do you plan to continue working with this terrain engine?
No plans to.
Oh. Ok :)
Hey, is there any way to randomize the seed in the advanced controller?
hai, actually yes just add this to your awake method in the terrain controller script :)
if(seed == 0) {
seed = Random.Range(100000, 999999);
}
if you want to randomize the seed make it 0 after you add this :>
btw you can change these values "100000, 999999" to any number you want
Uncommenting the code in the PlaceObject script doesn't seem to do anything for me :(
Are you uncommenting all of it? There's the three lines in the Place() method and the giant block comment at the bottom.
Ah, I forgot the stuff in Place(). Thanks. Also my terrain comes out more smooth than I want, is there a way to make it lower poly?
I think it's the cell size variable. Try changing that.
Got it. Thanks!
No problem.
Can you do a tutorial on this but for implementing different biomes?
Use a second noise map which controls the colour of the ground
@@Samsam-kl2lk how would I implement that?
@@GLITCHYSKY228 Lets say you want to make a world that generates green fields and gray mountains, what I'd do is make a flat noise function for the fields and a more extreme noise function for the mountains. Then I'd make a third 'biome map' noise function. For every vertex of the mesh you'd first check what biome it is in by checking if the biome map noise function returns a value above or below a constant. Based on the biome you'd have the generated surface be green or gray and the vertexes height be controlled by the value from the biome's corresponding noise map.
@@GLITCHYSKY228 As for how to actually make this happen in unity I wouldnt be able to tell you because all the procedural terrain generators I've made I made in Godot engine
@@Samsam-kl2lk oh ok, I get the concept, but probably won't be able to do the coding for it
Please anyone help me find the TerrainControllerSimple script
Hey, I can't find the Terrain Controller and Generate Mesh scripts
It's in assets/advanced. There's a simplified version in assets/simple.
ima YOINK this and mod it for me
Always think to ur self
How I do dis
oh yeah yeah
*breathes in*
...
Black magic
Yo, how can I like make biome gen bro?
what you do in 1:50?
Its a start like minecraft
YOu not put this project to github?
It's not on GitHub, but the project is in the description.
How do I put the soil to AI, help me! :(
How would you update this to control 2D terrain?
I'm not really sure what you mean. 2D terrain like in Terraria? It's the same concept just instead of the sampled point on the noise representing height it would represent whether or not there is a block there (like if it's above a threshold).
Can you do this for 2021
how do i add tree generation
Please do a tutorial on how to do this infinite terrain in multiplayer :)
Because i'm not really good at networking stuff
I'd suggest you focus on generic networking first (like UNET or something). Once you become proficient at networking this should be pretty easy. If you didn't already know, the game I used this for is multiplayer. It works by synchronizing the world's seed in the beginning to ensure the terrain generates the same for everyone. After that it works the same as any multiplayer game. I could potentially do a networking tutorial in the future, but there's already so many out there and I doubt I could do it better.
Ok Thanks! :D
try photon bolt
were gonna call it thingy
rites THingu
How do you make it so that it remembers the terrain it has generated
Compress arrays representing elevation and save, this is why minecraft worlds grow over time. You could also record for each chunk/ tile whether it has been changed after generation and only saving if it has. This assumes static seed.
i would want that thing that u showed on start.. the multiplayer thing... because i dont want to make a join or leave thing coz it would take me 999999 years
EDIT: atlease how to add trees and the car anaaadadadadadadndandandnandandndnddddd the generation values
HOW U DO DIS?
bruh ... teach me
i cant find the 2 scripts
link in desc
This world isn't infinite
How make make this in Unreal?
I cant follow along using Procedural Toolkit download from Unity Asset store, the script names seem to have changed significantly, even the script names in the google drive link are different.
Update: I was wrong on the google download, all is fine there. The download from asset store is way different.
It's been a while since this video, and it looks like they've changed Procedural Toolkit since this was uploaded. It's already in the project folder with the version that's in the video though.