2D Tilemap in a 3D game

Godot Version

4.3

Question

Hey all! I’m trying something a little odd, but want to see how well it goes. I want to try and create a map using the 2D Tilemap system, but have the game still played in 3D. (Yes I know the 3D Gridmap system is a thing, but I want to try doing it this way) I can get some of it to work, but have some questions about other areas.

I have my tilemap split into a few sections. 1 for ground and 1 for objects (like trees) The tree section is pretty easy, I just loop through everything in that layer and spawn a 3D tree for every tile. Not hard. The ground layer isn’t the worst, same process just loop through the tiles and spawn a quad for every tile. Not too bad.

Where I am having difficulty now is getting the textures. I don’t know of any way to get the texture of a tile that is being used and applying that to the 3D quad. At least I can’t find any link there.

I thought then maybe I can just create my own texture for the ground, in a separate program and just map that single texture onto all the quads that are spawned, but I can’t seem to find how that would be done either.

So I’m kinda stuck. I can spawn in a world, but I can’t texture it. Any ideas how I would go about doing this?

When i apply a material with a texture to a quad it applies it to the whole quad. What exactly isnt working?

Well putting a texture onto a quad is easy, but I want to pull the texture of a single tile from a tilemap to use as a texture. That is a little bit harder, and honestly I don’t think it works that way. But that’s assuming I want every quad to have a separate individual texture.

I could also have one large texture. Lets say that is 320 px by 320 px. If every quad is 32 by 32, then I want to map just that section of the large texture. Instead of the whole texture, just that 32 by 32 section of the large texture. This seems much more viable, but not really sure how it would be done.