はじめに
Mayaで地味なモデリング作業をできるだけ避けつつ、アウトラインで作る形状を丸みを帯びた立体にする手順です。(モデリングできる人には、用無し記事です)
環境
Maya 2024
Mac
手順
穴の空いたオブジェクトを作って、1,3キーのsubdivision表示にするとこうなってしまう。
mel
polyCube -n mCube1 -w 10 -h 10 -d 10;
polyCylinder -n mCylinder1 -r 3 -h 20;
polyBooleanCmd -op 2 -n result1 mCube1 mCylinder1;
setAttr "mCube1.visibility" 0;
setAttr "mCylinder1.visibility" 0;
polyBevel3 -o 0.4 result1;
それを回避するためにリトポする。
mel
polyCube -n mCube1 -w 10 -h 10 -d 10;
polyCylinder -n mCylinder1 -r 3 -h 20;
polyBooleanCmd -op 2 -n result1 mCube1 mCylinder1;
setAttr "mCube1.visibility" 0;
setAttr "mCylinder1.visibility" 0;
doPerformPolyRetopo 1 {"0", "1", "3", "0", "0", "0", "0.5", "0.5017", "0.75", "200", "10", "0", "", "1", "49.5", "1", "0", "0.0001", "0.017" };
polyRetopo -caching 1 -constructionHistory 1 -symmetry 0 -axisPosition 3 -axisOffset 0 -axis 1 -replaceOriginal 1 -preprocessMesh 0 -preserveHardEdges 0 -topologyRegularity 0.5 -faceUniformity 0.5017 -anisotropy 0.75 -targetFaceCount 200 -targetFaceCountTolerance 10 -edgesByAngle 1 -angle "49.5";
穴が複数バージョン
addMeshがバグってて、手動で修正する必要があった。
mel
polyCube -n mCube1 -w 10 -h 1 -d 10;
polyCylinder -n mCylinder1 -r 2 -h 2;
move -r -2.5 0 -2.5;
polyCylinder -n mCylinder2 -r 2 -h 2;
move -r 2.5 0 0;
polyCylinder -n mCylinder3 -r 2 -h 2;
move -r -2.5 0 2.5;
polyBooleanCmd -op 2 mCube1 mCylinder1;
polyBooleanCmd -edit -addMesh mCylinder2 -op 2 polyBoolean1;
polyBooleanCmd -edit -addMesh mCylinder3 -op 2 polyBoolean1;
setAttr "mCube1.visibility" 0;
setAttr "mCylinder1.visibility" 0;
setAttr "mCylinder2.visibility" 0;
setAttr "mCylinder3.visibility" 0;
doPerformPolyRetopo 1 {"0", "1", "3", "0", "0", "0", "0.5", "0.5017", "0.75", "500", "10", "0", "", "1", "49.5", "1", "0", "0.0001", "0.017" };
polyRetopo -caching 1 -constructionHistory 1 -symmetry 0 -axisPosition 3 -axisOffset 0 -axis 1 -replaceOriginal 1 -preprocessMesh 0 -preserveHardEdges 0 -topologyRegularity 0.5 -faceUniformity 0.5017 -anisotropy 0.75 -targetFaceCount 200 -targetFaceCountTolerance 10 -edgesByAngle 1 -angle "49.5";
ひらがな「あ」
文字は手動で入力
プレッツェルみたい
目標ポリゴン数とかは、適宜変更する必要がある。
mel
typeCreateText;
setAttr "typeExtrude1.extrudeDivisions" 1;
doPerformPolyRetopo 1 {"0", "1", "3", "0", "0", "0", "0.5", "0.5017", "0.75", "300", "10", "0", "", "1", "49.5", "1", "0", "0.0001", "0.017" };
polyRetopo -caching 1 -constructionHistory 1 -symmetry 0 -axisPosition 3 -axisOffset 0 -axis 1 -replaceOriginal 1 -preprocessMesh 0 -preserveHardEdges 0 -topologyRegularity 0.5 -faceUniformity 0.5017 -anisotropy 0.75 -targetFaceCount 200 -targetFaceCountTolerance 10 -edgesByAngle 1 -angle "49.5";
SVGインポートからのプレッツェルやらねば。
ベベルがうまくいかないときにも使えると思う。