Houdini 中文帮助文档

使用VOP工作

【Working with VOPs–使用VOP工作 – 材质模块 – Houdini帮助文档中文版】

 

A VOP network defines a shader. There is a vast array of VOP nodes available for building the network. Nodes are available for material shading specific tasks like calculating light scattering, as well as lower-level general data manipulation, math, and logic.

—–一个VOP网络定义着一个材质。有大量的VOP节点可以用于创建网络。节点可以用于材质着色,如计算光线的散射,以及低级别的数据操作,数学,逻辑关系等。

Tip

To learn how to create nodes, wire them together, edit node parameters, and work with the network editor, see the help fornetworks and parameters.

—–要学习如何创建节点,将它们连接起来,编辑节点的参数,以及使用节点网络编辑器,查看节点网络和参数的帮助。

 

Create a VOP shader network—创建一个VOP材质的Network(容器对象)

To… Do this
Edit a gallery material’s VOP network

-编辑一个库材质的VOP网络

In the material palette pane, double-click one of the instantiated materials in the right sub-pane. Houdini will switch to a network editor tab and dive into the material’s VOP network.

—在材质面板,双击右侧子面板中的一个是实例化的材质。Houdini会切换到一个网络编辑器,并进入材质的VOP网络。

Start a new material network

–用一个新的材质网络来制作材质

In a SHOP network, such as the pre-made /shop or inside a SHOP Network node you create, create a Material Shader Builder node and double-click it to go inside.

—在一个SHOP network中,如预建好的/Shop,或你创建好的一个SHOP Network节点内部,创建一个Material Shader Builder 节点,双击它进入内部。

 

Building a material VOP network–构建材质的VOP网络

VOP inputs and outputs have types. Most connections have simple types, such as float, vector, or string. Nodes that support PBR have yellow BRDF connections.

——VOP的输入和输出都有一些数据类型。很多链接都有一些简单的数据类型,如浮点,矢量,字符串。支持PBR的节点有黄色的BRDF链接。

You can connect inputs and outputs of different types, and Houdini will attempt to automatically convert between the types if possible. See autoconversion below. –

—–你可以连接不同类型的输入和输出,Houdini会尝试在不同数据类型间自动转换。查看下面的autoconversion

A material network contains an “output” node for each shading context (for example, surface_output, displacement_output,light_output, fog_output). Whatever goes into these nodes defines the output of the shader.

—-一个材质网络包含一个用于每个着色环境的输出节点(例如surface_output,displacement_output,light_output, fog_output)。不管连接到了那个节点,其都是定义着材质的输出。

For example, you can connect a Parameter VOP directly to theSurface color of the surface_output node to create a constant color shader.

—-例如,你可以直接将 Parameter VOP连接到surface_output 节点的 Surface color 上,创建一个恒定颜色的材质。

The output nodes feed into a final “collect” node. You can create multiple output nodes and Switch between them prior to the collect node if necessary.

—-节点的输出会反馈到最终的Collect节点上。你可以创建多个输出节点,并且优先于Collect节点在它们间切换。

If you’re starting a new material or surface shader from scratch, a good starting place is to create a Surface model VOP and connect itsSurface Color output to the surface_output node’s Surface colorinput. The Surface Model VOP provides most of the machinery you need for surface shading. From there, you can add VOPs to elaborate on the surface model’s basic functionality.

—–如果你以一个新的材质或曲面着色器为开端,一个好的开始就是创建一个Surface model VOP,并连接它的 Surface Color 输出端到 surface_output 节点的Surface color 输入端。 Surface Model VOP提供了一个用于曲面着色的更机械的效果。从此处,你可以添加VOPs来阐述曲面模型的基本功能。

 

Designing the shader’s user interface

To… Do this
Promote a VOP parameter up to the shader’s user interface

提取一个VOP参数到材质的用户界面上

Click the  gear menu next to the parameter in the parameter editor and choose Promote parameter.

—-点击参数编辑器中参数旁边的gear菜单,选择Promote parameter。

Houdini will create a collapsed parameter VOP (see below) on the corresponding input, and the gear menu icon will change to a  knob icon to indicate the parameter is promoted.

—-Houdini会在相应的输入端创建一个塌陷的parameter VOP 节点,gear菜单也会改变为该图标,暗示彩色被提取了。

默认创建后参数不会出现在材质的参数界面中,你可以按U键进入上一级,这样参数就会出现在参数编辑器面板中了。

Edit and organize a material’s user interface

编辑和组织一个材质的用户界面

Promoted parameters appear on the parent material in the order you added them.

—被提取的参数会出现在父材质上,以便于你添加它们。

