No More Retake

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

メニュー

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

Contour最後です。今回は作例を二つほど。
まずはContour使ったMayaのシェーダー作例。

 作例1

『mentalrayVertexColors』ノードと『contour_shader_widthfromcolor』を組み合わせて、”不要なContourラインを塗って消せる”、そんなシェーディングネットワークを組んでみようと思います。

レシピは、
・『mentalrayVertexColors』(頂点カラー取得用)
・『surfaceShader』(アサイン用マテリアル)
・『contour_shader_widthfromcolor』(マテリアルの色でラインの太さが変わる)

流れはこう!

ラインのいらないポリゴンの頂点カラーを白く塗る

頂点カラーをマテリアルに反映させる
『mentalrayVertexColors』ノード

マテリアルカラーで白い部分のラインの太さを0にする
『contour_shader_widthfromcolor』

シェーディングネットワークはこんな感じ。
Contour_30
『contour_shader_widthfromcolor』のアトリビュート:MinWidht=0(太さ0のライン=ラインなし)に設定しておきます。
Max Widhtは1とでもしておきます。
これで頂点カラーで黒く塗った部分は太さ1のライン、白く塗った部分は太さ0のラインが作られる用になります。
(頂点カラーについての解説、『mentalrayVertexColors』の使い方は割愛します)
ラインの不要な部分のポリゴンを頂点カラーで白く塗っていくと、ラインを消せるという寸法です。
Contour_31
以前これを拡張して、実験的にContour消しゴムツールを作ったことがあるのですが、結果はいまいちでした。
3D側で再レンダリングするくらいなら、AfterEffectsで修正しちゃえというのが大半で、そもそも使う機会がなかったのですw

 

 作例2

ええと、次はコンポジットの作例。
Contourの作例というよりContour素材使った素材合成のToon作例かな。
たぶん標準的?なヤツ。

この作例では少なくとも次の素材が必要です。左から、Diffuse、カラー、Line。
Contour_32

まず、カラー素材を加工して影色カラー素材を作ります。

次にDiffuse素材を加工してマスクを作成します。
ここではDiffuse素材に対して、AEの”CC Threshold”をかけて、マスク素材を作っています。

このマスクを使って、Color素材とShadowColor素材を合成すると、こうなる。
マスクを使って後処理で影の部分を決めると、変更や修正が楽ですよねw

Line素材をのっける。

さらにAOやフレネル、Zバッファなどなど、必要に合わせて素材を追加、加工した結果・・・
こうなった!

以上!
作例でした。
使用バージョンはMayaは2012の英語版です。
より新しいバージョンでは設定が変更になっている可能性もありますのであしからず。

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

Related Posts Plugin for WordPress, Blogger...

関連記事

  1. 2013.09.16

    toxik:[Macro]
  2. 2014.02.06

    休業

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

このサイトについて

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%2F22%2Fmaya_contour_part04%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%2F22%2Fmaya_contour_part04%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