Using Terrain3D in Godot 4 - Part 2
Вставка
- Опубліковано 1 лип 2024
- In part 2, I cover the more advanced features of Terrain3D including holes, navigation, texture painting and so much more. Terrain3D is our high performance, editable terrain system for Godot 4, written in C++.
Contents
00:00 - Introduction
00:22 - Common Problems
02:01 - Texturing
03:05 - Autoshader
05:45 - Blending Manual Painting & Autoshader
07:43 - Material Settings
08:27 - World Background
08:57 - Texture Filtering
09:24 - Auto shader settings
09:51 - Dual scaling
10:29 - Height Blending
10:47 - Macro Variation
12:10 - Debug Views
15:25 - Holes
16:35 - Occlusion Culling
17:02 - Navigation
18:00 - Fix Flickering
18:44 - Cull margin
19:03 - Collision
19:32 - Procedural Generation
20:08 - Object Placement
21:18 - Mobile & Web Support
21:53 - Contributing
22:15 - Future Plans & Updates
Watch part 1:
• Using Terrain3D in God...
Download the plugin:
github.com/TokisanGames/Terra...
Join my discord server to chat about Terrain3D or our game, Out of the Ashes:
tokisan.com/discord
See pics and details of Out of the Ashes here:
tokisan.com/out-of-the-ashes/
Follow me:
Email List: tokisan.com
Twitter: / tokisangames
Facebook: / tokisangames
#godotengine #godot #gamedev - Ігри
So far the only drawback with Terrain3D is setting up the textures. I'm fine with it from a technical standpoint but for other its a whole process that they'll have to redo over and over again. Glad that there's the texture setup utility being worked on though.👏
It would be absolutely amazing if you could add your own plant placement system in Terrain3d. Third-party systems are inefficient and inconvenient to use. ❤
Right now it will convert T3D in a complete Terrain on its own, it is great as right now, but scatterting vegetation is truly needed. Tokisan, thanks for this amazing gift
Agreed! I'm currently using Proton Scatter and while it's great, it feels like a misfit for what I'm trying to achieve.
You did an oustanding work not only on this whole toolkit, but also on this video! This is a really well-thought-out tool, and I can't wait to see what will come next for this project. :)
That's is insane! Such a feature rich tool! Thank you for your efforts!
Thank you so much for this awesome tool and tutorial series + docs; all absolutely fantastic!
I took me a bit to setup but this is amazing. Thank you for existing!
I just downloaded and used this, and I love it. I look forward to using it more, and these videos were awesome for picking it up easily. You should make a part 3 for optimizing things!
Huge thanks for this, we are using it in our project actively, it is a real savior against chunks. Keep up the great work
Thank you for sharing such a quality plugin with everyone.
Thank you so much for that tool. The terrain truly looks amazing, especially with the macro variations enabled!
Such a good tool! I work on a small RTS prototype and integrating this was pretty straight forward.
These videos are really helpful! The only thing I was missing when switching from Unity to Godot was terrain. You can't imagine how happy you made me! Also I'm very excited on the future of Terrain3D. Thank you for your amazing work! 😊
Fantastic work, I love this community
Superb, very well done and explained
Truly amazing work!
I was about to give up on making large maps because it was too time-consuming. Thanks so much! This helps infinitely. Now to figure out how to auto-generate realistic maps with seeds so I can have various servers have new maps regularly!
Thx for making such a good, fast plugin(by using c++), really adds to godot's modular and lightweight nature
BTW 43th like
insane work guys!
Finally!! Thank you for this mate
Absolutely amazing plugin. This finally made map design in Godot a joy and really allows me to be creative without barriers!
Wait until you try the slope sculpting tool coming in 0.9.1.
This looks amazing. Also im very interested in your game, please post more about it! Your last video on it was 2 years ago ❤
Thanks. Will do. The transition from Godot 3 to Godot 4 has taken more than a year as so many things like terrain and day/night cycle didn't exist, and engine devs made changes that forced us to redo work multiple times. This year we'll be producing more media as we're getting things back to looking good again.
Wow I Love your work. This is an AMAZING addons for godot and gamedeveloper.
Thank you bro it is a amazing plugin.
Terrain3D is the last piece of the puzzle in getting me to switch from unity to godot. The macrovariation and dual scaling add are going to add so much production value for basically zero time investment, love it. If you ever expand on the procedural workflow and add shadergraph-esque visual node based UI it be will everything I could every hope for in a terrain system. 10/10 great work keep it up.
Zero-time investment on your part. Countless hours for us.
I'll give it a try thank you very much
WOOT!! Sharing!
i love this tool, thanks for the video 👋
"...it's most likely because you haven't enabled the plugin".
Yup!
Thanks for such a wonderful tool - the power of OSS!
Very cool!
Thank you
15:57 My applause! Now I can make the game I wanted on Godot. I just need to lower the polygon count.
Coming in 0.9.1.
Godot is moving faster than I tough.
Legends
Love & appreciate all the work gone into this. One question, is it possible to create holes at runtime?
Yes using the API. The editor is a running game and does it. It's not for a beginner though. Zylann's Voxel Tools is designed for end user destructibility and tunnel creation.
@@TokisanGames thanks for the amazing tool, one question, how do you refill holes?
@@v44n7 There's an enable [holes] checkbox on the setting. Turn it off.
macro variation is my secret love (don't tell to anyone, i just love changing it, to what suits me.
Does the occluder also occlude multimesh objects? I think that's where the largest performance increase will come from (e.g. culling foliage behind a mountain). Reason I ask is that I've had issues with setting up occlusion culling on multimeshes in gd4
We just provide Godot with an occluder. The engine is responsible for how it works. All object instances in a multimesh show up in one draw call. So, there is no option to cull part of the multimesh. It's all or nothing. If that's what you want then look at your MMI's AABB, extra_cull_margin, visibility ranges, and ignore_occlusion_culling.
Gotcha, yeah that's what I thought. There's also a technique to reduce the visible instance count of the multimesh based on distance from the camera (but that might look bad for games with an aerial component)@@TokisanGames
How high can the terrain be if we make the ocean Subnautica style?
Could the landscape be as huge and endless as in MTerrain?
The current max is 16k x 16k with potential for more in the future, and height range is whatever fits in a 32-bit float. Around a few 10ks away from the camera and single floating point precision breaks down though, so for very large terrains you'll need to build Godot, the release templates, and Terrain3D with double precision.
The only problem i've found so far is to make cliffs/canyons. In general is a very good tool, ty.
Don't make them straight vertical. Give them a slight grade. Or cover the face with mesh rocks.
@@TokisanGames Another question. Is it possible to increase the maximum region? Rn is 16x16. I wish i could use something like 80x80
@@rogermonteiro3882 See issue #77
Been loving Terrain3D! Do you know if you have plans for road/path support? Similar to EasyRoads3D in Unity
No, there's already a road plugin for Godot. Won't take much work for it to snap to the ground if it's not already native. We already have a slope tool for sculpting flat, angled ground and paths.
@@TokisanGames Gotcha thanks! I'll have to look into the snap to ground feature for making roads/paths as it would make it a lot easier.
Please make more videos about making Voxel things in Godot
I haven't kept up with Zylann's progress on Voxel Tools and am not using voxels in my projects currently. So, it will be a long while before I look at that again. I'd like to make more, shorter videos about other things though.
Quick question you say it does procedural generation can that be Voxel base terrain?
Use Zylann's voxel tools for a voxel terrain. This is height map only. Procedural generation means terrain created by code. We have a demo showing how to create a heightmap from a noise generator and loading that into the terrain via code at startup.
is it possible for this to work with compatibility renderer? I am working on a platform that can't run on mobile or forward+ without stuttering and materials flickering in and out of existence.
See my other answer.
I love this terrain plugin but could you make the brush sizes larger I can only go to 200m but I want to lift massive ground up but you know
Use 0.9.1 and type in what you want. It will be sluggish though due to no gpu painting.
tysm love ya!
Is there a way to increase the texture resolution? As default it seems super low when using sensible measurements. Only "solution" Ive found is to sculpt the terrain at a massive scale and then scale the assets Ive made using real life measurements at to a huge scale aswell. Making a dirt road that is 2 meters wide with default values looks super blocky.
Texture resolutions are entirely up to whatever you put in. The demo has 1k textures. In Out of the Ashes, we're using 2k. Max is 16-32k depending on your card. Each texture slot has its own separate UV scale for your control. You don't want to scale up your game as you'll screw with physics bodies and animations. Keep everything at real units.
If you want to increase the mesh resolution, v0.9.1-dev already has a vertex_spacing setting.
I see, the textures themselves look good (using 2k) but the way they blend together is super blocky at lower scales. Maybe the vertex_spacing setting will make it blend smoother? Any ETA for when v0.9.1 will be released to the masses?
@@oomegator You might have something wrong with your texture setup, like no height textures, or non-recommended painting technique, or replaced the noise texture. Blocky blending hasn't been an issue for many months. I showed how to do it in this video. We have over 20 textures in OOTA and have no issue with blending or texture scaling. Next version will come out within a week, but vertex scaling won't fix poor painting technique or messed up textures. Discord is better for support.
Ok! Thank you for taking time to answer! 🙂
So i am going to play with this and if possible get the World Creator team promoting this
anyone knows how to use icterus's simple grass addon with this? I try but it simply wont draw any grass. I dont even know why this happens
Enable debug collision. Our foliage instancer will be out in a few weeks.
im not understanding how to make the navigation im making a survival game and i want animals to use the terrain but then i need the whole world to have a nav when i try and paint the whole world (4 clunks) in the "nav paint" it does not load a nav but when i use less "nav paint" it generates a nav CAN YOU HELP ME
Come to discord for support. Using the navigation server is complex and you need to read all of our documentation on it, and much of Godot's documentation. Our docs specifically tell you to create multiple regions if the nav area gets too big. If you need the whole world navigable, you probably don't need a navigation mesh, or you just need to bake an area around the player, which our code generated demo does. The Godot docs will help you understand how best to use the nav system.
@@TokisanGames thanks i tried code generated demo and put it in my scene and it works thanks your terrain addon is the best one out there ❤
Is there any plan to add this plugin as a basic tool in godot?
You mean integrate it with the core engine? The core devs don't want that.
Yo, I'm actually having a bit of a problem with collisions, and found an answer in this video that didn't necessarily fix my issue. Is there any common problems with the collision, or am I just stupid?
Haven't had any problems, nor reports from others with collision. Come in to discord for specific help.
@@TokisanGames No worries, I actually figured it out myself, the regions of the terrain have to be identified with the tool, to gain collision, specifically with the "Add Regions" along the side toolbar when you're focused in on the terrain itself.
@@samlewis2426 Yes only sculpted regions are real terrain with collision. The world background noise is just an expensive visual gimmick.
Why there there is no way to scale terrain? I have 16x16 km terrain that has 8K heightmap, when importing it is 8km
No one has built it yet. See PR #296.
Why not an option to let the "auto shader" overwrite the manual shaded parts (overwrite blend data). Then turning auto shader off / marking it manual, and the user can alter the auto shaded parts.
Baking the autoshader is worth considering. The user can already alter the autoshaded parts with settings or manual painting.
Maybe I'm completely inept; but I am unable to figure out the GAEA->GODOT workflow for this
Every commercial tool has the ability to export heightmaps in format we can read directly or that can be manipulated in photoshop/gimp/krita. I searched and instantly found that Gaea can export PNG, Tiff, and EXR up to 16k. Use EXR as our import docs recommend.
Thank you, I have no issues with export or format; the issue is the Array object assigned to the panel is totally uneditable; the ONLY workaround I have so far is to import the height data but copy/paste the example 3dTextureSet from the demo project and even then I can only replace a texture, I still cannot add elements to the array. I'll read the code again and try to suss it out.
@@TokisanGames
@@kfrz Come to discord for support. If you can't use the tool as I demonstrated in this video, then you have an installation problem with the plugin or Godot. You might have error messages on your console. You should not be editing the array in the resource, which is read only, but using the texture panel as demonstrated.
Does it work on the mobile, knowing that my phone is Huawei Y9s, and is the graphics on the mobile the same as the one on the PS or different
No idea, it's experimental. I talked about mobile in this video. Watch that section, and read the page on mobile in the (latest version, not stable) docs for updates.
@@TokisanGames Okay and godot 3 is it suitable or not
@@user-ip9dk8bt9i Don't use Godot 3, use 4
As far as i am aware and tried with an oppo reno 4z 5g and my new reno 8 pro(which is way more modern , rhough i rathered a good pc xd) , it seem's to work well, though sculpting and some stuff are a bit clunky. @@TokisanGames
how does terrain3d react with very large terrain, by that i mean, how does the "loading" react, like will it acctualy load the whole map in the ram right from the start ?
but good job for real, this tool seem better then unreal and unity one. or at least when i tried them and it's 10000% better then the one i did for my opengl map editor hahahahah it's amazing what you guys did !
It loads all terrain data at start. There's no streaming in Godot or our plugin. There's a bug in Godot that prevents saving more than around 8k^2. But it could be imported at runtime up to 16k^2.
@@TokisanGames so if i want to uses that to make a massif terrain for airplane it's kinda a no? Would be around 50km by 50km
@@mirtir472 Current heightmap maximum size is 16km^2. You can scale the distance between vertices say up to 10x. But to run a 50km world you'll most likely need to build the engine and plugin with double precision.
@@TokisanGames make sens loading a 250k height map in the gpu would probably eat a large amount of vram. Is it possible to use multiple terrain node with our system?
I will try to make it work! Thanks for your answer ! I will also keep you updated if i found good idea !
@@mirtir472 not simultaneously, at the moment. We use multiple terrains in different scenes.
Can I paint a Street Texture with a Path 3d in Terrain 3d? ( so the street is 100% accurate)
Sure, or use the Godot Road Generator, but neither have anything to do with Terrain3D. Enable our editor collision so whatever other utility can snap to the ground.
@@TokisanGames the "Snap funktion" only works with the CSG Polygon and not with the path 3D :(
@@TokisanGames wish I had the same raycast funktion like Beau Seymour in his Godots Roads Video by 5min
@@JohnStonexDj If you want to use Path3D you of course need additional code. I assumed you knew it's just a barebones math class. It doesn't generate meshes. You'd need to generate your own mesh, and provide snapping functionality. Eg Waterways does this, uses Curve3D, generates meshes, snaps to ground colliders.
If you want a no code option, use CSG or the plugin I mentioned.
Regardless these are independent of Terrain3D. They'll just query the terrain via code, the same as any mesh, though we provide more options in our Integrating with Terrain3D documentation.
@@TokisanGames Thanks for answer so quickly.Yes I know that path 3d dont generate a mashes. I built a CSG around my path 3d so I have my street network template for painting it on the terrain. I`m a coding newbie but I saw Terrain 3D brings extra library for raycast stuff. Will read the documentation about it one day.
The KI told me when I want to use the Terrain 3D library I have to write "Import Terrain3D" but Godot marks this red because Terrain3D and my path3d are not in the same folder ... I dont get it
Spital garder is more better for object placing
Sorry for spelling 😂
Hello there, I would like to enable Terain3D in Project Settings, but after I click to Enable this shows up
'' Unable to load addon script from path: 'res://addons/terrain_3d/editor/editor.gd'. This might be due to a code error in that script.
Disabling the addon at 'res://addons/terrain_3d/plugin.cfg' to prevent further errors. ''
And I don't know how to Enable it.
Any advices please?
Incorrect installation. Review part 1 again and the written instructions. There are likely more errors in your console that say it can't find the dll because it's not on your drive or in the right spot.