Im making a 2d game which uses custom tilemap. I made a material to make some colors transparent \ semi-transparent in textures that are used for tiles, which works with everything except my tilemap fo some reason. The material works as intended with Paper2D tilemap, static meshes, etc. It also works with my tilemap until its mode is set to “Translucent” or “Additive” , after that entire tilemap turns fully transparent
Opacity, Source texture nodes doesnt affect result anyhow, tryed setting everything to static values
My tilemap in the end uses modified version of UPaperTileMapComponent::RebuildRenderData which is called repeatedly to draw cells, thats the only connection with Paper2D module. I dont want to dive deep in there before i get the nature of whats happening.
As i see issue comes not from material but from my mesh that doesnt meet some requirements for use with translucent materials, which are not clear to me
Original screenshot was accidently made with blend mode set to masked, in translucent mode theres no opacity mask node. Masked mode works but doesnt fit my needs , because my tiles have shadows and need to be semi transparent.
Found what causes this. For some reason, translucent material requires both GetMaterial and GetNumMaterials methods of MeshComponent interface to be overridden