With this method, every single solid block should be able to have a stair, slab, wall/fence, gate, etc. variant without putting in custom textures for every possible variant that could exist.
Instead, you program the game to first look for a custom texture set for a block variant. If there is one, then use it for that block. If you don't find one, you borrow the original block texture set and perform some cut and splicing to generate the texture set on the fly for that block variant.
These runtime-generated textures would also be held in cache.
All the instances of each block variant should follow the same pattern of cutting and splicing, so all the non-custom walls will have their textures generated by the same method, for example. For use cases where the standard method doesn't produce aesthetically-pleasing results, a custom texture can still be generated.
Example, for grass stairs, grass slabs, and grass walls, the grass block would be manipulated at runtime to generate the texture for these variants, where the grass is still visible on the two levels of the stairs and the top of the slab, and dirt is visible everywhere. Or in the cast of dirt path stairs and slabs, the tops of these would be lowered slightly and the dirt path texture would be visible on the tops of these block variants.
Please sign in to leave a comment.
0 Comments