Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Vstructs or Virtual Structs are a way to connect a set of parameters from one bxdf/pattern plugin or OSL shader to another set, while representing this connection as one virtual struct. Simply put, the artist connects a vstruct in a shader network and behind the scenes, many connections of existing parameters are made. For example:

Image RemovedImage Added

PxrSurface as an example

...

To take this idea a bit further we can also make connections only if a criteria is met. Let's say for example there is a parameter called "enableDiffuse" on our Layer pattern in the above example:Image Removed

Image Added

Vstructs Conditionals

We only want to make the diffuseColor connection if enable diffuse is turned on of course. So using a second piece of metadata "vstructConditionalExpr", we can define when to make that connection.

...