To rename the promoted parameters, organize them into tabs, or otherwise edit them, right click the Material node and choose Edit parameter interface.

–要重命名这些参数,组织它们到选项卡中,或编辑它们,可以右击材质节点,选择编辑参数界面。

See the help for the edit parameter interface windowfor information on editing the parameters.

–查看用于编辑参数界面窗口的帮助获取关于编辑参数的信息。

You can also use this interface to add “spare parameters” to the material’s interface that can be channel referenced by VOPs inside or used by scripts.

—你可以使用该界面添加“备用的参数”到材质的界面上,其可能是一个被内部VOP所引用,或被脚本所使用的通道。

 

Note

The Material SHOP node has two parameters (the Compiler text field and the Force compile pushbutton) related to converting the contained VOP network into executable VEX code for mantra. You can’t edit these parameters, but you can hide them from users by selecting them in the edit parameter window and turning on the Invisible checkbox.

—– Material SHOP node 节点有和将其包含的VOP network转为可用于Mantra执行的VEX代码相关的两个的参数( Compiler 和 Force compile 按钮)。你不可以编辑这些参数,但是你可以对用户隐藏它们(在参数编辑中选择它们,并开启 Invisible 选项)。

 

Organizing a VOP network—组织管理一个VOP Network

Tip

When Houdini creates parameter VOPs for promoted parameters it automatically collapses them so only a small peg appears next to the VOP’s input. You can edit the Parameter VOP without having to expand the collapsed node by clicking the peg. Selecting the peg is the same as selecting the collapsed Parameter VOP.

——当Houdini创建用于所提取的参数的 parameter VOPs 节点时,它会自动塌陷它们,使其非常小,且处于VOP输入端的旁边。你可以编辑 parameter VOP,无需点击peg展开塌陷的节点。选择peg等同于选择塌陷的Parameter VOP。

To… Do this
Collapse or expand VOP node inputs

塌陷或展开一个VOP节点的输入端

To expand a collapsed input node(s), double-click the peg next to the VOP’s input, or  middle click the input and choose Expose input nodes.

—要展开一个塌陷的输入节点,双击VOP输入端旁边的peg,或中键点击输入端,选择“显示输入端节点”。

To collapse the node or nodes connected to an input, middle click the input and choose Hide input nodes.

—-要塌陷一个节点或连接到一个输入端的节点,中键点击输入端,选择“隐藏输入端节点”。

Show or hide VOP inputs

显示或隐藏VOP的输入端

 节点有时会有大量的输入端,有几种方式可以隐藏未使用的输入端。

在每个VOP节点顶部右角上的节点状态按钮,可以让你在三种显示模式间切换: 显示所有输入端, 隐藏所有输入端,  只显示连接的输入端。

也可以点击参数旁边的  这个图标菜单,或中键点击输入端,选择  Collapse input connector 或 Show input connector。

Connect to hidden VOP inputs and outputs

连接到一个隐藏的VOP输入端,输出端

If an input or output is hidden, either because the input is marked as hidden or because you’ve used the node state button to change the node’s display mode, you can still connect a wire to the input.

—-如果一个输入或输出端是隐藏的,要么是输入端被标记为隐藏,或你使用了节点状态按钮改变了节点的显示模式,你仍然可以连接一个线到该输入端。

Click the more input at the bottom of the input list, then choosing the input you want to connect to from the pop-up menu. You can either start wiring by clicking more first, or click the input/output of another node first and then clickmore.

—-点击输入列表底部的More输入端,从弹出菜单中选择你想要连接的输入端。你可以通过先点击More来连接,或先点击另外节点的输入/输出端,然后再点击More。

 

Shader Effects

To… Do this
Connect a texture to a VOP parameter

连接一个纹理到一个VOP参数上

Click the  menu button next to the parameter and choose Texture map. Houdini will create the nodes necessary to load and process a texture and connect them to the parameter’s input for you.

—-点击参数旁边的的该菜单按钮,选择 Texture map。Houdini会创建一个必要的节点来加载和处理纹理,并将它们连接到参数的输入端。

Choose Checker to set the parameter to a simple checkerboard texture.

—点击 Checker 来设置参数为一个简单的棋盘格纹理。

Add shader effects to a parameter

添加一个材质效果到一个参数上

Click the  menu button next to the parameter and choose one of the options in the menu.

—点击参数旁边的的该菜单按钮,并从菜单中选择一项。

Constant参数—会添加一个Constant VOP。

Texture map —会添加UV,以及用于加载,处理纹理文件的节点。

Surface color —–会添加UV,以及一个Surface Color VOP。

Ramp———会添加UV,和一个 Ramp。

Anti-aliased noise, Cell noise, 和 Perlin noise –会添加UV以及Anti-aliased noise, Cellular noise 或Turbulent noise节点。

Checker—会添加一个棋盘格纹理。

Color mix with and Multiply with insert nodes to mix or multiply the current input color with one of the options above.

—-Color mix with 和Multiply with 会嵌入用于将当前输入颜色和上面的一个选项进行混合,相乘的节点。

Jump to the node feeding into a VOP parameter

跳到反馈到一个VOP参数的节点上

Click the  menu button next to the parameter and choose Jump to input node.

—点击参数旁边的的该菜单按钮,选择 Jump to input node(跳到输入的节点)。

 

Debug and bypass modes

VOP nodes have two special states that let you temporarily alter their behavior while you are building, editing, or debugging the network. You can turn these modes on or off using the first and second buttons from the left in the top-right corner of the VOP node. Alternatively, you can move the mouse pointer over a node and press Ctrl + D (debug mode) or ⇧ Shift + B (bypass).

——-VOP节点有两个特别的状态,可以让你在创建、边界,调试节点网络时,暂时的改变它们的行为。你可以使用第一个和第二个按钮(VOP节点顶部右角处)来开启或关闭这些模式。另外,你也可以通过移动鼠标到一个节点上,按Ctrl+D(调试模式)、Shift+B(Bypass 模式)。

Debug mode Switches the node to debug mode.

—切换节点到调试模式。

You can set each output to have one of three behaviors when the node is in debug mode by Alt +  clicking an output.

—-当节点处于调试模式时,你可以通过Alt+右击一个输出端,设置每个输出端有三个行为中的一个。即:Execute (正常执行)、Pipethrough(传输数据,不做任何处理)、Constant(输出一个恒定值)。

In debug mode, the node is overdrawn with blue-green stripes.

—-在调试模式中,节点会以绿色条纹方式绘制。

Bypass mode 就是关闭节点的作用效果,让数据自由通过该节点(此时该节点就相当于一个null节点,没有任何处理数据的功能)。

 

To… Do this
Set up the behavior of an individual VOP output in bypass or debug mode

—将单独的VOP输出端行为设为bypass,或调试模式

Alt +  on the output and choose an option from the menu.

—按住Alt+右击输出端,从菜单中选择一个选项。

 

Automatic type conversion

VOP inputs and outputs are typed. If you connect VOP inputs and outputs of different data types, Houdini will automatically convert the datatype if possible. For example, if you connect a float output to a vector3 input, Houdini will convert the float to a vector of three identical values. Houdini draws these kinds of wires as dashed lines in the network editor.

—-VOP输入和输出是有类型的。如果你连接VOP不同数据类型的输入,输出端,Houdini会自动转换数据类型(如果可能的话)。例如,如果你连接一个浮点输出端到一个矢量输入端,Houdini会将浮点值转为一个三个值完全相同的矢量。Houdini会在节点网络编辑器中以虚线方式绘制这种类型的线。

Instead of automatically converting datatypes, you can add VOP nodes designed to explicitly convert datatypes, such as the Vector to float VOP. This can sometimes be useful. For example an implicit conversion from a vector3 to a float always uses the first component of the vector. By explicitly using a Vector to float VOP node, you can choose which component to use.

—-而非自动转换数据类型,你可以添加一个用于明确指定转换数据类型的VOP节点,如Vector to float VOP。有时候此会非常有用。例如,从矢量到浮点的一个隐式转换会使用矢量的第一个元素。通过明确使用一个Vector to float VOP节点,你可以选择使用哪一个元素。

Houdini lets you easily create the explicit conversion VOP node from an implicit (dashed) converted wire.

—Houdini可以让你很容易的创建明确转换的VOP节点(从一个隐式转换线中)。

To… Do this
Create an explicit conversion node from an automatically converted (dashed) network wire

—从一个自动转换的节点网络线上,创建一个明确的转换节点

 middle click the input at the end of the connection and choose Create X-to-Y node (where X and Y are the start and end datatype involved in the conversion).

—-中键点击连接端点的输入端,选择Create X-to-Y node (X和Y是转换中起始和结束端的数据类型)。

 

Loading Z-brush normal maps—加载ZB的法线贴图

Here are the nodes you need to convert the default normal map saved by Z-brush into the format Houdini expects.

—这里有些你需要的用于转换默认法线贴图(ZB保存的)到Houdini格式的节点。

Subtract 0.5.

Normalize

Multiply VOP by vector (1,-1,1), to flip the vector direction along the Y axis.

Transform to camera space (set interp to Normal).

Invert with the negate option.

Fit range from -1:1 to 0:1.

 

点击分享到: