Transparency on specific areas of a texture/material

Hey all - Getting used to setting up materials in UE5 and I’m a little stuck on material graph set up.

I’m trying to import a model (voxel based, created in MagicaVoxel, exported as .obj) and set up a single material which uses masks to render only specific areas of the model with some transparency whilst the rest remains opaque.

For example, a glass bottle with a label. The glass should be transparent (but not invisible) and the label, lid etc should be opaque.

When I try to set this up in the material graph using “blend mode: masked” I can use a separate texture to mask out the glass area (leaving only the label and lid) but that renders the glass entirely invisible.

When I use other blend modes like additive or transluscent, I can’t seem to make only the label opaque and the glass translucent. I have tried experimenting with lerps and multiply nodes, but no matter how I set it up I end up with either the entire model transluscent, invisible, or a mix (masked areas invisible whilst non-masked areas transluscent).

My masks do seem to work at the basic level as they would in another editor so the issue I’m having is definitely with me and setting up materials in UE.

Any help or suggestions welcome!

This blend mode?
image

If the entire mesh has just one material, this won’t work because these blending modes will apply to the whole thing. And the Masked blend mode doesn’t support translucency, just whether things are visible or not.

You can map different materials to different parts of the mesh so that the label and lid are one material and the glass another material.

Also, maybe a material layer blend can help you, if you want to go with the using masks to define material types route: Using Material Layers in Unreal Engine | Unreal Engine 5.1 Documentation

Yeah, that’s the one. I’ll try going the multiple material route and report back. Was kinda hoping to avoid adding another step in the workflow (magicavoxel → unreal instead of magicavoxel → blender → unreal). Ah well, thanks for the information anyway!

1 Like