How do you "debug" materials?

Hi guys,
I already posted question in How to use Debugfloat3Values? - Asset Creation - Epic Developer Community Forums
but nobody answering.
So I’m rephrasing my question again.
I’m wondering how do you guys check for exact value for materials.
Let say I want to check “live” vector value for ObjectPositionWS or ReflectionVectorWS.
Is there any way to hook up this value to the console or log?

1 Like

There are some nodes in the “Debug” category, e.g. “DebugFloat2Values” - when you connect let’s say a “ViewSize” input and then right-click on the debug node and select “Start Previewing Node”, the values are shown in the preview window (don’t forget to set the preview mesh to pane or cube if you don’t see the values).

I don’t know how to make that work in the game window though.

6 Likes

In order to make it work, “Add” the output of the debug node to whatever is connected to the Base Color of your Material, “Max” the output of the debug node to whatever is connected to the Opacity of your Material.
Then “Make” a Float4 and connect it to the “DebugTextLocation…” input of the debug node. Use 4 float Constant to position the Text on screen.
The debug text will then be shown “In Game”.

1 Like

If you can’t see Cube in Preview Mesh, look for “View Options” in dropdown and show editor content.

Cool. But how do you see the value of something that changes all the time (result of gathering UV coordinates, for example). The number is all mixed up with all the posibilities.

1 Like

OMG. Thank you very much. I have been searching for this for a very long time.