Visualizing MaterialX VOP's

   907   6   1
User Avatar
Member
11 posts
Joined: 2月 2019
Offline
Has anyone had consistent luck with using the Visualize (X) feature when building MaterialX shader networks? Some nodes it visualizes, some it does not, sometimes it works on CPU and not XPU etc. Not being able to debug and view components of shaders consistently makes building shaders very tedious. For instance plug a unified noise into a ramp constant and plug it into the shader, I can't get this to visualize on XPU.
User Avatar
Member
7534 posts
Joined: 9月 2011
Online
I was unaware of that feature. My workflow is to use the Surface Unlit shader to preview different wires. I swap the surface shader output wire from the normal shader to the unlit one and connect the pattern to test to the emit color of the unlit shader.
Edited by jsmack - 2023年11月16日 12:48:47
User Avatar
スタッフ
4137 posts
Joined: 9月 2007
Offline
Pretty sure this is a bug with XPU, it works in CPU though. But there are cases where the visualize vop doesn't work. Please log these with hip files, to help nail down the troublesome combinations/nodes. Thanks!
I'm o.d.d.
User Avatar
スタッフ
1439 posts
Joined: 7月 2005
Offline
jsmack
My workflow is to use the Surface Unlit shader
That's essentially what the shader translator authors when it sees the Visualize VOP. It's just does it in the Viewport Override layer, so there are less chances of the debugging making its way to the final rendering by mistake.

(In H20 it actually uses EDF+Surface shader, but in the next version it's simplified to use the Unlit surface shader).
User Avatar
Member
10 posts
Joined: 3月 2020
Offline
Hey guys, it does look like a bug with XPU. I attached a quick sample scene. If you render with XPU and visualize the unified noise (inside materiallibrary1) you will notice it is broken / the frequency is not properly visualized. Switching to CPU seems to fix it. I'll submit a bug report too.

Best,

Attachments:
broken_visualize.hip (704.0 KB)

User Avatar
Member
7534 posts
Joined: 9月 2011
Online
tomteller
Hey guys, it does look like a bug with XPU. I attached a quick sample scene. If you render with XPU and visualize the unified noise (inside materiallibrary1) you will notice it is broken / the frequency is not properly visualized. Switching to CPU seems to fix it. I'll submit a bug report too.

Best,

The error says the shader contains a node not handled by XPU, which makes sense since rafal said it uses EDF+Surface shader which XPU doesn't support. So I would take it that this feature is not implemented in XPU.

KarmaXPU: ShaderGraph _sg_s_85510A9F14EF37B1 has rootnode-type not handled by XPU, skipped

The visualize node also doesn't work with graphs that aren't part of the main shader graph, for example if you want to visualize three different values by packing them into a color3, the last node combine3 is not part of the material so the visualize node won't do anything.
Edited by jsmack - 2023年11月21日 15:06:44
User Avatar
Member
7534 posts
Joined: 9月 2011
Online
20.0.533
Using MaterialX Unlit Surface for visualzing shaders ('x' hotkey in shader network editor). This fixes XPU visualization.

yesterday

check out the latest build, I think it might be fixed
  • Quick Links