Terrain editor

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By trafel
:warning: Old Version Published before Godot 3 was released.

Are they any ways to proceduraly generate terrains in godot that can be used for rts games ?

:bust_in_silhouette: Reply From: Zylann

Yes, but “procedurally” means you won’t really edit that terrain, so “editor” in the title is a bit confusing.
If your game is 3D, you can produce meshes with SurfaceTool and colliders in code from the algorithm of your choice.

If you mean drawing the terrain in the editor, I made a terrain plugin on the assetlib that enables you do that (inspired on the Unity3D one), so yeah, there are ways to build an RTS terrain :slight_smile:

in your terrain editor how i can use multitexture? have a collision ground? thank you

linuxfree | 2016-10-03 19:06

At the moment the generated geometry only has one layer of UVs. I still have to figure out how mesh colliders work in Godot, because terrains are huge by definition, and I wouldn’t want to make it inefficient.
I exposed a generate_colliders property but see, I didn’t implemented it yet https://github.com/Zylann/godot_terrain_plugin/blob/master/addons/zylann.terrain/terrain.gd#L496

Zylann | 2016-10-03 20:13

nice i think on future will have multitexture and generate_colliders i will test soon. my concentration now is for i move my arm_right with my gun where mouse control this bone of model to set target of multiplayer model.i’ m with dificult ;(

linuxfree | 2016-10-03 21:37

I started using the terrain plugin that you created and so far it does remind me of the unity terrain tool. there are some features that I believe are missing though and or broken. When you select the terrain the view port rotation becomes locked and you can’t rotate. the ability to position the terrain would be nice instead of it being locked to a single position. It seems that right click is to add and left is to subtract? are these shortcuts? The Height property does not take input.
I’ve also heard that the dev team is planning a terrain editor for 3.0 release. Will it be based on your implementation or something totally different? you should look into getting your tool into the master branch and as part of the base editor instead of a plugin. If you need me to keep testing the tool I’d be glad to since my project will depend on some form of terrain editor.

vonflyhighace2 | 2016-11-21 00:05

When you select the terrain the view port rotation becomes locked and you can’t rotate

I can’t reproduce that. How do you make this happen?

the ability to position the terrain would be nice instead of it being locked to a single position

I thought about this and could add it by making the node inherit Spatial, but I’m not sure if rotation and scaling are relevant for this kind of node :expressionless:

It seems that right click is to add and left is to subtract? are these shortcuts?

These are shortcuts, yes. Otherwise painting modes are selected using the bottom UI.

The Height property does not take input.

This property is used for the Flatten paint mode, it sets the height to a given value (because other tools work in relative mode rather than setting absolute heights).

I’ve also heard that the dev team is planning a terrain editor for 3.0 release. Will it be based on your implementation or something totally different?

I have no idea, this is the first time I hear about this. If they implement a heightmap, it could be nice in 90% of cases, however it has downsides such as inability to make caves, lighting artifacts, and I’m concerned about the implementation itself (LOD, scalability, infinite terrain support, node-that-handles-everything-making-codebase-huge-one-or-nothing…), I mean even if there is a Terrain class coming to Godot in 3.0, there are so many ways of making one that making a custom C++ thing would be great too :stuck_out_tongue:

To be honest, my tool is mostly a proof of concept at the moment, and I see so many improvements to do, but so few I can do in GDScript, and it demotivated me a bit so I prioritized other projects as I don’t need terrain myself, for now. Blender is still the best option for terrains, althought it’s impractical for chunking. I’m also interested in voxel stuff (Minecraft cubes, Transvoxel algorithm, theory of Terrain unification of the infinite and all that), so it’s possible that I work on something a bit more general in the future.

My Terrain node is open-source btw, so anyone can improve it as well, it’s not that complicated in fact :slight_smile:

Zylann | 2016-11-21 01:34