Watching this with headphones on, and the bass track is amazing.
@MajikayoGames2 ай бұрын
@@whoeverofhowevermany loool I'm not sure what that is. Maybe my dehumidifier in the background you mean? 🤣 Sorry about that
@whoeverofhowevermany2 ай бұрын
@@MajikayoGames 😅 I think it was the tapping on your keyboard at some point, but for a moment I thought the neighbors were playing super loud music 😂
@dustinandrews8901910 ай бұрын
Chalk up a big win for the algorithm! This was very interesting and very instructive. I’ve done a reasonable amount of work with vector math, but I would’ve reached for trigonometry to solve the normal problem. Vectors is the way to go. This was also really helpful to give me an idea of how shaders work. when I first took a look at shaders, the code was very difficult to understand. But this shader code looks quite simple and intuitive.
@MajikayoGames10 ай бұрын
Awesome! Really glad you got something out of it. Yep I learned a lot in the making of this video and I felt the same way, this was my first foray into shaders and I'm not sure why I was so scared of them at first. 99% of what you're doing is just moving around vertex positions in the vertex shader (to create effects like the wavy text in the beginning of the video) and setting the color of each pixel one by one in the fragment shader. No magic going on really it's just that. Not sure if I explained the linear algebra/matrix part well but it was the same there! I had learned about matrices vaguely before, but they have this very intuitive visual understanding about them which I hadn't known about till I really gave them a try for myself.
@KevinIndreland9 ай бұрын
I have tried almost all of the Godot Terrain creators out there and this is the first that will work in browser. Great job and thank you for creating a quality item!
@MajikayoGames9 ай бұрын
Awesome!! So glad it works for you. Yes I was testing it in browser, I prefer to have browser demos so I can send to friends to test and get a quick feedback loop. Part of the reason is probably because it's 100% GDScript. All the heavy lifting is done in the shader so there's no need for C# or a C++ GDExtension to be used to increase performance. Also makes it easier to modify and iterate on, I tried to keep the codebase pretty simple and condensed.
@KevinIndreland9 ай бұрын
@@MajikayoGames I'm not happy developing for the browser, with all the limitations and most beauty stripped away in the mobile renderer. But definitely happy I came across your terrain. I was tired of creating terrain in Maya, with low poly collision mesh and importing into Godot.
@amorpilo96669 ай бұрын
This is great! The explanation really makes a difference!
@MajikayoGames9 ай бұрын
Thank you!! Glad you enjoyed! Let me know if I can clarify anything else. I'm still working on video pacing and explanations so I'm hoping to improve on them over time.
@wukerplank10 ай бұрын
Incredibly interesting! Thank you for putting this together.
@MajikayoGames10 ай бұрын
Glad you enjoyed! Was worried it turned out a bit too technical and dry of an explanation but happy at least one person found it interesting!
@wukerplank10 ай бұрын
@@MajikayoGames Foundational things aren't flashy, but important none the less. I'm a sucker for procedural generation, so everything I can learn about it is welcome 😊
@MajikayoGames10 ай бұрын
@@wukerplank Great to hear it! Actually planning a procedural generation video for my next one... Going to be on level generation though not terrain :)
@wukerplank10 ай бұрын
@@MajikayoGames Can't wait to see it!
@Temple_Cloud9 ай бұрын
Great videos! One of the best I have seen on KZbin. Covers various interesting points in terrain generation and Godot. A recommended watch I reckon (for those interested in this sort of thing). Thanks for making and sharing!
@MajikayoGames9 ай бұрын
Awesome!!! Thanks for your comment glad you enjoyed :)
@zm71609 ай бұрын
So nice to have a in-depth explanation of the many aspects of this solution. I have implemented parts of this myself, it works but it was a fever dream and my code is a mess. This is really helpful.
@MajikayoGames9 ай бұрын
Awesome!!! So glad you got something out of it :) Let me know if I can clarify any parts of it
@elilentiart80256 ай бұрын
This tool is amazing! Thank you so much for sharing this with the Godot community.
@cjdaylight34079 ай бұрын
I was expecting this tutorial gonna teach me how to make this add-on from scratch
@MajikayoGames9 ай бұрын
Sorry about that ! Experimenting with different video types. Planning on doing some more tutorials in the future.
@proboscideank.70699 ай бұрын
were you expecting someone to feed you and wipe your ass, as well?
@t2pol90410 ай бұрын
Great video man. I hope you can also do an endless terrain tutorial in the future 😃
@MajikayoGames10 ай бұрын
Appreciate your comment and thank you! If there's demand for it I definitely would :) the KZbin channel DitzyNinja's Godojo has a tutorial on just that actually if you are interested: kzbin.info/www/bejne/fpjZapx3mcatgck
@davidtrott94695 ай бұрын
If you try to create your own implementation, based on this video you may get weird culling artifacts. The problem is that AABB (bounding box) is incorrect, since the default “box” has no height, because the original plane mesh didn’t have any. To fix the issues you will need to create a new AABB and assign it to the “custom_aabb” property of each of the meshes. You can simply copy the default AABB, but set the vertical (Y) size to the max possible height, of the terrain that you are generating.
@k4gi9 ай бұрын
this was a great watch, thanks :)
@DamianDuff-yx5ec15 күн бұрын
God level bro🙏💙
@nowherebrain9 ай бұрын
I love spatial gardener!
@trainzmarcel20749 ай бұрын
actual collider holes? not even zylann could do that!
@MajikayoGames9 ай бұрын
Yep got correctly collision mapped holes. Those were actually very quick to add. It's supported natively by Godot physics and jolt for the heightmap collision shape. I recommend using jolt. Also, I found running on jolt separate thread eliminated level load stutters and lag for the terrain. I didn't know zylann's didn't have those. I was actually using his terrain system before I decided to write this one.
@trainzmarcel20749 ай бұрын
@@MajikayoGameslol i needed jolt because im making a physics based sandbox and my shapecasts kept glitching and going through the ground with godot physics. what a disaster. i specifically need collider holes because i wanted to make an underground lab and zylanns terrain holes are only visual. now i use a big csg block and hill meshes in some areas because it turns out i cant have 16km^2 terrain that runs smooth on medium end devices.
@MajikayoGames9 ай бұрын
@@trainzmarcel2074 hmm yeah i was thinking about chunking the terrain collider mesh, but because I didn't run into any performance issues i didn't. I don't think it would be too hard to modify my addon to chunk it. Not sure if that would help/work for your use case. And yes i have found godot jolt to be both much more stable and performant. I heard there may be making it the official physics engine soon.
@enzozirotti64279 ай бұрын
This is so helpful thank you!!!!
@MajikayoGames9 ай бұрын
Glad you enjoyed :D let me know if you have any questions or if I can clarify anything. Was aiming to save others time. Anyone needing to implement terrain in Godot, I wanted this video to be a good reference for, to speed up their process, or you can modify mine and take whatever code you need as it's CC0.
@enzozirotti64279 ай бұрын
Have you worked with ragdolls in Godot 4?
@MajikayoGames9 ай бұрын
@@enzozirotti6427 I have not! That sounds like an interesting topic though I'll add it to my list of potential video ideas
@Yumenoki999 ай бұрын
Such a good watch, I have been wondering how game terrain works for a while, thanks so much for explaining! Especially after trying to model a map in blender and going through lots of frustration trying to manually create LODs for it and trying to paint it in substance painter, big mistake lol. Maybe one day I can try my hand at an own terrain system customized to my needs!~
@MajikayoGames9 ай бұрын
Glad you enjoyed! Yes I wanted to organize as much of the key details as I could in one video for others interested in learning about it, maybe implementing their own, or to modify mine. I jumped around a bunch of different resources to learn everything in this video so wanted to create a singular resource for it as well as a small public domain code base to save others time and not duplicate work as much as possible. :)
@elilentiart80256 ай бұрын
So, I've been playing around with this tool and am having a blast. I have tried several terrain options for Godot and this is by far my favourite and the most intuitive for a beginner. I have a few questions but please forgive my ignorance as I am new to game dev. Is there any way to add further textures to the map or is it locked to 4 (I'm assuming not)? Also, is it possible to use a shader as a texture while still using the splatmap function? A final suggestion, I feel like the one key feature this tool could use is a smooth brush. It could help a lot with sculpting land formations. I realise that is something you have probably already considered but wanted to share my impressions. Thanks again for sharing this!
@MajikayoGames6 ай бұрын
Glad you are enjoying! All valid questions, and would be very good to add. However, this add-on was more intended as a proof of concept/starting point for anyone to create their own terrain system, modifying mine or referencing my code and this video. For the core of it, I want to keep it as simple as possible. It is locked to 4 textures currently. Shader you couldn't use as a texture. It only accepts Texture2Ds as textures, whereas a shader would be a material (BaseMaterial accepts Texture2Ds to color it). I'm sure if you modified the terrain shader, you could have some interesting setup where for certain colors of the splatmap you could use different fragment shader logic. Smooth brush is a good idea. I wonder does flatten accomplish a similar purpose? I guess not as effectively, probably for smooth you would want to maintain hills. For another pretty easy to use terrain system which has a lot more features such as more than 4 textures, I would recommend hterrain if my SimpleTerrain isn't enough for your needs. Hope this helps :)
@elilentiart80256 ай бұрын
@@MajikayoGames Thanks for the reply :) I suspect I'm trying to run before I walk here. If I stick with learning GDScript I could potentially implement these changes myself for my own projects.
@davew7239 ай бұрын
Basic question from someone just starting learning...I tried to 'Create a Trimesh Static Body' for the MeshInstance3D in your examples. The problem is the shaders vertex variation isn't getting applied to the collisionshape. Is there a different better way to create the collision body to match the mesh rendering? (BTW...Great video!). Actually just got farther in the video where you briefly discussed your collision map handling. Still wrapping my head around the usage/integration of that function.
@MajikayoGames9 ай бұрын
Ah yes this is one common problem with vertex shaders. The vertices are not actually 'moved' it's just moved in render. So this means if you create a trimesh static body, it would create a flat plane. Because it's still a flat plane underlying the mesh, we are just morphing them each frame right before rendering in the vertex shader/on the GPU only. The engine still sees it as a flat plane. I also discuss this for normals, to get correct normals with this method you need to calculate them by hand after moving the vertices (17:00). So there are some gymnastics you have to do to use this method, the benefit it is it is more flexible and faster overall for LODs. The way I create my collision meshes, is that I did the same process in GDScript, and made sure the logic was exactly the same as the vertex shader. There isn't any easy way to do this unfortunately, you would either need to do calculate them in code from your heightmap, or do something like create the mesh in blender or a 3D modelling program to have a correct final mesh (or you could export a .mesh from SimpleTerrain and use that on a MeshInstance3D in your scene, I just added this feature the other day). If you calculate them in code you can use the HeightmapShape3D and just add all the image pixel values of your noise texture. Here's the line where I do that in my code: github.com/majikayogames/SimpleTerrain/blob/a074a13789bd64e9a11866fb8fb6d27666145642/addons/SimpleTerrain/SimpleTerrain.gd#L399 Glad you enjoyed the video :) Let me know if you have any more questions
@fanrenchen5662 ай бұрын
It is great! is it possible to move the control panel out of engine editor and into the game UI and then we could edit the terrain in the game?
@alighieribosch4 ай бұрын
Very interesting!
@PastaMaster1157 ай бұрын
Half of this flew right over my head. I can replicate what you did, but understanding it? Hahaha that's a whole other thing.
@MajikayoGames7 ай бұрын
Yeah I was trying to strike the right balance of detail without going too slow here. I think I might have packed quite a lot into this vid so understandable if you didn't understand it all. Not sure what parts you didn't get but I'd be happy to help explain here if you have any questions :) I also just did a more comprehensive explanation of the linear algebra/matrix part I explained in the last part in my newest video, How Godot's Transform3D Type Works, if you didn't get that part.
@whiletrue1-wb6xf6 ай бұрын
This is fascinating. Where did you learn all this? What is the source of your knowledge? Can you share it?
@aramagon70119 ай бұрын
Love this really do. Look I've been grinding tutorials on Godot since the beginning of the year. I'm good with modles and assets for games. And I'm I. The middle of making a game with a terrain and I vae tried terrain3d and mterrain and even though terrain3d is amazing the one thing I have been having trouble with is the texturing export and yes it alous for alot of textures. This what toy have made is awesome. As as I do programing aswell just not in the same language so I can imagine the time you spent in making this. A few things though if you could add more texture options and color and the export of the mesh and texture file that would be great. Texture rotation would be nice too because you could blend more of the textures and also have the option of wetness. But other that that I love this simple terrain. I got it yesterday I've played with it and find it much more useful except the parts I've mension. If it was possible for other programs out there to help you with this it's going to make terrain editing in Godot so much better. The one part is using the assets painter programs isn't really much on how to use it with terrain3d and I thing this what you have made has alot more potential. But really good work on this.
@MajikayoGames9 ай бұрын
Thank you! :) I really appreciate your comment. I'll make note of those suggestions, once I return to working on SimpleTerrain I'll see what I can do. Working on some other projects and tutorials at the moment. For the texture rotation/tiling idea, I have some plans for that in the future. I want to use something called Wang Tiles. I tried auto blending the textures using an anti-tile rotation method but wasn't happy with the results I got. It looked too distorted So I'd probably like to implement Wang tiles to solve the repeating texture problem. More texture slots I have to think about how I could do that. I know there are some examples of terrain plugins with up to 16 textures with a splatmap.
@MajikayoGames9 ай бұрын
Hey I ended up needing this feature myself so today I added the functionality to export the terrain as a mesh in the terrain settings in the toolbar. After saving as a .mesh file you can drop it into a new scene then in the top left of Godot click Scene -> Export as -> glTF 2.0 Scene. Then you can import that into blender or a 3D modelling program of your choice. It won't have the textures so you would need to export those separately and set up a splatmap etc in blender's Shading tab but hope it's useful to you :)
@The_Stank910 ай бұрын
😍
@MajikayoGames10 ай бұрын
@son.nguyenduy2 ай бұрын
Can you explain how it work with Spatial Gardener ? I am beginning to understand.Thank you
@MajikayoGames2 ай бұрын
Spatial gardener allows you to paint onto collision shapes, so you can just generate a collision shape in terrain settings, and then paint on the collision shape using spatial gardener as normal.
@artsmit95456 ай бұрын
How was the chunking done ?can you explain
@MajikayoGames6 ай бұрын
The chunking is pretty simple, you can see here: github.com/majikayogames/SimpleTerrain/blob/a074a13789bd64e9a11866fb8fb6d27666145642/addons/SimpleTerrain/SimpleTerrain.gd#L302 _create_lod_meshes and _create_chunks functions create them. It just makes the grid of plane meshes. You only need a number of plane meshes to match the number of your LODs, 5 or whatever, and then all the MeshInstance3Ds can share each mesh. Then in _update_lods each frame, I just set the mesh to use for each chunk, higher LOD the closer to the camera: github.com/majikayogames/SimpleTerrain/blob/a074a13789bd64e9a11866fb8fb6d27666145642/addons/SimpleTerrain/SimpleTerrain.gd#L437 Hope this helps. Let me know if that makes sense
@TusingwireDamian2 күн бұрын
Height maps are killing me😢
@shxbhfhb85499 ай бұрын
Add spline road ♥️
@MajikayoGames9 ай бұрын
Sorry not sure what you mean can you elaborate? 🧐😁😄
@Antiperubahan5 ай бұрын
I really like your explanation sir,but your voice is too Small