Texture Brush

Texture brush node which is using with UMG components converts your texture input to slate brush variable. This means you can set your slate brush variable or change in run-time on Reality API.

How to use Texture Brush

  • Use ADD NEW button > User Interface then select Widget Blueprint.

  • Select Graph tab, open class settings and set "Parent Class" as "ZDRealityWidget" which under Details Tab.

  • Select Designer tab, add an image from Common section under the Palette and check "Is Variable" selection.

  • Open Graph tab. Add new variable from Variable section. Select it as "SlateBrush" variable.

  • Make it public. Click eye icon.

Reality API detect automatically your "SlateBrush" variable which created in Widget Blueprint. You don't need do anything except make variable public.

  • Create code block with blueprint. (Basically, we will set "MySlateBrush" variable to "myImage" with SET BRUSH node.)

  • Export your widget Blueprint from Edit > Project Settings > Exports. Add new export value under UMG > Widget Classes.

  • Everything is ready for Setup API. Click PLAY button. Open Reality Setup.

  • Add an UMGRENDERER node

  • Select specific UMG class on Widget property from properties of UMGRENDERER node

When you set your widget class, your slate variable will appear on UMGRENDERER node

  • Add a TEXTUREBRUSH from CREATE → UMG

  • Add a "CheckerGenerator" for basic input from Create > Generator > Checker Generator.

  • Connect nodes as shown in the below image.

  • Let's see the result.

Last updated