VEX vs MaterialX

   1861   4   0
User Avatar
Member
434 posts
Joined: Aug. 2019
Offline
According to the official doc [www.sidefx.com]:

Because it must run in the more limited environment on the GPU, XPU drops support for even more legacy features than Karma CPU. Karma XPU will never support VEX-based shaders at all. Currently it supports the built-in USD materials (such as the USD Preview Surface), and MaterialX, which is probably the future of shading in Karma.

Does it mean I should skip VEX material and just learn MaterialX? But I'm worried that it's not flexible as VEX. For example, this demo:

https://www.sidefx.com/tutorials/procedural-texturing-and-baking/ [www.sidefx.com]

does cool procedural texturing with VOP/VEX. Can I do these with MaterialX?
Edited by raincole - Nov. 16, 2021 11:42:21
User Avatar
Member
238 posts
Joined: Nov. 2013
Offline
You have access to geometry attributes with MaterialX, and everything else could be translated to MaterialX. There are the usual Math and Noise nodes. If you need some pointcloud lookups you could those in sops and pass an attribute.
http://www.sekowfx.com [www.sekowfx.com]
User Avatar
Member
434 posts
Joined: Aug. 2019
Offline
sekow
You have access to geometry attributes with MaterialX, and everything else could be translated to MaterialX. There are the usual Math and Noise nodes. If you need some pointcloud lookups you could those in sops and pass an attribute.

Thank for your answer. Does Karma XPU only supports VOPs that start with "MtlX"? For example do I need to replace "Add" with "MtlX Add"? How about more advanced VOPs like "Physical Lens"?

(I'm really new to Houdini so bear with me if my question doesn't make sense)
User Avatar
Member
7741 posts
Joined: Sept. 2011
Offline
raincole
Thank for your answer. Does Karma XPU only supports VOPs that start with "MtlX"? For example do I need to replace "Add" with "MtlX Add"? How about more advanced VOPs like "Physical Lens"?

XPU supports mtlx materials as well the usd preview surface. For mtlx materials, the mtlx majority nodes are supported as long as they are connected to either the standard surface or usd preview surface. Building a shader from individual bsdf nodes is not. No other vops besides Null, Parameter, or Constant are compatible with mtlx materials. It may help to create a Karma MaterialX Subnet that restricts the allowed nodes to just what is mtlx compatible.

Nodes such as physical lens are VEX based, and don't work with XPU.

Edit:
for XPU, the 'mtlxsurface' node that is created by default in a karma materialx subnet must be replaced with a standard surface, usd preview surface, karma hair, or pyro preview surface.
Edited by jsmack - Nov. 16, 2021 12:15:57
User Avatar
Member
8532 posts
Joined: July 2007
Online
MaterialX is in no shape to replace VEX any time soon, to begin with it's not a shading language so you still need the renderer to use some shading language that can conform to MaterialX definition

so Karma XPU will first have to have a solid flexible and expressive shading language equivalent to VEX but hopefully much faster, modern and feature rich that works for XPU

then hopefully SESI will have it exposed as shading nodes of that language + code snippets if needed

such language would easily be able to keep up with limited MaterialX definition and it's future expansions for workflows that require compatibility among renderers

but also it would be able to free artists to actually do serious shading work like VEX allows if the MaterialX compatibility is not required
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links