【maya】Contour line

Contour(コンター)でトゥーンなどのラインを出すためのメモ。
全部理解してはいないのですが、良く使う項目です。
Settings I do to render line for Toon style with mentalray contour shaders.

①RenderSettingの設定
※maya2014以降
Quality→Sampling→Sampling Modeを”Legacy Sampling Mode”にしないとラインがでません。
※for maya2014 you need to set Quality→Sampling→Sampling Mode to “Legacy Sampling Mode” to render contour lines.

Features→Contours→
Enable Contour Renderingをオンでラインが描画されます。
HideSourceでオブジェクトがハイドされてラインだけレンダリングできます。
(ここらへんはレンダーレイヤーでオーバーライドする。Use render layers to override.)

Features→Contours→CustomShaders
ContrastShaderにContour Contrastシェーダー
StoreShaderにContour Storeシェーダーを割り当てます。

contour001

Contour Storeシェーダーは輪郭格納シェーダで、イメージのサンプル位置情報を格納する。
特にパラメーターはなし。
Contour Store Shader decide what kind of information to store at an image sample location
Contour Contrastシェーダーはラインをどこに描画するか決めるシェーダー。
Contour Contrast Shader decides where the line would be drawn.

②Contour Contrastノードの設定
Zdelta:深度(Z値)によってラインが描画される。Line drawn by the depth(z) info.
Ndelta:ノーマルベクターの角度によってラインが描画される。Line drawn by the normal vector angle.
DiffMat:違うマテリアルによってラインが描画される。Line drawn by different material.
Contrast:カラーのコントラストによってラインが描画される。Line drawn by color contrast.
contour002

③Contour Shaderノードの設定
ラインの色や太さを決めるノードです。Node to set line’s color and thickness.
ColorやWidthを設定してContourShader.outValueをSG.miContourShaderにつなげます。
Set color and width value then connect ContourShader.outValue to SG.miContourShader.

コメントを残す

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

CAPTCHA