The sphere trick was good thinking! Also, thank you for so promptly making these tutorials for Godot 4. We're at RC1 now and it's right around the corner, and the passion of the community is great.
Looking forward to trying this one out for myself! I am desperately trying to find how to do my own terrain generation, but I also want to be able to manipulate each vertex manually to create custom terrain. If you are looking for ideas for new videos, this would be an amazing one to make! (Not biased at all haha)
this has been super helpful but there has been a couple times that you change something then it shows on screen for like one frame and i have to rewind and try to pause at just the right time to read it
Followed the tutorial, but the update button on the inspector panel doesn't do anything. I click it, update shows as checked and nothing actually gets updated. Additionally, I added the FastNoise and the line was still there
@@Chevifier I've probably done something wrong, but I keep looking through the code and nothing stands out as incorrect compared to what is on the video. It's as if the update function doesn't actually work for an unknown reason and the mesh just turned itself into a long black blob. The script is identified as a tool
Great tutorial! How would I make it so I see hard edges for low poly? Physically, the mesh is flat surfaces with sharp edges, but it's adding shading to make it look smooth. How do I change that?
Figured it out: SurfaceTool.set_smooth_group(-1) -1 is for flat normals, 0 is default smoothing, and >0 is smoother. Be sure to use this line BEFORE adding any vertices (or use it in between to modify on a per-vertex level if you need).
@@36OLink1 theres a height map shape but it doesn't have lod scaling (for performance optimization). you basically set its height and depth(width) then pass an array of floats which represents the height of each point HeightMapShape3D.
I already found a solution by just using the create_trimesh_collision() function. dont know if its the best solution for performance, but works for me lol. thanks for the help though@@Chevifier
If I create a mesh, how do I add geometry later? For example, if I create a ribbon mesh of basically a row of faces and want to make it longer by adding more faces, is there an easy way to add those? Thank you so much!
Hey thanks! Do you know how to use the debug mesh (get_debug_mesh) from a HeightMapShape3D? I tried setting a MeshInstance3D's mesh to the debug mesh but it renders in wireframe... Any way to use the surface or mesh data tool on that? I'm a bit lost
Hello, I followed through the video and went back several times, but my terrain is still not quite correct. I know I'm missing something int he script... does anyone have the complete text of the script?
So I removed range from both of sets of for loops, and removed the + 1 from the loop that adds the index, and that fixed the mesh breaking for me, if that was your problem, prolly a late answer but oh well
be sure the (x - xSize) part is cast to float, else the texture will be squished into a single face in the corner: uv.x = float(x - xSize) / xSize uv.y = float(z - zSize) / zSize
Thanks for the tutorials, keep them coming!
ok this seems to be the only tutorial that properly explain how to generate grid surface, neat. Chapters would help extra!
The sphere trick was good thinking!
Also, thank you for so promptly making these tutorials for Godot 4. We're at RC1 now and it's right around the corner, and the passion of the community is great.
No problem. Btw were actually at rc2 now😁
@@Chevifier Already!?
These are going to be very helpful. Thank you.
Thanks, nice tutorial! Was easyto follow and I even was able to convert to c#
Looking forward to trying this one out for myself! I am desperately trying to find how to do my own terrain generation, but I also want to be able to manipulate each vertex manually to create custom terrain. If you are looking for ideas for new videos, this would be an amazing one to make! (Not biased at all haha)
thanks for the tutorials! it working!
A tip: the export variables don't reset if you reload the scene... That caused me significant issues debugging this.
Thats is by engine design. You could comment out the @tool keyword if youre having issues.
thanks, nice tutorial
this has been super helpful but there has been a couple times that you change something then it shows on screen for like one frame and i have to rewind and try to pause at just the right time to read it
Gracias amigo!!!
denada 🙂
Followed the tutorial, but the update button on the inspector panel doesn't do anything. I click it, update shows as checked and nothing actually gets updated. Additionally, I added the FastNoise and the line was still there
make sure its a tools script plus the checkbox should remained unchecked after clicking it in the set() function
@@Chevifier I've probably done something wrong, but I keep looking through the code and nothing stands out as incorrect compared to what is on the video. It's as if the update function doesn't actually work for an unknown reason and the mesh just turned itself into a long black blob. The script is identified as a tool
Nice, thanks!
help when i loaded it. a ton of points moved to the first point randomly
Great tutorial! How would I make it so I see hard edges for low poly? Physically, the mesh is flat surfaces with sharp edges, but it's adding shading to make it look smooth. How do I change that?
Figured it out:
SurfaceTool.set_smooth_group(-1)
-1 is for flat normals, 0 is default smoothing, and >0 is smoother.
Be sure to use this line BEFORE adding any vertices (or use it in between to modify on a per-vertex level if you need).
not about generation, but how can I make a big static base Terrain like vice city / San Andreas with pond, hill, plane.. without breking the game.
Create a heightmap(in blender paint for example) the create all the peices on a grid to cover the heightmap.
How do I add Collision lol, haven't used godot for so long@@Chevifier
@@36OLink1 theres a height map shape but it doesn't have lod scaling (for performance optimization).
you basically set its height and depth(width) then pass an array of floats which represents the height of each point
HeightMapShape3D.
I already found a solution by just using the create_trimesh_collision() function. dont know if its the best solution for performance, but works for me lol. thanks for the help though@@Chevifier
If I create a mesh, how do I add geometry later? For example, if I create a ribbon mesh of basically a row of faces and want to make it longer by adding more faces, is there an easy way to add those?
Thank you so much!
Hey thanks! Do you know how to use the debug mesh (get_debug_mesh) from a HeightMapShape3D? I tried setting a MeshInstance3D's mesh to the debug mesh but it renders in wireframe... Any way to use the surface or mesh data tool on that? I'm a bit lost
Nevermind i just recreated it manually like you did. Great tutorial :)
Hello, I followed through the video and went back several times, but my terrain is still not quite correct. I know I'm missing something int he script... does anyone have the complete text of the script?
So I removed range from both of sets of for loops, and removed the + 1 from the loop that adds the index, and that fixed the mesh breaking for me, if that was your problem, prolly a late answer but oh well
0:17 intro skip
If you don't want to use inverse lerp, just use this instead it does the same thing.
uv.x = (x - xSize) / xSize;
uv.y = (z - zSize) / zSize;
be sure the (x - xSize) part is cast to float, else the texture will be squished into a single face in the corner:
uv.x = float(x - xSize) / xSize
uv.y = float(z - zSize) / zSize