How do i create several instanced meshes with the same geometry but with different textures?

Ive been trying to create a minecraft like terrain generation and in order to be able to render more of the scene im trying out InstancedMeshes, im am completelty new to three.js and all that it offers so it would be nice if someone coul give me some pointers on what to do and how to do it! :slight_smile:

Maybe this topic will be helpful: How to apply offsets for texture atlas in InstancedMesh?

If need textures array instead texture atlas:

You may find this useful. I’m tinkering with a similar idea, but I have no goal of generating worlds like in mine craft,; I’m more focused on procedural dungeons etc like Diablo II.

My world “space” it provides info I need to create meshes.

Simple test

My block builder is the backbone and very much alpha version:

And here is a more complex example:

The above has turned into my testing of lots of things. Far beyond “basic room”
I find new problems constantly, and none of this is a best practice. The clipping for example needs work as you can clip through walls.

btw, neat use of perlin noise