No More Retake

3DCG屋さん向けTips&Referenceサイト

メニュー

Maya:『Contour系ノード』 その1

今回からContour系です。全3回くらいの予定です。


Contour(コンター)はオブジェクトの輪郭やなんかを線で描くやつです。

設定方法は2種類。
RenderSettings側で設定する簡単な方法と、自分でノードを繋いで設定する手間のかかる方法。

まずはRenderSettings側で設定する簡単な方法から。
ノードと言いつつ、今回はノードじゃないですw
上のような画像がレンダリングされるように設定してみます。
毎度の事ですが、Mayaは2012の英語版です。日本語版ユーザーの方はご容赦を。

step1

RenderSettingsの”Enable Contour Rendering”をON。ラインの出力を有効にします。

step2

何処にラインを描くかを定義します。
ここでは、Around all poly face”をON。

step3

アサインしているマテリアルのShadingEngine(SG)を選択、”Enable Contour Rendering”をON。
他のパラメータでラインの色や太さを設定します。
Contour_03 Contour_04

これで白いLineがレンダリングされるはずです。

※2014/12/01追記
Maya2014から設定がちょっと変わったみたいですね。
上記設定+RenderSettingsのQualityタブにあるSample Modeを”Legacy Sample Mode”に変更する必要があるようです。
ひょっとしてContourに関連したレンダリングをしたい場合はすべて”Legacy Sample Mode”にしなきゃいけないのかな?
参考:Mentalrayのcontourシェーダがレンダリングに反映されない

RenderSettingでの設定項目を確認していきます。

 

 Contours

Enable Contour Rendering

コンターレンダリングの有効/無効

Hide Source

ライン生成もとのオブジェクトを非表示

Flood Color

塗りつぶしカラー

Over-Sample

値が高いほど線がなめらかに。

Filter Type

Box /Triangle / Gaussian の三択。

Filter Support

フィルタの強さ

 

 Draw By Property Difference

Around silhouette(coverage)

シルエットラインを描く
Around silhouette(coverage)

Around all poly faces

ポリゴンのエッジにラインを描く
Around all poly faces

Around coplanar faces

複数の法線間にラインを描く(マニュアル曰く)。よく分かりません。
”Around render tesselation”に似た絵ができる。

Between differnt instances

異なるオブジェクトの間にラインを描く。

Between different material

異なるマテリアルの間にラインを描く。

Between different label

異なるラベルのオブジェクト間にラインを描く。
ここで言うラベルとはMentalrayで規定する”miLabel”というアトリビュートのこと・・・だと思います。
『mib_amb_occlusion』の回でもちょこっとやりました。
この”miLabel”は自分でアトリビュートに追加する必要があります。
以下に”miLabel”追加スクリプトのサンプル。
追加したいオブジェクトを選んで実行。Extra Attributesに追加されます。

MEL

addAttr -at short -longName miLabel -defaultValue <数値>;

Python

import maya.cmds as cmds
cmds.addAttr( longName='miLabel', attributeType='short', defaultValue=<数値> )

 

Around render tesselation

テッセレーションにラインを描く。

Front vs. back face contours

表と裏の間にラインを描く。

 

 Draw By Sample Contrast

Enable Color Contrast

閾値を上回るカラー差のピクセル間にラインを描く。

Color Contrast

カラーの閾値

Enable Depth Contrast

閾値を上回るデプス差のピクセル間にラインを描く。

Depth Contrast

デプスの閾値

Enable Distance Contrast

閾値を上回る距離差のピクセル間にラインを描く。

Distance Contrast

距離の閾値

Enable Normal Contrast

閾値を上回る法線差のピクセル間にラインを描く。

Normal Contrast

法線の閾値

Enable UV Contours

UVベースでのラインを描くる

UV Contours

UV 空間の U 番目と V 番目の等値線ごとに輪郭を描画


以上RenderSettingsのContour設定項目についてでした。
次回はCustom ShadersとContourノードを使ってラインを描く方法についてやります。

Mayaは2012の英語版を使用しています。
最新のバージョンとは異なる可能性がありますのであしからず。

その1へ その2へ その3へ その4へ

Related Posts Plugin for WordPress, Blogger...

関連記事

  1. 2012.06.06

    Maya:Brick Map

コメントをお待ちしております

このサイトについて

3DCG Tipsサイト。Houdiniの記事が多めです。

RSS

follow us in feedly

Archives

  • 2024 (1)
  • 2023 (2)
  • 2022 (9)
  • 2021 (14)
  • 2020 (46)
  • 2019 (17)
  • 2018 (33)
  • 2017 (29)
  • 2016 (36)
  • 2015 (64)
  • 2014 (54)
  • 2013 (60)
  • 2012 (55)

スポンサードリンク

言語切り替え

  • English (United States)
  • 日本語

スポンサードリンク

言語切り替え

  • English (United States)
  • 日本語

Houdiniを使えるようになる本


Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(): Failed to enable crypto in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(http://api.facebook.com/restserver.php?method=links.getStats&urls=http%3A%2F%2Fnomoreretake.net%2F2013%2F04%2F08%2Fmaya_contour_part01%2F): failed to open stream: operation failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(): Failed to enable crypto in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(http://api.b.st-hatena.com/entry.count?url=http%3A%2F%2Fnomoreretake.net%2F2013%2F04%2F08%2Fmaya_contour_part01%2F): failed to open stream: operation failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132