- Home /
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 $$anonymous$$inecraft 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.
Answer by eirikamb · Jun 23, 2016 at 02:13 PM
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
Your answer
Follow this Question
Related Questions
Tool to make ONE flat sized mesh from a png/texture? 5 Answers
How to assign texture to a specific mesh in a chunk for a minecraft game? 1 Answer
How to scroll a region of texture (which is an atlas) on a mesh (which is a sprite) 2 Answers
Texture type -> Advanced -> Mesh type: how it works? 1 Answer
Unity distort a sprite to match a mesh 2 Answers