Terrain3D based on texture

Godot Version

4.3

Question

Hey all! I’m trying to get some terrain working for my game, and the Terrain3D addon seems to be the best (and only) real way to go. The pluggin is pretty nice, but I am having trouble trying to paint my terrain.

The important content in my game (like minable rocks and monster spawner locations) is based on a 2D image. The game uses this image as a reference location for everything. So I want to make my terrain based on these locations. But it seems like Terrain3D is more for people who make their terrain first.

Basically I just need to add the texture to the map, then I can edit from there. I have managed to put my texture onto the map, but it comes in at the wrong scale. I can’t find any real way to increase the scale of the texture to be correct. I tried to alter the Vertex Spacing, but that makes it impossible to do any height modification at all. So that’s a no go.

How do I apply a texture to the terrain properly so I can adjust the height of vertexes based on that texture?

I’m not sure I understood your question. :thinking:

Do you mean that the height of the terrain is wrong when you use your texture?
There is import scale.

Or that your heightmap texture doesn’t fit the terrain size correctly?
Scaling examples:
https://terrain3d.readthedocs.io/en/stable/docs/heightmaps.html#scaling-examples

Second is more accurate, and I think that link might help!

Basically I have a picture of the map as a top down view. I use a TileLayerMap to place where I want important objects to be, which controls spawning. But that picture gets used as visuals too, so I wanted that picture to be the texture of the terrain.

The picture is made using a tileset, then the whole tileset is converted into a single image. Sounds like a lot of steps, but its a process that works for me and my game really well. Anyway, when I apply that picture as the texture on the terrain, the grid side is too small. So I need to scale the picture up properly. I’ll try that link tomorrow and see if those settings help! Thanks!

I gave the link a look and try, but I don’t think its quite what I am looking for.

The image I have is 2048x2048, and the Terrain3D region is set to 64, so I would think that it would map onto the terrain as 32pixels of the image per 1 increment of length. But instead it comes through closer to around 100 pixels per increment. And I am not sure why.