【maya】Contour lineで入り抜き表現

Contourでのラインで入り抜き表現をVertexColorを使って行うやり方です。
How to specify line thickness in Contour using VertexColor.

contour_width

①contour_shader_widthfromcolorを作る。
contour_shader_widthfromcolor.outValue→SG.miContourShaderにつなげる。
MinWidth、MaxWidthを設定する。
MinWidthは0だと消えきれない場合があるため、-0.01にする。

Create a contour_shader_widthfromcolor shader.
Connect contour_shader_widthfromcolor.outValue to SG.miContourShader.
Set MinWidth, MaxWidth.
Sometimes the line won’t disappear when the MinWidth is set to 0, so set it to something like -0.01.

②メッシュの頂点をペイントする
Color→PaintVertexColorToolなどでVertexに色を塗る。
黒でラインが出る。白で出ない。

Color Vertex color using Color→PaintVertexColorTool.
Black is the max thickness and white is the min thickness.

③mentalrayVertexColorsノードを作る。
mentalrayVertexColors→cpvSets→AddNewItemで新しく項目をメッシュ数分作る。

Create a mentalrayVertexColors node.
Click mentalrayVertexColors→cpvSets→AddNewItem for number of meshes.

④メッシュshape.colorSet.colorName→mentalrayVertexColors.cpvSetsにつなげる。

Connect meshShape.colorSet.colorName→mentalrayVertexColors.cpvSets.

⑤mentalrayVertexColors.outColor→マテリアル.outColorにつなげる。

Connect mentalrayVertexColors.outColor→material.outColor.

contour_width_graph

ビュー上にVertexColorが表示されてしまうため、Color→ToggleDisplayColorsAttributeで表示のオン・オフができる。
レンダーレイヤー上の色はどうも黒くなってしまうのでマスターレイヤーで確認してます。

VertexColor can be toggled on/off using Color→ToggleDisplayColorsAttribute.
For some reason on the renderlayers the objects turn black, so I check the vertexColor on the masterlayer.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA