- Home /
Simplest way to have a damage decal or texture on cubes.
I see a whole bunch of conflicting posts (most are also several years old) about how to apply a second texture or material to a cube.
I would like to know what is the most performant, and if possible, the simplest way to add a second texture to a cube. I am looking to implement something like the cracks that appear when you smack a block in Minecraft.
It depends on what you want to do. The $$anonymous$$inecraft example is different from most decal solutions because the "decal" (which really is none) can't be applied anywhere; it's uv is tied to the surface of the block's surface. So, I'd imagine using a shader that supports a second overlaid texture would work best here, possibly using another uv channel. See if the Standard Shader Detail slots fit your needs.
For real declas like bullet marks, the most common way is to put small quads onto the surface which have a shader that makes them draw a tiny bit towards the camera to now z-fighting occurs ideally.
AH yes. I don't need the classic type of decals (bulletholes) that position themselves and angle themselves accordingly. I simply want my cube to have cracks overlaid on the texture. The reason I would like 'two layers' is I need 3 levels of damage reflected on at least 10 different types of cubes. If I manually created a UV type texture map, it would take hours - and I would need to script/shader the changes. All of this seems like a waste because the "damage" decal could be used on all of them equally, ins$$anonymous$$d of having to make 30+ textures.