Visualizing MaterialX VOP's

   2338   10   1
User Avatar
Member
16 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
8042 posts
Joined: 9月 2011
Offline
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
スタッフ
4200 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
スタッフ
1455 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
8042 posts
Joined: 9月 2011
Offline
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
8042 posts
Joined: 9月 2011
Offline
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
User Avatar
Member
440 posts
Joined: 2月 2017
Online
im still confused about this, it seems to work differently than the unlit shader. would be great if this worked consistently. anyone know whats going on here?



is there documentation on this feature? having a hard time finding it, seems like this should be easier to understand...
Edited by ChristopherRutledge - 2024年7月22日 15:26:15
http://www.christophers.website
User Avatar
Member
440 posts
Joined: 2月 2017
Online
was talking to paul esteves and he realized that it works only if its connected through the surface shader but not otherwise... so maybe this would be a nice thing to change? its kind of awkward to test stuff that isnt plugged in. can do an rfe.
http://www.christophers.website
User Avatar
Member
3 posts
Joined: 7月 2022
Offline
Yes, after reading all this I realize that I'm right to use Unlit Shader for now.
Maybe in the near future I can write a script to save time.
User Avatar
Member
186 posts
Joined: 2月 2017
Offline
ChristopherRutledge
was talking to paul esteves and he realized that it works only if its connected through the surface shader but not otherwise... so maybe this would be a nice thing to change? its kind of awkward to test stuff that isnt plugged in. can do an rfe.
Bump this feature!
  • Quick Links