How to change window style for hwnd ?

With this solution, just be careful about not using black color on cube or your 3D model.

You proposed to make a material which masks black color, how do you apply the material to the environment since there is no object ?

Look at Automative, Product Design and Manufacturing templates (product configurator or photo studio) on Unreal Engine. You can see some arc shaped meshes like real life photography studios to use at background. Also you can see some turntable like meshes, too.

Put one of them to the background and assign it a black material. Put your camera in front of it and scale your background meshes to completely hide your environment.

Think like a real photography taking. If you donā€™t like any of them, you can even model one with Blender or 3Ds Max.

There are samples in Google. Search photography studio backdrop term.

I have one of these in one of my projects. :smile: It should work with anything if you say so, Iā€™ll put a plane and asign that material, I will test now.

1 Like

Use Unlit material on both background mesh and your actual 3D model. Also disable shadows for both of them. So, light donā€™t affect them and you can get a little better performance.

If this is a User Interface material domain, I canā€™t set unlit. I tested on android, the background mesh is white even if the material looks trasparent in editor.

Nope.
You have to create 3 materials.

  1. Material:
    Your background.
    It will be a default/surface material. Just add a vector parameter and set its color to black.

  2. Material:
    Your cubeā€™s material.
    Again, it will be a default/surface material, too.

Both of them will and can be unlit. Donā€™t do any masking in them.
Put a blueprint actor which contains Scene Capture 2D and asing it a render target.

  1. Material.
    Your user interface/window material.
    This is the one you should use User Interface as domain and contains your masking.
  • Add your render target which you asigned to Scene Capture 2D
  • Convert it to Param2D
  • Set Blend Mode as Masked
  • Attach Textureā€™s RGBA output to Material's Opacity Mask input.
  • And use it in your widget.

It has an effect, but the black background is still there. On android there are not these color artifacts cause by vulkan I guess, the shaders are ok, but there is still the black background.
background-mask

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.