TouchEngine blueprint confusion

Some TouchEngine confusion on consuming TOP data inside Unreal.

I modified the SimpleTexture demo to use webcam instead of a texture.

Simple change and it works in Unreal.

But how do you edit the material ? I see a reference to ‘Dynamic Material’ in the Blueprint (attached) but can’t see any way to modify it or where its actually being pulled from.

hey @art3mis

the Dynamic Material variable is set in the BPs construction script. technically, you can adjust the source material there or Set Material (Static Mesh) off the Dynamic Material - however, you don’t actually want to do that as it simply gets overwritten with the TouchEngine texture during runtime.

Dynamic Material is an UE Material Instance Dynamic which is a runtime-editable instance of a material that allows you to modify material parameters during runtime. in your example, navigate via the World Outliner to TESamples/TOPs/BP_UESample_TOP_02_SimpleTexture → Details → Static Mesh → Materials → MID_TouchEngineInput_0. here, you’ll see a MID applied as the material that dynamically pulls in the TouchEngine texture during runtime. If you double-click MID_TouchEngineInput_0 and then double-click into the parent material TouchEngineInput you can see the TexTexIn material parameter being referenced in BP_UESample_TOP_02_SimpleTexture as the Value input in the Dynamic Material MID Set Texture Parameter Value node.

hope that helps