Making your materials transparent without Transclucency

Hello guys!

I want to share a little idea, that I got today. It’s about making your objects transparent without using Translucency mode. I don’t know, if somebody has already posted it, I want to share it aswell.

So, the trick is really really simple.

  1. First of all, you have to set your material blend mode to Masked
  2. Next you need to call Checker node and connect it to Opacity Mask pin.
  3. In order to make material masking by screenspace (we do not need to use model’s UV here), you must connect ScreenPosition node to UV parameter of Checker node.
  4. The last thing is to make checker node mask half of all pixels. It can be done by connecting ScreenResolution (Buffer) to Tile parameter.

Here is a result and material graph:

http://s1.uploadpics.ru/images/ZJO1rg6on-.png

Advantages and disadvantages:
[table=“width: 700, class: grid, align: left”]

Translucency
Masked

  • Can have any translucent value
  • Can only have 0%, 50% or 100%.
    But actually you can somehow mask more or less 50%, so you will have other values
  • Have many shading and lighting parameters you can choose from to make the look you want.
  • Support all the stuff from Opaque. Correctly recieving shadows.
  • Does not cast shadows.
  • Cast shadows. Moreover shadows will be 50% transparent.

  • Works correct with all AA methods.

  • Work better on FXAA and without motion blur.

  • You should change material in order to make your opaque mesh transparent.

  • You do not need to change material, just activate it by using parameter. It’s very helpful. for example, when player can move stuff around and it has to be transparent while doing so.
  • Is not rendered in ZDepth.

There are more disadvanteges ofcourse, like refraction or SceneTexture, but I hope someone will find the use of this technique.

For example, I’m going to use it in my strategy game. When player move objects or constructions, they must have collision disabled and be transparent. By using this I won’t need to create another translucent material, I’ll just set translusent parameter.

There is already check box for that functionality in material.

You reinvented Dithering.
UE4 already provides this feature.
See “TemporalAADither” Node in the Material Editor.

Looks like I missed it :smiley:

But I thought dithering works only with TemporalAA, when thins one works with FXAA.

TemporalAADither actually works with every AA technique.

Thank you for the info) I guess this checker technique is useless then…