1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

maya のpencil4+ でsmoothが掛かるとか掛からないとか

Last updated at Posted at 2023-12-05

pencil4+ for mayaでsmoothかけるとメッシュが痩せるバグがある とかそんな投稿を見かけたので検証した。

pencil4+ for mayaにおけるsmoothPreview対応

これを有効にするには メニューからadd render settings nodeを実行し、
image.png

作成されたノードのアトリビュートにチェックが入っている状態にする
image.png

この状態でmayaSoftwareでレンダリングすると
smoothPreviewが効いている結果がレンダリングされる
image.png

で、こちら裏で何をやられているかというと

  • レンダリング実行前にsmoothPreviewの設定を元にpolySmoothを実行する
  • レンダリング実行
  • レンダリング終了後にpolySmoothを削除する

という作業を行われているんですね。

変換対象

pencilのフォルダを眺めてると、なーんかそれっぽいのがあるので中を覗いてみると

C:\Program Files\PSOFT\Pencil+ 4 for Maya\modules\PSOFT Pencil+ 4 for Maya\scripts\PSOFT\PencilSmoothPreview.py

#スムーズメッシュプレビューをポリゴンに一括変換
というコメントを発見。これを読み解くとsmoothPreviewの変換対象は

  • 可視状態にあるもの
  • smoothPreviewがonになっているもの

可視状態とは?

具体的には

親ノードも含めて

  • visibility が offになっていない
  • template表示になっていない
  • displaylayerなどによってdrawingOverrides のvisibleがoffになっていない
    以上の条件をすべて満たす物が可視状態にある と扱われるようですね。

参考:drawingOverrides のvisible
image.png

蛇足

ペンシルの処理部分を一部切り出して、実際にsmooth処理の対象になるオブジェクトを選択する

from PSOFT import PencilSmoothPreview
shapes = PencilSmoothPreview.getSmoothPreviewShapes(True, False)
cmds.select(shapes,r =True)
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?