multiple textures on one mesh + different Albedos

I’m currently trying to write my own minecraft clone. Just for fun.

I’m currently creating one mesh per chunk (16x16x16 blocks). I’ve worked with a simple sprite on a material with a normal sprite texture. Just setting the uv’s while creating the mesh and I’m done. Easy.

Modern minecraft is using a system where textures can be set to different colors (albedos). For example a black/white grass texture which is colored depending on the current biome. (ie forest = #0b2c04 hills = #12E14F00)

I could set the albedo color for the whole sprite - but not for a single tile. And especially not on the mesh itself: I can’t set it to bright green on 0,0,0 and dark green on 0,0,1

Now I could create a mesh per block type per chunk - which would decrease performance by a lot eventually. It also wouldn’t solve the problem to set color per face.

So… I’m running out of ideas and wanted to ask your for some help.

Actual Question:

How do I set different textures on one mesh with different colors (albedos) per face? If that is not possible at all - do you have other ideas to solve the problem?

You could try experimenting with Vertex Colors. I'm not sure how Minecraft does it, maybe with some localized palette switching effect, but Vertex Colors can at least give you a nice colorization effect, useful for things like different lighting conditions for example.

1 Answer

1

U could make a material for each type, so you dont cahnge the albedo but changes to another material with a different albedo… Or you could try when you change the albedo in a script you make a duplicate and change that one