<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7948081444576729669</id><updated>2025-12-06T07:22:46.465-08:00</updated><category term="maya"/><category term="soup"/><category term="attributeTransfer"/><category term="point"/><category term="procedural"/><category term="animation"/><category term="dynamic"/><category term="particles"/><category term="rigging"/><category term="blender"/><category term="attribute"/><category term="color"/><category term="particle"/><category term="peter shipkov"/><category term="transfer"/><category term="MEL"/><category term="array"/><category term="deformer"/><category term="hypershade"/><category term="map"/><category term="multiAttributeTransfer"/><category term="peak"/><category term="vertex"/><category term="weight"/><category term="blendshapes"/><category term="copy"/><category term="curve"/><category term="instance"/><category term="instancer"/><category term="instances"/><category term="mesh"/><category term="node"/><category term="pfx"/><category term="pushpin"/><category term="python"/><category term="random"/><category term="randomize"/><category term="scatter"/><category term="script"/><category term="shader"/><category term="tension"/><category term="uninstancer"/><category term="VFX"/><category term="abstract"/><category term="anime"/><category term="arrayDataContainer"/><category term="arrayToPointColor"/><category term="bake"/><category term="cartoony"/><category term="crowd"/><category term="error"/><category term="fStretch"/><category term="face"/><category term="facial"/><category term="fluid"/><category term="group"/><category term="houdini"/><category term="ik"/><category term="layout"/><category term="live"/><category term="mental ray"/><category term="mentalray"/><category term="offset"/><category term="paint effects"/><category term="position"/><category term="projection"/><category term="rayProject"/><category term="rgbpp"/><category term="rig"/><category term="snap"/><category term="squash"/><category term="stretch"/><category term="substance"/><category term="substitute geometry"/><category term="switch"/><category term="teapot"/><category term="tension map"/><category term="tips"/><category term="tool"/><category term="tricks"/><category term="tutorial"/><category term="uv"/><category term="vertex position"/><category term="workflow"/><category term="2D Pan and Zoom tool"/><category term="align"/><category term="ambient occlusion"/><category term="apple"/><category term="apple new logo 2012"/><category term="baby"/><category term="bake instances"/><category term="batch rename"/><category term="bbox"/><category term="blend"/><category term="blendshape"/><category term="bmesh"/><category term="bounding"/><category term="bounding box"/><category term="bounding object"/><category term="brinsmead"/><category term="bug"/><category term="bullet"/><category term="bunny"/><category term="butterfly"/><category term="camera"/><category term="cane"/><category term="cg"/><category term="choice"/><category term="choose"/><category term="circle"/><category term="cloud"/><category term="cocoon"/><category term="colorpervertex"/><category term="comparing"/><category term="component"/><category term="compositing"/><category term="compression"/><category term="condition node"/><category term="conditional"/><category term="connectivity"/><category term="control"/><category term="convert"/><category term="crack"/><category term="cracking"/><category term="crash"/><category term="createNode"/><category term="curveVarGroup"/><category term="cycle"/><category term="deconstructing"/><category term="deconstruction"/><category term="deform"/><category term="deform modifier"/><category term="deformation"/><category term="demo"/><category term="dice"/><category term="diffuse"/><category term="directx"/><category term="displaceD"/><category term="displacement"/><category term="display"/><category term="displayComponent"/><category term="dot"/><category term="duncan"/><category term="dust"/><category term="earthquake"/><category term="effects"/><category term="exodus"/><category term="export"/><category term="exporter"/><category term="expression"/><category term="extrude"/><category term="faceware"/><category term="field"/><category term="file dialog"/><category term="fire"/><category term="fix"/><category term="fk"/><category term="float"/><category term="fracture"/><category term="frame"/><category term="fruit ninja"/><category term="function"/><category term="goal"/><category term="goalPP"/><category term="hair"/><category term="hajime nakamura"/><category term="halftone"/><category term="hexagon"/><category term="hexagonal"/><category term="hidden"/><category term="horror"/><category term="hotkey"/><category term="hypershade compositing"/><category term="ik fk switch"/><category term="import"/><category term="influence"/><category term="introduction"/><category term="issue"/><category term="kusama"/><category term="lego"/><category term="lighting"/><category term="lines"/><category term="list"/><category term="local rotation axis"/><category term="logo"/><category term="maggot"/><category term="make live"/><category term="mapToMesh"/><category term="material"/><category term="memory"/><category term="meshToMap"/><category term="metal gear rising"/><category term="multiple shader"/><category term="muscle"/><category term="nCloth"/><category term="nParticles"/><category term="nodePreset"/><category term="nodes"/><category term="noise"/><category term="normal"/><category term="obj"/><category term="obj exporter"/><category term="ooze"/><category term="paint"/><category term="paint weight"/><category term="particle tool"/><category term="peterpan"/><category term="pfx to array"/><category term="point cloud"/><category term="point color"/><category term="pointCloudToCurve"/><category term="pointCloudToMultiCurve"/><category term="pointcloudtomesh"/><category term="polycut"/><category term="polysplit"/><category term="preset"/><category term="radius"/><category term="rainbow"/><category term="randomized"/><category term="ray"/><category term="rayCast"/><category term="reference"/><category term="rename"/><category term="renamer"/><category term="render"/><category term="render layer"/><category term="render pass"/><category term="render target"/><category term="replace objects"/><category term="resolution"/><category term="retopo"/><category term="retopology"/><category term="rgb"/><category term="rgba"/><category term="rgbaToColorAndAlpha1"/><category term="rig control"/><category term="room"/><category term="rotations"/><category term="save"/><category term="save pose"/><category term="set driven key"/><category term="setup"/><category term="shadow"/><category term="shatter"/><category term="shrink"/><category term="simplebot"/><category term="simulation"/><category term="skin modifier"/><category term="skinned"/><category term="slice"/><category term="slow"/><category term="smoke"/><category term="snake"/><category term="snapping"/><category term="snapshot"/><category term="spectrum"/><category term="spine"/><category term="spiral"/><category term="spline"/><category term="splineIK"/><category term="squeeze"/><category term="stair"/><category term="stairway"/><category term="subcurve"/><category term="substitute"/><category term="surface"/><category term="switching"/><category term="tentacle"/><category term="texture"/><category term="textureToArray"/><category term="texturing"/><category term="thick"/><category term="thicker"/><category term="thin"/><category term="tilda"/><category term="time"/><category term="timeOffset"/><category term="timeOffset."/><category term="toad"/><category term="toon"/><category term="topology"/><category term="total recall"/><category term="trace"/><category term="tracing"/><category term="trails"/><category term="transfer attribute"/><category term="turbulance"/><category term="tweak"/><category term="tweak mode"/><category term="typeface"/><category term="upres"/><category term="util"/><category term="utilities"/><category term="uv space"/><category term="veins"/><category term="vertex color"/><category term="vertexcolor"/><category term="video"/><category term="visibility"/><category term="volumetric"/><category term="voronoi"/><category term="voxel"/><category term="voxelism"/><category term="voxelizer"/><category term="wetmap"/><category term="wireframe"/><category term="workflow test"/><category term="wrap"/><category term="wrinkle"/><category term="yayoi"/><title type='text'>Maya Spiral</title><subtitle type='html'>Collection of 3D ideas, poetries and experiments stirred in Maya 3D. Learn the noodle art of SOuP, Aikido of Maya.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>75</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-7736788985822096674</id><published>2016-02-26T19:12:00.001-08:00</published><updated>2016-02-26T21:49:42.601-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cocoon"/><category scheme="http://www.blogger.com/atom/ns#" term="connectivity"/><category scheme="http://www.blogger.com/atom/ns#" term="lines"/><category scheme="http://www.blogger.com/atom/ns#" term="pfx"/><category scheme="http://www.blogger.com/atom/ns#" term="rayProject"/><category scheme="http://www.blogger.com/atom/ns#" term="soup"/><category scheme="http://www.blogger.com/atom/ns#" term="toon"/><title type='text'>SOUP / Cocoon Node Basic</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX7OiwxVb7xiwR6xPe7lItSmpt8JDtkw7__SYF2x1EcVC0kmXPTj4Bu6_MLSH1vvoce4Zah3VAcBnifytmrjI1G4qKOu2T0K_T1Gce9Hot_6LKlRVcLq5ZfYsuP43DUSKkVqx200YuhHm4/s1600/PrtScr+capture_53.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX7OiwxVb7xiwR6xPe7lItSmpt8JDtkw7__SYF2x1EcVC0kmXPTj4Bu6_MLSH1vvoce4Zah3VAcBnifytmrjI1G4qKOu2T0K_T1Gce9Hot_6LKlRVcLq5ZfYsuP43DUSKkVqx200YuhHm4/s640/PrtScr+capture_53.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Today I am attempting to explore the usage of COCOON node in SOuP.&lt;br /&gt;
&lt;br /&gt;
Check SOuP forum for some cool render of this node:&lt;br /&gt;
&lt;a href=&quot;http://www.soup-dev.com/examples2_9.htm&quot;&gt;http://www.soup-dev.com/examples2_9.htm&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://soup-dev.websitetoolbox.com/post/NEW-release-20121128-6102382&quot;&gt;http://soup-dev.websitetoolbox.com/post/NEW-release-20121128-6102382&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
So basically this Cocoon node is very straight forward, to re-quote from help guide:&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Cocoon draws connection between points, based on proximity.&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
There are some SOuP examples provided in relation to this Cocoon node, although like usual, you might need to reverse engineer the connection because Maya&#39;s node connection is not very clear.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
SIMPLEST COCOON USAGE&lt;/h3&gt;
Now, the simplest is apparently pretty easy. Just by connecting Scatter Points into Cocoon node will give you the result you want.&lt;br /&gt;
&lt;br /&gt;
The step by step is like this:&lt;br /&gt;
&lt;br /&gt;
1) Create Geo for Point Scatter&lt;br /&gt;
I created a polygon Cube, for example, or any geometry we want to SCATTER some points into. Then with the Cube geo selected, assign SOuP Scatter node. The connection should be made for you automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmFLILYa6YM_UUGUv1WstbvyQ2_usFuWuIx2x3NMJCiApYghOoo_UF2H6MkYTgvoRT5CPBjkomigrWZtBJnHOAQ7ZtpBTLJO_P7JHCn7rBiWfnuyHT8DVDVeJqLDl9DlvYU6TNpUVDYP0A/s1600/PrtScr+capture_29.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmFLILYa6YM_UUGUv1WstbvyQ2_usFuWuIx2x3NMJCiApYghOoo_UF2H6MkYTgvoRT5CPBjkomigrWZtBJnHOAQ7ZtpBTLJO_P7JHCn7rBiWfnuyHT8DVDVeJqLDl9DlvYU6TNpUVDYP0A/s1600/PrtScr+capture_29.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
2) Viewing the resulting Point Scatter&lt;br /&gt;
You should see something already in your 3D view, I like to work in Wireframe (4) mode.&lt;br /&gt;
&lt;br /&gt;
If you are seeing nothing, you might need to change your Viewport mode to &lt;b&gt;Legacy Default Viewport.&lt;/b&gt; That is because &lt;b&gt;Viewport 2.0 is really suck and annoyingly slow &lt;/b&gt;and you don&#39;t always get what you want. Remember this when you are working: always turn on Viewport 2.0.(!)&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIdQ7BulKiNRn6hi7IbSfn9hW6WR7G_4jCXlJbMDp96sXdEe-OPHpgZ2-p3DStBYalAmZgQZmtlIVNVXx1Ow9LOCKHfJip_4EA7lKGk4RUG_4JW2bSv8VDEWfSxnblfHEm__zBJhdBK_bf/s1600/PrtScr+capture_30.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIdQ7BulKiNRn6hi7IbSfn9hW6WR7G_4jCXlJbMDp96sXdEe-OPHpgZ2-p3DStBYalAmZgQZmtlIVNVXx1Ow9LOCKHfJip_4EA7lKGk4RUG_4JW2bSv8VDEWfSxnblfHEm__zBJhdBK_bf/s1600/PrtScr+capture_30.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Viewport 2.0 is EVIL.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp4ZgJSJgxRUXOkh9QFd_nDEVp4q92d07tdqsq9txLu3uW-WHWMESejJP1PQqdWm8STgPo2-SES-2yMPP4WVQUERqfySt3jFptmtN9MTJBMl2ITTha8QpeNnxL3BvSt8czoXQw53JPIbMK/s1600/PrtScr+capture_31.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp4ZgJSJgxRUXOkh9QFd_nDEVp4q92d07tdqsq9txLu3uW-WHWMESejJP1PQqdWm8STgPo2-SES-2yMPP4WVQUERqfySt3jFptmtN9MTJBMl2ITTha8QpeNnxL3BvSt8czoXQw53JPIbMK/s1600/PrtScr+capture_31.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Legacy Default Viewport is always more reliable.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
With Scatter, it creates for you total number of 2000 points (approximation) and with 10000 Max Number of Points (LIMIT) by default. Be careful with this number, because you might crash Maya if the number is to big for the next process. I like to keep it low when we are prototyping. 100 points =&amp;gt; for Cocoon Lines can be quite a lot already.&lt;br /&gt;
&lt;br /&gt;
3) Plug into Cocoon&lt;br /&gt;
Next, is super simple step, you just need to connect the Scatter Points into the Cocoon node. Create Cocoon node.&lt;br /&gt;
&lt;br /&gt;
Make use of the Shelf button with &quot;PLUG&quot; icon to connect the two.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;scatterShape.outPositionPP -&amp;gt; cocoonShape.inPositionPP&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh9jyzwFfMbWww1lWufPofMooNEvscXD_b6DETIjbWx7qBtxLnFu4kb_sY-OBw9ASpKInYU0vUV9rl14tJtAr82yRPmsqn0xXm8_pWg1aShm9dgL8JSPcwS0iW5RmwTt46gI1RYYHh2lMF/s1600/PrtScr+capture_33.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgh9jyzwFfMbWww1lWufPofMooNEvscXD_b6DETIjbWx7qBtxLnFu4kb_sY-OBw9ASpKInYU0vUV9rl14tJtAr82yRPmsqn0xXm8_pWg1aShm9dgL8JSPcwS0iW5RmwTt46gI1RYYHh2lMF/s1600/PrtScr+capture_33.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsAqYy9746rZR7iKevnmJgHhJL-gr_DLhr2AaUvWZTVi3hxQgyKo4IZhzOkhYMOmv5Qpb6VYmQLDmWf2HkTgb2eG93RlR1bSOs3vYUIdSkrpuTRdKuSzE3xch8wahsFmtsgE9KhzrCGUao/s1600/PrtScr+capture_32.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;385&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsAqYy9746rZR7iKevnmJgHhJL-gr_DLhr2AaUvWZTVi3hxQgyKo4IZhzOkhYMOmv5Qpb6VYmQLDmWf2HkTgb2eG93RlR1bSOs3vYUIdSkrpuTRdKuSzE3xch8wahsFmtsgE9KhzrCGUao/s400/PrtScr+capture_32.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
What you should be seeing is something like below:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNS7bggYObTlcetSDKwJBqYm6ikWH1GcDt5emPxSZnu9nW8hqpbZ2O6YHRI5m_wOlOTr0uQR7utuUy6Sv28WazNJeE5P556To0U9wg0Gq4e3RY0NiuUEHzLk7ZUaNxQvM0FjCd4AXtrbdd/s1600/PrtScr+capture_34.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNS7bggYObTlcetSDKwJBqYm6ikWH1GcDt5emPxSZnu9nW8hqpbZ2O6YHRI5m_wOlOTr0uQR7utuUy6Sv28WazNJeE5P556To0U9wg0Gq4e3RY0NiuUEHzLk7ZUaNxQvM0FjCd4AXtrbdd/s320/PrtScr+capture_34.png&quot; width=&quot;302&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
But you see clumped of mesh like above, you have too many points, and Cocoon by default will connect every points with every points (super dense) and you will also have 30 segment per line. That is a lot for Maya to calculate.&lt;br /&gt;
&lt;br /&gt;
Sometimes, you get so many lines that Maya seem frozen. It&#39;s taking its time to calculate. Keep watch of the number of points.&lt;br /&gt;
&lt;br /&gt;
Reduce the number of Point Scatter.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsvQ9HXc0GNFrWuGaWlgtJ2Qwsm0PnZIRu_tE4czPvJ88MZ-HWak6bNNHWBy7xxZjJYeE8bBQxxxPeN9RbiijSjUGib7tvCy8HGrR8STCEW6QFUY8JYkZ2UXnD4iLQZD4OwHO2_uoz594N/s1600/PrtScr+capture_35.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsvQ9HXc0GNFrWuGaWlgtJ2Qwsm0PnZIRu_tE4czPvJ88MZ-HWak6bNNHWBy7xxZjJYeE8bBQxxxPeN9RbiijSjUGib7tvCy8HGrR8STCEW6QFUY8JYkZ2UXnD4iLQZD4OwHO2_uoz594N/s320/PrtScr+capture_35.png&quot; width=&quot;297&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
COLOR OF LINE CONNECTION&lt;/h3&gt;
Usually the next step I would do is to make the preview of Points&amp;nbsp;+ Lines look nicer on the 3D Viewport. Some people like me like to use colorful lines. It&#39;s a cosmetic thing, but will help you to see things more clearly.&lt;br /&gt;
&lt;br /&gt;
Changing Maya viewport background color will also help.ALT+B toggle.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRENDENubWMDYm5noP1WQgAB-LVOwDj4xK6QNubJRwEB1iE_7PoRZgA4UZlcZGiEd06mN3O_5AIn_vuix-bBir6RMGiKqbpwA0Ki72EjxxO5xxx29aackl1IqiwDWvo8bRSC9GOgTQRy-e/s1600/PrtScr+capture_38.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRENDENubWMDYm5noP1WQgAB-LVOwDj4xK6QNubJRwEB1iE_7PoRZgA4UZlcZGiEd06mN3O_5AIn_vuix-bBir6RMGiKqbpwA0Ki72EjxxO5xxx29aackl1IqiwDWvo8bRSC9GOgTQRy-e/s1600/PrtScr+capture_38.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvw9yRRXbDONwfFavYdJHcqLNldlIA5ibuEBS9GnivZvHnzIftF4d5JXJRzXTf8NspVKW8M_-vEVOdLayaH0pAK8lR-H6lblkMNYMS_mt1hCNYXLo5CwcReCIIgpscfxOuhlBgIFpCh7QU/s1600/PrtScr+capture_39.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;315&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvw9yRRXbDONwfFavYdJHcqLNldlIA5ibuEBS9GnivZvHnzIftF4d5JXJRzXTf8NspVKW8M_-vEVOdLayaH0pAK8lR-H6lblkMNYMS_mt1hCNYXLo5CwcReCIIgpscfxOuhlBgIFpCh7QU/s320/PrtScr+capture_39.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;MAX LINES PER POINT&lt;/b&gt;&lt;br /&gt;
With Cocoon Lines, like I mentioned above, it connect every point and create lines. You can reduce the number. Instead of the default value of -1 (meaning: connect everything), you give it a number above 1 to reduce the line.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRqw2mZAgHuDnqX6rsRTYwNQ9vyMoUtdMMDnpUMyWtNUnKz5cHpTRxm9Zwt3rIsCJ74i_Vy29jndfHoChyphenhyphenS8JHiX4vwVCvnGBeMufyp5AzJMEzG9qQkv2yFJQzfewF0zM0NWSou2228ONo/s1600/PrtScr+capture_40.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;148&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRqw2mZAgHuDnqX6rsRTYwNQ9vyMoUtdMMDnpUMyWtNUnKz5cHpTRxm9Zwt3rIsCJ74i_Vy29jndfHoChyphenhyphenS8JHiX4vwVCvnGBeMufyp5AzJMEzG9qQkv2yFJQzfewF0zM0NWSou2228ONo/s320/PrtScr+capture_40.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbCAwIeBLOG2ct2bYFmugAmDf1m5DCY4ovzsCb1wObGzp7kNU1mBKIDBXqSOkQYAwgqgaFtHrl7WCbLi9MOjeT8qDrfsoMqZo1GU5EuWyaLxF8g2WXQejqQ94NBKoMhSqF0GZ3rQ5YrbVc/s1600/PrtScr+capture_41.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbCAwIeBLOG2ct2bYFmugAmDf1m5DCY4ovzsCb1wObGzp7kNU1mBKIDBXqSOkQYAwgqgaFtHrl7WCbLi9MOjeT8qDrfsoMqZo1GU5EuWyaLxF8g2WXQejqQ94NBKoMhSqF0GZ3rQ5YrbVc/s320/PrtScr+capture_41.png&quot; width=&quot;310&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
By doing so, you will end up with Line Connection that is more natural.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
MIN MAX DISTANCE&lt;/h3&gt;
Adjust the Min and Max distance by doing so, you give the approximation distance value to further control the Cocoon Lines.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIFuw4IezXavqIrOwjxaOVCVaOkYs6ftwS-UvIWCZ8pP2G7NOTHqxlSg5KfEGZedMXnMRjfCly6FvQtjR_wdmMgzFI8CPKm6BpF04dPUUhhwreJaZ68zZ0-4yWX1totO-OEjglyKgz_Myc/s1600/PrtScr+capture_42.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;269&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIFuw4IezXavqIrOwjxaOVCVaOkYs6ftwS-UvIWCZ8pP2G7NOTHqxlSg5KfEGZedMXnMRjfCly6FvQtjR_wdmMgzFI8CPKm6BpF04dPUUhhwreJaZ68zZ0-4yWX1totO-OEjglyKgz_Myc/s320/PrtScr+capture_42.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The idea is of course to have a natural (yet random) distribution of lines connecting the points. Can be useful for many applications.&lt;br /&gt;
&lt;br /&gt;
I have an example created in Blender 3D, using Sverchok Add-On, to get the similar effect:&lt;br /&gt;
&lt;a href=&quot;http://blendersushi.blogspot.com.au/2014/04/sverchok-parametric-snippets-1.html&quot;&gt;http://blendersushi.blogspot.com.au/2014/04/sverchok-parametric-snippets-1.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
RENDERING COCOON LINES&lt;/h3&gt;
Follow this instruction from Peter Shipkov on how to render the Cocoon Lines:&lt;br /&gt;
&lt;a href=&quot;http://soup-dev.websitetoolbox.com/post/how-to-render-the-cocoon-node-line-6103510&quot;&gt;http://soup-dev.websitetoolbox.com/post/how-to-render-the-cocoon-node-line-6103510&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia0a6piGiLIAdc0qpkBPFtyOvaEE8mwsuThMfOGVaLk5vueHjDhX1EsV4rp31pTdh6Qz80WmcPHlpHFzxjcd_XM0UT1JmGBKd32BHh-AYNuUrJCXaSUJFiWJW010j4o45_wEMimhMuvukw/s1600/PrtScr+capture_43.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;502&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia0a6piGiLIAdc0qpkBPFtyOvaEE8mwsuThMfOGVaLk5vueHjDhX1EsV4rp31pTdh6Qz80WmcPHlpHFzxjcd_XM0UT1JmGBKd32BHh-AYNuUrJCXaSUJFiWJW010j4o45_wEMimhMuvukw/s640/PrtScr+capture_43.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Basically to summarize the clear steps above, you will need a new Mesh node at the end of node network to get the final shape, which is the line geo mesh (polygon).&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyxgPVCDUf4wvEYnu0IA9qu7nC9quhp1RUui7yY5iDTXYCF221GJ9J9E6IG4oB_WvJL4FN_u9hyJhzCvPgj4DXXIzOfj4R-ZxA85-M_w5yhaLU3c1sJc5YA442oNBMEuQPuF6or8w5mBUo/s1600/PrtScr+capture_44.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyxgPVCDUf4wvEYnu0IA9qu7nC9quhp1RUui7yY5iDTXYCF221GJ9J9E6IG4oB_WvJL4FN_u9hyJhzCvPgj4DXXIzOfj4R-ZxA85-M_w5yhaLU3c1sJc5YA442oNBMEuQPuF6or8w5mBUo/s1600/PrtScr+capture_44.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Maya does not normally render &quot;Poly Edge&quot;, in order to render it, you need &lt;b&gt;Maya Toon Line&lt;/b&gt;. It creates Curve on the fly and you can attach Maya Paint Effects (PFX) into it.&lt;br /&gt;
&lt;br /&gt;
Paint Effects in Maya is easily overlooked, but Maya&#39;s way to generate procedural 3D geometries. There is also XGen stuff that I have not got time to check.&lt;br /&gt;
&lt;br /&gt;
Maya Paint Effects sometimes look &quot;cool&quot; using Maya Software Render or Renderman. But when you want to use Mental Ray, for example, you need to convert Paint Effects to Polygon and hoping it would look nice.&lt;br /&gt;
&lt;br /&gt;
So you need to be familiar with Maya Toon, Maya Paint Effects, and workflow to get you nice render using your render choice.&lt;br /&gt;
&lt;br /&gt;
Anyway, for now, you should be getting the idea of using Cocoon node.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFiBnwce9GrqwWfSIK6A90kl4Y3hjRbARfT05LlTdDTHg1Vm5O36twmnHcJxcwUz8IH9LyZqcKgxxm3IMQOhjyBPZchyphenhyphenuGKZI1e7F5pQf5j0pHj6da3pwN61hS_4g89OvtDVE31s8dwPdV/s1600/PrtScr+capture_45.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;365&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFiBnwce9GrqwWfSIK6A90kl4Y3hjRbARfT05LlTdDTHg1Vm5O36twmnHcJxcwUz8IH9LyZqcKgxxm3IMQOhjyBPZchyphenhyphenuGKZI1e7F5pQf5j0pHj6da3pwN61hS_4g89OvtDVE31s8dwPdV/s640/PrtScr+capture_45.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Experiment will all kind of Maya PFX:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Paint Effects - Get Brush.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Assign Paint Effect brush into the PFX Toon.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKz3HMCh5yN5i4SHvX1M5Q0LKHS3iD5zh-xY2RwRZJnVK63_DrOWe3UkSEF_2jJM_3p7b64q7NEYcVc7KeuATKukkVnrt7WHGV0-tI6KXMOfpSOfB9EFMnO1MIZs3dGm7VaaHp1mKRdDFR/s1600/PrtScr+capture_46.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKz3HMCh5yN5i4SHvX1M5Q0LKHS3iD5zh-xY2RwRZJnVK63_DrOWe3UkSEF_2jJM_3p7b64q7NEYcVc7KeuATKukkVnrt7WHGV0-tI6KXMOfpSOfB9EFMnO1MIZs3dGm7VaaHp1mKRdDFR/s1600/PrtScr+capture_46.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
GRAVITY X, GRAVITY Y, GRAVITY Z&lt;/h3&gt;
You can make the Cocoon lines more random and natural by making it squiggly using Gravity XYZ. The Segments should be higher than 3 to get smoother squiggly lines. I found that segments smaller than 3, like 1-2 is producing no PFX Line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglDtxg41vfhIsiKuIliNzRcHaxKEzRLkTGen7GVhFvBhGm6DTMdPMbLNArn4jHe3677jqdYl2inZy0lVVvSkq0JdlRsLpVnlDbRHgfq4LXfsPZo29t5H1D_UzVIuUaFLdKvkO-Yp7wnGlt/s1600/PrtScr+capture_48.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;112&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglDtxg41vfhIsiKuIliNzRcHaxKEzRLkTGen7GVhFvBhGm6DTMdPMbLNArn4jHe3677jqdYl2inZy0lVVvSkq0JdlRsLpVnlDbRHgfq4LXfsPZo29t5H1D_UzVIuUaFLdKvkO-Yp7wnGlt/s320/PrtScr+capture_48.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtUrnd9P83-tGkpOtssVpnCt6XaiNCWDYvlSriQp_p-MGwHMNYhUG7GRwTv1bJpd6eeLPYcdS-gm4ZaB-RqMliihQKQyhYWhlguNYu-uE5eP5B4I6Vm2xtK76PX8YoJMm3YIFrvo7OMD3D/s1600/PrtScr+capture_49.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtUrnd9P83-tGkpOtssVpnCt6XaiNCWDYvlSriQp_p-MGwHMNYhUG7GRwTv1bJpd6eeLPYcdS-gm4ZaB-RqMliihQKQyhYWhlguNYu-uE5eP5B4I6Vm2xtK76PX8YoJMm3YIFrvo7OMD3D/s1600/PrtScr+capture_49.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB-WFykQK3lTfUf0DqeoDn73-EJmUaimve7nN5lgyBDW4w4dv58Jc2ImWc4SR124f_p7s2ybgbn7CpmwSOI-8wcJL1qKn_wzxoY42Ob0Lr34V_L9Skc-O7zqf-wQXM-mfPsP6ejrEdCmeX/s1600/PrtScr+capture_50.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgB-WFykQK3lTfUf0DqeoDn73-EJmUaimve7nN5lgyBDW4w4dv58Jc2ImWc4SR124f_p7s2ybgbn7CpmwSOI-8wcJL1qKn_wzxoY42Ob0Lr34V_L9Skc-O7zqf-wQXM-mfPsP6ejrEdCmeX/s1600/PrtScr+capture_50.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
USING DIFFERENT MESH INPUT&lt;/h3&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMkxIJSBoux9yYpm2hEQSlgqHR5i1f_0-rPgt73WXQ1aJlVePczfp0Q2xElthOgWAYirLtrvlwWcbS6YJLrIvh0TRWixeOgLvX466soL0mPRUzk-TYwA4mA5zGVkaKSC1-ZUlHaDlcWrQh/s1600/PrtScr+capture_51.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMkxIJSBoux9yYpm2hEQSlgqHR5i1f_0-rPgt73WXQ1aJlVePczfp0Q2xElthOgWAYirLtrvlwWcbS6YJLrIvh0TRWixeOgLvX466soL0mPRUzk-TYwA4mA5zGVkaKSC1-ZUlHaDlcWrQh/s1600/PrtScr+capture_51.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;I am using Suzanne the Monkey mesh from Blender.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTy-CmCOZgIMQZu2a08-r164WtSJ8onfGOB2gerokcMy2O3ohMln8dSajdIB6zIwMg1xgaAYBM3ea1dfsI091hxCS0NXOpuqwp94UvEbxvGtHAGBbryR6f037nWmUH4tSf3FjumV0G0n6e/s1600/PrtScr+capture_52.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTy-CmCOZgIMQZu2a08-r164WtSJ8onfGOB2gerokcMy2O3ohMln8dSajdIB6zIwMg1xgaAYBM3ea1dfsI091hxCS0NXOpuqwp94UvEbxvGtHAGBbryR6f037nWmUH4tSf3FjumV0G0n6e/s1600/PrtScr+capture_52.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By having this procedural setup, you can easily change the input mesh for Scatter Points, then change the attribute of Cocoon maybe, to give you all kind of result.&lt;br /&gt;
&lt;br /&gt;
Thanks for SOuP Cocoon node!&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
QUICK ADDENDUM&lt;/h3&gt;
If using Maya nParticles, looks like we need to use SOuP RayProject node, in order to easily get the positionPP of particle in World? Maybe.&lt;br /&gt;
&lt;br /&gt;
In order for the RayProject to work, we also need addition mesh input.&lt;br /&gt;
&lt;br /&gt;
So the recipe:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[particle].worldPos -&amp;gt; [rayProject].inGeo&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[mesh].worldMesh[0] -&amp;gt; [rayProject].inCollisionMesh&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[rayProject].outGeo -&amp;gt; [cocoon].inPositionPP&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxtK3akBxyzq_yRdTWRg3emqRxXEHfH5bmJR2eO3eDEms1y5X22aDmj-mee_TXQ-PLb6vRo2EswpNwWy-aZKZYFZQPROGQmPShs9NWhep2Zx-rD6ek-q2pNH7RY3IMpWXdpdKJWVaKtCJh/s1600/maya_cocoon_particle_001.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;287&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxtK3akBxyzq_yRdTWRg3emqRxXEHfH5bmJR2eO3eDEms1y5X22aDmj-mee_TXQ-PLb6vRo2EswpNwWy-aZKZYFZQPROGQmPShs9NWhep2Zx-rD6ek-q2pNH7RY3IMpWXdpdKJWVaKtCJh/s320/maya_cocoon_particle_001.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibqDkh_Mv1idtye_T3Wo10t2v8r-c5Qp3VxXwCMGpWRClFiHW5H83S4gbHnhbhKO14hh7Q4MeNFAR6Oik_j6F5ZXL_nkVBKEEpJ4SYlijeJWx-u8Jzn8QC-v5n8oL3gSma3KNjDw5-TkcL/s1600/PrtScr+capture.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;444&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibqDkh_Mv1idtye_T3Wo10t2v8r-c5Qp3VxXwCMGpWRClFiHW5H83S4gbHnhbhKO14hh7Q4MeNFAR6Oik_j6F5ZXL_nkVBKEEpJ4SYlijeJWx-u8Jzn8QC-v5n8oL3gSma3KNjDw5-TkcL/s640/PrtScr+capture.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Maya Node Editor is an improvement, but have you seen Blender&#39;s Node Graph Editor? It&#39;s beautiful.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I have vague familiarity with RayCast. I think it&#39;s simply raycasting points into another wall. There are few more advanced examples provided by SOuP bundle as you might notice.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
With Raycast and its effect to Cocoon, for now play with the options, one of them can raycast the points to the container mesh wall collision. Can be a nice effect, populating the room with wild procedural stuff.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilREBOu0wEjnMUqemACjd8ccpuG5Lq84LGgB-VW_amu3jn_ThhA5YldZ3K-loZSEApghAqxPO0OL1WQwOr3bEVd6mpHjZ-vFNpzIvALIFiGcGs13JIN1xq0OrZXEOD6J94mWMtS2PFrjIq/s1600/PrtScr+capture_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;295&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilREBOu0wEjnMUqemACjd8ccpuG5Lq84LGgB-VW_amu3jn_ThhA5YldZ3K-loZSEApghAqxPO0OL1WQwOr3bEVd6mpHjZ-vFNpzIvALIFiGcGs13JIN1xq0OrZXEOD6J94mWMtS2PFrjIq/s400/PrtScr+capture_2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;NOTE: &lt;/b&gt;Noticed that I am using Node Editor to display node network. I guess, it can be cleaner like this. Although I am old school, still sometimes using Hypershade to display the graph.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCSAC3rq8DrXuwJICMAT-jQBjGEtb4f52lb2N0VOdIqEvyYcuB7mxM7TJdRfQwBPB2BYeyREHsT_eU8-LnJLtyEJQ_Qfa01rS9aNyxIMDJbEVfXPuQl9RWSXto2prht8ALPsH6sh5QU-n0/s1600/PrtScr+capture_3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;228&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCSAC3rq8DrXuwJICMAT-jQBjGEtb4f52lb2N0VOdIqEvyYcuB7mxM7TJdRfQwBPB2BYeyREHsT_eU8-LnJLtyEJQ_Qfa01rS9aNyxIMDJbEVfXPuQl9RWSXto2prht8ALPsH6sh5QU-n0/s320/PrtScr+capture_3.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimwZO-XUyHZ6gN6SYyzXX2SLp_nzQLmIA_i6nUx1ZyKzjrjSlDjcYK16P9Nu1bfBSnVXFG7f0x35C5sYbLrVTxK7keqTDg223AHdG68G0ZBfSaPclrLpNfWSB410oGD6T6Om06axtBTzfh/s1600/PrtScr+capture_4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;224&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimwZO-XUyHZ6gN6SYyzXX2SLp_nzQLmIA_i6nUx1ZyKzjrjSlDjcYK16P9Nu1bfBSnVXFG7f0x35C5sYbLrVTxK7keqTDg223AHdG68G0ZBfSaPclrLpNfWSB410oGD6T6Om06axtBTzfh/s320/PrtScr+capture_4.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrWTjgDEa8quCaSebVqqp5jndSs7CCyOj0acHzQDOg56eVJ2Q0LpEUqJljva42EL2RfDUwC1ni9S00nnwYBHSCYo4dGoO4XOAukdPmxqL9E0VCXtxv1qLOKNV6VF6sz0698pNcGrzGmzJZ/s1600/PrtScr+capture_5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;244&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrWTjgDEa8quCaSebVqqp5jndSs7CCyOj0acHzQDOg56eVJ2Q0LpEUqJljva42EL2RfDUwC1ni9S00nnwYBHSCYo4dGoO4XOAukdPmxqL9E0VCXtxv1qLOKNV6VF6sz0698pNcGrzGmzJZ/s320/PrtScr+capture_5.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwWF18pG9dendj_a-d86iKYFX72T8bsogm8PglIR9NF16Oj9sJ6DWmO5jD8kehMNF6PKVesnA-j0Vt8n2Ah6nLktmIlrMDrw3pQlczkbNaAgYegSm-bgZR6FXB58FUZqD46kufWp6nBDZC/s1600/PrtScr+capture_6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwWF18pG9dendj_a-d86iKYFX72T8bsogm8PglIR9NF16Oj9sJ6DWmO5jD8kehMNF6PKVesnA-j0Vt8n2Ah6nLktmIlrMDrw3pQlczkbNaAgYegSm-bgZR6FXB58FUZqD46kufWp6nBDZC/s400/PrtScr+capture_6.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/7736788985822096674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2016/02/soup-cocoon-node-basic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/7736788985822096674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/7736788985822096674'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2016/02/soup-cocoon-node-basic.html' title='SOUP / Cocoon Node Basic'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX7OiwxVb7xiwR6xPe7lItSmpt8JDtkw7__SYF2x1EcVC0kmXPTj4Bu6_MLSH1vvoce4Zah3VAcBnifytmrjI1G4qKOu2T0K_T1Gce9Hot_6LKlRVcLq5ZfYsuP43DUSKkVqx200YuhHm4/s72-c/PrtScr+capture_53.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-4595453295480644518</id><published>2014-03-22T17:31:00.003-07:00</published><updated>2014-03-22T17:31:49.217-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="convert"/><category scheme="http://www.blogger.com/atom/ns#" term="maya"/><category scheme="http://www.blogger.com/atom/ns#" term="mental ray"/><category scheme="http://www.blogger.com/atom/ns#" term="procedural"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><category scheme="http://www.blogger.com/atom/ns#" term="substance"/><category scheme="http://www.blogger.com/atom/ns#" term="texturing"/><title type='text'>TEXTURING / Substance for Mental Ray in Maya</title><content type='html'>Substance node is one of those super useful node especially for PROCEDURAL TEXTURING workflow inside Maya.&lt;br /&gt;
&lt;br /&gt;
Users with some good technical skills can understand this, however, many users do not understand how to use Substance and how to render it out in Mental Ray. You can always Google Search for some more informations, however, the information is all over the place for Maya. Autodesk is not very helpful either with their documentation.&lt;br /&gt;
&lt;br /&gt;
So, I decided to write this for beginner who wants to use Substance node.&lt;br /&gt;
&lt;h2&gt;
SUBSTANCE IS A PLUG IN&lt;/h2&gt;
Just like Mental Ray render for Maya, you need to enable Substance inside Plug-In Manager.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuagWsIRQX2ZbqjQLX9P8qy16twyL6HUgXFtrK7VrbSVxjl8i2U3vQN4a4FPUYPJ5vp_uefdiaK1yuRGeK2lFvzECaFqLg3DgOWS0k8rPPjpnJDwLD8wJm2lY3bWSD1pJR3cSUXCRA0f1o/s1600/substance_004.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuagWsIRQX2ZbqjQLX9P8qy16twyL6HUgXFtrK7VrbSVxjl8i2U3vQN4a4FPUYPJ5vp_uefdiaK1yuRGeK2lFvzECaFqLg3DgOWS0k8rPPjpnJDwLD8wJm2lY3bWSD1pJR3cSUXCRA0f1o/s1600/substance_004.png&quot; height=&quot;199&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Once you enable Substance, you will have 2 extra nodes you can use inside Hypershade:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlianDimxjZmVxIRulQFW2JqXy8X1tj2cYWdsfi39XiPN47tccs_rTq9utmkTVizcDUHfg0uTqU0KBpQNo5uK6Or_pU43S1dSeI3gL6RwftboyJwMA1KN9fM5ibkJOgxVeGLPfj5W8KNn_/s1600/substance_005.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlianDimxjZmVxIRulQFW2JqXy8X1tj2cYWdsfi39XiPN47tccs_rTq9utmkTVizcDUHfg0uTqU0KBpQNo5uK6Or_pU43S1dSeI3gL6RwftboyJwMA1KN9fM5ibkJOgxVeGLPfj5W8KNn_/s1600/substance_005.png&quot; height=&quot;298&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Of course by itself the Substance node does nothing, you actually need to use the Substance archives node, it comes with Substance Bonus Tools as examples:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ7Gtm2ioR9OvpY8lOUDQgTAGf-tPKP5ksMRHLSW9Fe4X2lt357L2IDlDyenBf5Z9R9-OS_TzeyCZMZABP0p4_RkPfFS_ovFmKfPX45c0kkUZe3H-hJCTYhhk03tD1T_CSakp7iWAqe7BA/s1600/substance_006.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ7Gtm2ioR9OvpY8lOUDQgTAGf-tPKP5ksMRHLSW9Fe4X2lt357L2IDlDyenBf5Z9R9-OS_TzeyCZMZABP0p4_RkPfFS_ovFmKfPX45c0kkUZe3H-hJCTYhhk03tD1T_CSakp7iWAqe7BA/s1600/substance_006.png&quot; height=&quot;640&quot; width=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Once you load the Substance archive, you can start using the &quot;preset&quot; procedural texture, it comes with parameters that you can adjust and animate:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhff8HocyCR6XcOxhyphenhyphen1p1ki-byeMRVXy5VEkepzicxBvqV2GZTinn9iJgEfy_jfneHyHcKgG-Ox4VL4R95SzMvkyzsQopaS_TS6nL5bEqZSi5VhQzFs681KQv3cA_OHeTgM7oaTyhrdkK_l/s1600/PrtScr+capture_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhff8HocyCR6XcOxhyphenhyphen1p1ki-byeMRVXy5VEkepzicxBvqV2GZTinn9iJgEfy_jfneHyHcKgG-Ox4VL4R95SzMvkyzsQopaS_TS6nL5bEqZSi5VhQzFs681KQv3cA_OHeTgM7oaTyhrdkK_l/s1600/PrtScr+capture_2.png&quot; height=&quot;395&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
To create the Substance archive yourself, you actually need Substance Designer, another additional tool that will cost you.&lt;br /&gt;
&lt;a href=&quot;http://www.allegorithmic.com/products/substance-designer-4&quot;&gt;http://www.allegorithmic.com/products/substance-designer-4&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;
SUBSTANCE FOR MENTAL RAY RENDER&lt;/h2&gt;
Maya Substance will work right away if you are rendering using Maya Software Render, but it will NOT render if you use Mental Ray. Surprised? No, because this is Maya and it always has that extra additional workflow to make it work.&lt;br /&gt;
&lt;br /&gt;
To convert Substance texture to use for Mental Ray, we actually need a Substance to Mental Ray converter script that comes with &lt;b&gt;Substance Bonus Tools&lt;/b&gt;. A bit of hassle, but we have to live with this.&lt;br /&gt;
&lt;br /&gt;
1. Download that extra &quot;Bonus Tools&quot;.&lt;br /&gt;
&lt;br /&gt;
Personally, I really don&#39;t like how Autodesk &quot;provide&quot; their plugins. They don&#39;t make it easy. Maya Bonus Tools is the same case. It should come built in with Maya and easy to install, but no, whenever users in need for that Bonus Tools, we always need to hunt around to download the file.&lt;br /&gt;
&lt;br /&gt;
Here is exactly such case:&lt;br /&gt;
You need to register and use your username login to get into the AREA to get this &lt;b&gt;Substance Bonus Tools&lt;/b&gt;. It is again, very dumb and inconsiderate of Autodesk for users.&lt;br /&gt;
&lt;br /&gt;
As for today, AREA still does not provide SEARCH tool for users to search for the tools. We need to filter the category, and so on, until we found what we want.&lt;br /&gt;
&lt;br /&gt;
Anyways, below are download links for your convenience:&lt;br /&gt;
&lt;br /&gt;
For Windows:&lt;br /&gt;
&lt;a href=&quot;https://area.autodesk.com/downloads/plugins/substance_bonus_tools_for_maya_2_0_windows&quot;&gt;https://area.autodesk.com/downloads/plugins/substance_bonus_tools_for_maya_2_0_windows&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
For Mac OS X:&lt;br /&gt;
&lt;a href=&quot;https://area.autodesk.com/downloads/plugins/substance_bonus_tools_for_maya_2_0_mac_osx&quot;&gt;https://area.autodesk.com/downloads/plugins/substance_bonus_tools_for_maya_2_0_mac_osx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
For Linux:&lt;br /&gt;
&lt;a href=&quot;https://area.autodesk.com/downloads/plugins/substance_bonus_tools_for_maya_2_0_linux&quot;&gt;https://area.autodesk.com/downloads/plugins/substance_bonus_tools_for_maya_2_0_linux&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I am currently using Maya 2014 and the Substance Bonus Tools is now version 2.0 above. If you really need to zipped file in the hurry, getting there into the &quot;closed&quot; Area is a pain.&lt;br /&gt;
&lt;br /&gt;
2. Copy and Install the Script&lt;br /&gt;
Once you got the zipped Substance Bonus Tools, simple unzip it and see inside the directory.&lt;br /&gt;
&lt;br /&gt;
It has a bit of documentation about Substance node, but lacking of &quot;how to install&quot;. This is why I am writing this blog post.&lt;br /&gt;
&lt;br /&gt;
For Windows, files you need to copy into your computer in order to use the Substance Shelves is here:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZED9H3ttnORgBD5XP7-_I43Hfib3vAfW5QaGH2jIE-t-BvaXLAvrd5ho3Mi3HQftlcS724ZAzp_RdFDn0Cim0poObwkRIu-mCRVSTZrPP-CCYaglEWRF6sVMJFj6cGvwJ2fSS7ddSWLfH/s1600/substance_001.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZED9H3ttnORgBD5XP7-_I43Hfib3vAfW5QaGH2jIE-t-BvaXLAvrd5ho3Mi3HQftlcS724ZAzp_RdFDn0Cim0poObwkRIu-mCRVSTZrPP-CCYaglEWRF6sVMJFj6cGvwJ2fSS7ddSWLfH/s1600/substance_001.png&quot; height=&quot;231&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;For MacOSX, you care about this folder:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjyjykPQC45N0XxpZg6fKfCC9l_rkVRDVXEKZhbnuPxqLI9HqkiAD9Pjnxxv0ENBwWaTppksIXgrztEhyphenhyphen9OFdI4k3VbspXApbuXqA-ogBzxI_xSI23LOED0Qfa4CwbPikfEaty2JHc6Ofu/s1600/substance_002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjyjykPQC45N0XxpZg6fKfCC9l_rkVRDVXEKZhbnuPxqLI9HqkiAD9Pjnxxv0ENBwWaTppksIXgrztEhyphenhyphen9OFdI4k3VbspXApbuXqA-ogBzxI_xSI23LOED0Qfa4CwbPikfEaty2JHc6Ofu/s1600/substance_002.png&quot; height=&quot;260&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Usually, the easiest to find the directory path to save your script is by opening Maya and run this MEL script below:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;internalVar -userScriptDir;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;b&gt;// Result: C:/Users/Jimmy/Documents/maya/2014-x64/scripts/ //&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You want to COPY and PASTE file according to the folder structure. So, &quot;icons&quot; files goes into &quot;icons&quot; folder, &quot;scripts&quot; files goes into &quot;scripts&quot; folder, and so on.&lt;br /&gt;
&lt;br /&gt;
Surely, you can simply drag and drop folder in Windows, it will merge the files. However, DO NOT do this in Mac, because in Mac OS X, if you drag a folder into another folder with the same name, you will end up OVERRIDE the files (you lost the old files, and replace everything in the folder with new files). So, I suggest you, when using Mac, and want to copy bunch of files, do copy and paste the files.&lt;br /&gt;
&lt;br /&gt;
3. Use the Substance Shelf&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghyGC6KIwjOeSjaV8t9hSG9mI6szecRB5peMN8eBMF6uk_qZCgywv9YlKrriZlrIRLlEHRYTQ32BgSLwmFGKQAuJBFjMaA7nBixdth8VkhFiggJlTTQvCJmHTU1lChIYQnlL8Fjy5at4yo/s1600/substance_003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghyGC6KIwjOeSjaV8t9hSG9mI6szecRB5peMN8eBMF6uk_qZCgywv9YlKrriZlrIRLlEHRYTQ32BgSLwmFGKQAuJBFjMaA7nBixdth8VkhFiggJlTTQvCJmHTU1lChIYQnlL8Fjy5at4yo/s1600/substance_003.png&quot; height=&quot;35&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Substance Shelf&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Now, with Substance Shelf installed, you can now convert your Substance material into Shader that Mental Ray can render. A single click on this icon on the shelves:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiQtq0g_z-3LhEdgSfCOWEffP_Y6unJ5Z-WAw84-0AfLR2mRPMvKIWfsHD0Bb33a2mSi55i30bqR83klP_4EDoLCiYv6ejo9EJ6Otbz_RFTxLjpCB4HnVJlTPMp7uO2bHM5NMpAnhn5hG4/s1600/PrtScr+capture_4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiQtq0g_z-3LhEdgSfCOWEffP_Y6unJ5Z-WAw84-0AfLR2mRPMvKIWfsHD0Bb33a2mSi55i30bqR83klP_4EDoLCiYv6ejo9EJ6Otbz_RFTxLjpCB4HnVJlTPMp7uO2bHM5NMpAnhn5hG4/s1600/PrtScr+capture_4.png&quot; height=&quot;320&quot; width=&quot;310&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
For every Substance node inside Hypershade, you want to convert it into Mental Ray Shader and assign the created shader to the 3D object one by one.&lt;br /&gt;
&lt;br /&gt;
Note that the converted material is using Mental Ray Material, no longer the normal Maya Shader.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzuHr-675rqFKoOjNr68sMHvl_8IRjIpd7LFf8hYsvAoW5Xa7PbHZoMEiLqA6SFXWvu0tqohA-szsDnOAFWvqiZ3JgmVr4u6O73vPIEt9qvdkBRLBhr8BnF_I9ii8QvLS9KMdOMvvTLoUa/s1600/PrtScr+capture_3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzuHr-675rqFKoOjNr68sMHvl_8IRjIpd7LFf8hYsvAoW5Xa7PbHZoMEiLqA6SFXWvu0tqohA-szsDnOAFWvqiZ3JgmVr4u6O73vPIEt9qvdkBRLBhr8BnF_I9ii8QvLS9KMdOMvvTLoUa/s1600/PrtScr+capture_3.png&quot; height=&quot;510&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Substance texture should now render inside Mental Ray.</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/4595453295480644518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2014/03/texturing-substance-for-mental-ray-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/4595453295480644518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/4595453295480644518'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2014/03/texturing-substance-for-mental-ray-in.html' title='TEXTURING / Substance for Mental Ray in Maya'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuagWsIRQX2ZbqjQLX9P8qy16twyL6HUgXFtrK7VrbSVxjl8i2U3vQN4a4FPUYPJ5vp_uefdiaK1yuRGeK2lFvzECaFqLg3DgOWS0k8rPPjpnJDwLD8wJm2lY3bWSD1pJR3cSUXCRA0f1o/s72-c/substance_004.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-7844852856993647607</id><published>2014-01-03T05:08:00.003-08:00</published><updated>2014-01-03T05:08:57.217-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="projection"/><category scheme="http://www.blogger.com/atom/ns#" term="snapping"/><category scheme="http://www.blogger.com/atom/ns#" term="transfer attribute"/><category scheme="http://www.blogger.com/atom/ns#" term="vertex"/><category scheme="http://www.blogger.com/atom/ns#" term="vertex position"/><title type='text'>BASIC / Transfer Attribute For Projection</title><content type='html'>There is a saying:&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-size: large;&quot;&gt;The more you know, the more you realize how little you know.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Meaning, there are still plenty to learn and explore. However time is usually the issue. This has never been so true, especially in Computer Graphics field. So much to learn, so little time.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;TRANSFER ATTRIBUTE VERTEX POSITION&lt;/b&gt;&lt;br /&gt;
Anyway, look at this &lt;b&gt;Transfer Attributes &lt;/b&gt;command in Maya, for example. One would think this is for transferring UV or Color, but in fact it is also useful to Project One Mesh over another Mesh, when &lt;b&gt;Vertex Position&lt;/b&gt; is enabled.&lt;br /&gt;
&lt;h2&gt;
BEFORE:&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhZxE_SL-BbnVG86ZSKbEHs2JQhfqSoaMC5TwFvELAYti6VUrI2OnAimxKciaoG8UnPQ7chBhoRBdyoVyXl4rZZAqEv8rXsiA_EuITOwCLwSwap0XnRSXgakJKNNBZGcbNocabJhlNFNko/s1600/PrtScr+capture_3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;266&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhZxE_SL-BbnVG86ZSKbEHs2JQhfqSoaMC5TwFvELAYti6VUrI2OnAimxKciaoG8UnPQ7chBhoRBdyoVyXl4rZZAqEv8rXsiA_EuITOwCLwSwap0XnRSXgakJKNNBZGcbNocabJhlNFNko/s320/PrtScr+capture_3.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
In this case, I select the big sphere (surface to project into) and then the &quot;Maya&quot; text, finally apply &quot;Transfer Attributes&quot;. Mesh-Transfer Attributes, with option below. But you can always change the setting of the Transfer Attributes node later.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYqUn9WsH3Qpg7GlgQHI62HaiSS4padAPDIAzeBT-tMWNtWHG0Ge5qo37ZmdJzYMvfXXpWI-NElf9W9PYgilJEZLddTfs6xl8BCiBvAwHSh5W5_jB4ams7AKavrup7jH3jvFR-m4xfT3Qs/s1600/PrtScr+capture_4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYqUn9WsH3Qpg7GlgQHI62HaiSS4padAPDIAzeBT-tMWNtWHG0Ge5qo37ZmdJzYMvfXXpWI-NElf9W9PYgilJEZLddTfs6xl8BCiBvAwHSh5W5_jB4ams7AKavrup7jH3jvFR-m4xfT3Qs/s1600/PrtScr+capture_4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
AFTER:&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTbCHtha_PQhzELgKISjW1UqBpKMJcH8EwfuHFWQ38OQz9HxHHFZGcUA1kgvncvFArKsZ-bJgAflMJrrhTrN-u-O7klEvBLBR4PpMfH8V2PXY2x_wd6FnK6dgN1iXIKSnkFFlRBXIS7rE7/s1600/PrtScr+capture_5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTbCHtha_PQhzELgKISjW1UqBpKMJcH8EwfuHFWQ38OQz9HxHHFZGcUA1kgvncvFArKsZ-bJgAflMJrrhTrN-u-O7klEvBLBR4PpMfH8V2PXY2x_wd6FnK6dgN1iXIKSnkFFlRBXIS7rE7/s1600/PrtScr+capture_5.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The effect is LIVE too, and quite stable.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoosIOEV8FpC8_SOZADSZxE4ueJwobo4IqBfXIx8Z2a5v_TtjUZYHmQCHQJ6VG7ic6ogFFrV93LX-79MOOBe0hyGIwUuhyphenhyphencgIXZT8_nFy9y8Hach5BL1HyTF3ABwsmOFo_UV_ig8r4ptLn/s1600/PrtScr+capture_6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;332&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoosIOEV8FpC8_SOZADSZxE4ueJwobo4IqBfXIx8Z2a5v_TtjUZYHmQCHQJ6VG7ic6ogFFrV93LX-79MOOBe0hyGIwUuhyphenhyphencgIXZT8_nFy9y8Hach5BL1HyTF3ABwsmOFo_UV_ig8r4ptLn/s400/PrtScr+capture_6.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This is probably similar to SOuP Ray Project node:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;a href=&quot;http://mayaspiral.blogspot.com.au/2012/07/soup-ray-project.html&quot;&gt;http://mayaspiral.blogspot.com.au/2012/07/soup-ray-project.html&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
MEANWHILE IN BLENDER...&lt;/h2&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Equivalent to that in Blender will be using Shrinkwrap Modifier:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj07h2uIWNzEjZ0UyQ8GRnEOJvlZiAwq5vxrVDEFBiuG4ZQH4y3lq-5JupQO2jIo1pNqwrvhZ642yZw8goNFuT0344qoMbCLUGIX9oawirSDi66DnWEHHlR3pf8SIUEz0GQzZZdjZIxDDjb/s1600/PrtScr+capture_7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;173&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj07h2uIWNzEjZ0UyQ8GRnEOJvlZiAwq5vxrVDEFBiuG4ZQH4y3lq-5JupQO2jIo1pNqwrvhZ642yZw8goNFuT0344qoMbCLUGIX9oawirSDi66DnWEHHlR3pf8SIUEz0GQzZZdjZIxDDjb/s320/PrtScr+capture_7.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD1CcyvvGyg_JFrNgJYl7EqTrcnYHKRAsGV1WzLAEymPAEmwz3jh9s2AhifhZq1caRMtZOSnVQQW6JIa5CzihOAnXy4b_jk3vCIRlQScIF9g-_P5iFMKd-LnGlHHQOMj4zlRBBV6CtiuuA/s1600/PrtScr+capture_8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD1CcyvvGyg_JFrNgJYl7EqTrcnYHKRAsGV1WzLAEymPAEmwz3jh9s2AhifhZq1caRMtZOSnVQQW6JIa5CzihOAnXy4b_jk3vCIRlQScIF9g-_P5iFMKd-LnGlHHQOMj4zlRBBV6CtiuuA/s320/PrtScr+capture_8.png&quot; width=&quot;265&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
What neat in Blender is that the text object is LIVE and editable. Blender Text Object is 100x times more robust than Maya&#39;s Text Object and it is editable.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
It is just a very different implementation.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicQk8hD1eUXup-fEn56m-O7BuTvhpZAyr6tOiJJKuIh7XZ5GUu9oP8RfYiXMrcJdWllq45Mp4oD_INXpTwEdTZxt8p7CoTJQtxK3TV4fU-7Y0BgOCE2P0CYozSmlReh_EvdGCe9BBsLYSt/s1600/PrtScr+capture_9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;157&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicQk8hD1eUXup-fEn56m-O7BuTvhpZAyr6tOiJJKuIh7XZ5GUu9oP8RfYiXMrcJdWllq45Mp4oD_INXpTwEdTZxt8p7CoTJQtxK3TV4fU-7Y0BgOCE2P0CYozSmlReh_EvdGCe9BBsLYSt/s320/PrtScr+capture_9.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
So, anyway, I just felt like posting this. It&#39;s very simple, but probably useful thought for you.&amp;nbsp;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/7844852856993647607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2014/01/basic-transfer-attribute-for-projection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/7844852856993647607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/7844852856993647607'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2014/01/basic-transfer-attribute-for-projection.html' title='BASIC / Transfer Attribute For Projection'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhZxE_SL-BbnVG86ZSKbEHs2JQhfqSoaMC5TwFvELAYti6VUrI2OnAimxKciaoG8UnPQ7chBhoRBdyoVyXl4rZZAqEv8rXsiA_EuITOwCLwSwap0XnRSXgakJKNNBZGcbNocabJhlNFNko/s72-c/PrtScr+capture_3.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-7541904552652535949</id><published>2013-07-09T22:38:00.000-07:00</published><updated>2013-07-09T22:41:02.512-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="directx"/><category scheme="http://www.blogger.com/atom/ns#" term="procedural"/><category scheme="http://www.blogger.com/atom/ns#" term="shader"/><category scheme="http://www.blogger.com/atom/ns#" term="substance"/><title type='text'>RENDERING / Substance and DirectX11 Viewport Maya 2014</title><content type='html'>I stumbled into this video by &lt;b&gt;Raouf Bejaoui&lt;/b&gt; demonstraing how to set up &lt;b&gt;Maya Substance Texture&lt;/b&gt; to work with &lt;b&gt;DX11 Shader&lt;/b&gt; in &lt;b&gt;Maya 2014&lt;/b&gt;:&lt;br /&gt;
&lt;a href=&quot;http://www.youtube.com/watch?v=TbpFpJP2zfY&quot;&gt;http://www.youtube.com/watch?v=TbpFpJP2zfY&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
What a neat setup allowing you to see Displacement and Texture on Maya 2014 Viewport 2.0!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUVUzzkRduLFc_wLHyGiwe8O9hcaBuVkXlhouIu1ClL6f6DyI_fO7MpR-UfqumRP0m79Csxvdkn6GEip5UD58xOlAHHfNL1hM8IveI-1lTSP1RZEWuVuotv9e8oEQIDd106o2-pRDtZGpv/s1600/PrtScr+capture_23.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUVUzzkRduLFc_wLHyGiwe8O9hcaBuVkXlhouIu1ClL6f6DyI_fO7MpR-UfqumRP0m79Csxvdkn6GEip5UD58xOlAHHfNL1hM8IveI-1lTSP1RZEWuVuotv9e8oEQIDd106o2-pRDtZGpv/s640/PrtScr+capture_23.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
Well, I gotta admit that I quite like this &quot;realtime&quot; displacement on Viewport 2.0 based on Substance Maps that is procedural in the way, because it updates when we make changes to the Substance Texture.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;NOTE:&lt;/b&gt;&lt;br /&gt;
This Maya 2014 is probably the only upgrade worth upgrading since Maya 8.5! I had wish I skipped Maya 2010 upgrade and wait till Maya 2014. It was a waste of money between Maya 2010 - Maya 2013.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
You can follow the video yourself, but I have to post this and make additional notes for myself. More like a summary in case I do not have time to watch the full video.&lt;br /&gt;
&lt;br /&gt;
1. Change Maya Render Engine to DirectX 11:&lt;br /&gt;
Firstly, you need to make changes to your Maya Preferences in order for DX11 Shader to work on Viewport 2.0:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJQo5stvnn6CgZBRk2bSGMb9lCJYgNUl2ZJ7-u2lpGsqcG_DGlElFhaR3ET7WMNxE6eG2NjTXYD9eO6SMCOC21KrMD-8T3stxo_oUHO3x_7YCmTazJSeCSH05shGj7KVWcbEJt8BeI1hzM/s1600/PrtScr+capture_20.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;577&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJQo5stvnn6CgZBRk2bSGMb9lCJYgNUl2ZJ7-u2lpGsqcG_DGlElFhaR3ET7WMNxE6eG2NjTXYD9eO6SMCOC21KrMD-8T3stxo_oUHO3x_7YCmTazJSeCSH05shGj7KVWcbEJt8BeI1hzM/s640/PrtScr+capture_20.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You need to restart Maya in order for this DX11 thing to work.&lt;br /&gt;
&lt;br /&gt;
2. Change your Maya 3D Viewport to use Viewport 2.0&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIMIHlLi2i8jfvZxUcs77vzBV6GOIPBgY6jES-5TDdFZwlf36VAQLyLXVkwQvpCHeBNJfoQ09FijvrNR3KynIXjfu-PYSjSGuFvNHKCimVuZZvGKqTSl0uBLNA7Rw-Gh6RxFyDv-LbRsOG/s1600/PrtScr+capture_24.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;377&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIMIHlLi2i8jfvZxUcs77vzBV6GOIPBgY6jES-5TDdFZwlf36VAQLyLXVkwQvpCHeBNJfoQ09FijvrNR3KynIXjfu-PYSjSGuFvNHKCimVuZZvGKqTSl0uBLNA7Rw-Gh6RxFyDv-LbRsOG/s400/PrtScr+capture_24.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
3. Test Default DX11 Shader&lt;br /&gt;
If you apply DX11 Shader into a Polygon Mesh or NURBS Surface (that have UV), and hit 6 (texture enabled) or 7 (texture and lighting enabled), you will see DX11 Shader in effect by showing the default Autodesk Uber Shader (&lt;b&gt;AutodeskUberShader.fxo&lt;/b&gt;).&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwzoRnuc0u2erhKyqYuh_Q4e_7lcN05GtWFzgkz1N8Vj0gMckpU8EVqzAv4dRjyJ6JKCuRc41c78ndrO2wkrLPbOIp30aupdj5mT54IRnJGVaREFe0N8dNciWD4WrrAnggQNxABkJxoAQp/s1600/PrtScr+capture_25.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;475&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwzoRnuc0u2erhKyqYuh_Q4e_7lcN05GtWFzgkz1N8Vj0gMckpU8EVqzAv4dRjyJ6JKCuRc41c78ndrO2wkrLPbOIp30aupdj5mT54IRnJGVaREFe0N8dNciWD4WrrAnggQNxABkJxoAQp/s640/PrtScr+capture_25.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
4. Setup Substance Textures&lt;br /&gt;
The rest of the setup can be done by following the video tutorial above. You can work using Node Editor like the video or Hypershade.&lt;br /&gt;
&lt;br /&gt;
Substance Texture node is basically a procedural way to create set of texture maps (Diffuse, Specular, Normal, Displacement), ready to be plugged into Shader.&lt;br /&gt;
&lt;br /&gt;
1. Create 2D Texture - Substance.&lt;br /&gt;
2. From Substance node Attribute Editor, just point into one of Substance files.&lt;br /&gt;
&amp;nbsp;There should be some files in your Maya directory with extension *.sbsar. These files are examples of Substance Textures.&lt;br /&gt;
&lt;br /&gt;
In Windows: C:\Program Files\Autodesk\Maya2014\substance\substances&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcw0HKgNLaKNajFPcOiTN8oaoo7V8tPNfC8lhuBHSmoXlgKy3E8vttFeVDTa6aAa8JDd0pUxY1TzvOPce3ACka_GqlurMx6ARfVzNMQTgqatMLWSLQfBtZl5Aqf08g-1sGAQ-J5hN4Xai3/s1600/PrtScr+capture_26.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;475&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcw0HKgNLaKNajFPcOiTN8oaoo7V8tPNfC8lhuBHSmoXlgKy3E8vttFeVDTa6aAa8JDd0pUxY1TzvOPce3ACka_GqlurMx6ARfVzNMQTgqatMLWSLQfBtZl5Aqf08g-1sGAQ-J5hN4Xai3/s640/PrtScr+capture_26.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Once the Substance preset is loaded, you can tweak the Substance parameter and start enabling the required Map: Diffuse, Specular, Normal, Height.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpf4OxwQs_BqE4kMEe9RwlPt0WDhVn8GAmj8yyryHMMmNY81mouI3f4R6Q0pTf-JDyI8sIKDdt9-zYNKtXGPd0LKbq1zbPitDxxDNbc3rpfdCHj2h-CqxfzDLvTcXlVbjE30gp0wJzEcC0/s1600/PrtScr+capture_28.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpf4OxwQs_BqE4kMEe9RwlPt0WDhVn8GAmj8yyryHMMmNY81mouI3f4R6Q0pTf-JDyI8sIKDdt9-zYNKtXGPd0LKbq1zbPitDxxDNbc3rpfdCHj2h-CqxfzDLvTcXlVbjE30gp0wJzEcC0/s640/PrtScr+capture_28.png&quot; width=&quot;353&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
3. Inside Hypershade:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPsjm_9JTam-MNYm_PpEYM-W_aCNmEvQLM5f3p9HPysUEHwTWPow9lNkrRy7Dhcl0VlgaMK1gUkgY_jR6-0P_p7ib8awufKeEWxXxDh6gFF5LnVr9myG3t0Ct4p26BTlm7smAQsFXm4myr/s1600/PrtScr+capture_29.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPsjm_9JTam-MNYm_PpEYM-W_aCNmEvQLM5f3p9HPysUEHwTWPow9lNkrRy7Dhcl0VlgaMK1gUkgY_jR6-0P_p7ib8awufKeEWxXxDh6gFF5LnVr9myG3t0Ct4p26BTlm7smAQsFXm4myr/s640/PrtScr+capture_29.png&quot; width=&quot;612&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
4. Connect to DX11 Shader.&lt;br /&gt;
The rest of process should be self-explanatory. You basically need to activate Diffuse Map, Specular Map, Normal Map and Displacement Map inside DX11 Shader and then plug every File node corresponding to each required input:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;File Diffuse --&amp;gt; Diffuse Map&lt;/li&gt;
&lt;li&gt;File Specular --&amp;gt; Specular Map&lt;/li&gt;
&lt;li&gt;File Normal --&amp;gt; Normal Map&lt;/li&gt;
&lt;li&gt;File Height --&amp;gt; Displacement Map&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU7XYeZF9FUpDMk8Hy3Uz7AoZn7l4vKEHjSN4As4XWupNxAB9x062aEB7F702VdxXM_2co_eWBLuMopBQjYroihk-ykO3spDiZAdLStL37PqIoZOk7P9s7c1Ub_8URH6zvEEJf3FN_SIqP/s1600/PrtScr+capture_27.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;588&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiU7XYeZF9FUpDMk8Hy3Uz7AoZn7l4vKEHjSN4As4XWupNxAB9x062aEB7F702VdxXM_2co_eWBLuMopBQjYroihk-ykO3spDiZAdLStL37PqIoZOk7P9s7c1Ub_8URH6zvEEJf3FN_SIqP/s640/PrtScr+capture_27.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
5. Activate &lt;b&gt;Tesselation ON&amp;nbsp;&lt;/b&gt;inside DX11 Shader Attribute Editor.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6iYytmsEQdVAKa1f5JTN1QHsLMfyuCQqI4vEkzwomHLwtwk-dejs2_TGPQ3P6R_yKvcqEls-eRUdUdyzTh2usFoBv37-vKUsrK3YcH43zCRjurSisV-Q6IrduiEa3CB2B54uHUck76K8U/s1600/PrtScr+capture_30.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;390&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6iYytmsEQdVAKa1f5JTN1QHsLMfyuCQqI4vEkzwomHLwtwk-dejs2_TGPQ3P6R_yKvcqEls-eRUdUdyzTh2usFoBv37-vKUsrK3YcH43zCRjurSisV-Q6IrduiEa3CB2B54uHUck76K8U/s640/PrtScr+capture_30.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You need to turn on Tesselation to be able to see the Displacement (Height) happening. To see displacement in &quot;realtime&quot; on viewport is always fun.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
6. Adjust Substance Parameter&lt;/div&gt;
&lt;div&gt;
Continue adjusting Substance parameters as you please. I think this is one of the benefit of Substance material. Kind of similar to how Renderman implements the Shaders.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Resulting in a nicely packaged textured ready for use for game or film production.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjELDv_eooq04wNOPNPrItLyLqpenaCx5oBdtGL7Q29QX5PS_ZCi5tD4roosVs1zulsgEpXsaS4CMKyZlec2i3DhQhJtRMgjaZA46erKgm-PvaYWdEVaFZmnTYrdmWNt3uBzd3XRn_mmog4/s1600/PrtScr+capture_31.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;384&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjELDv_eooq04wNOPNPrItLyLqpenaCx5oBdtGL7Q29QX5PS_ZCi5tD4roosVs1zulsgEpXsaS4CMKyZlec2i3DhQhJtRMgjaZA46erKgm-PvaYWdEVaFZmnTYrdmWNt3uBzd3XRn_mmog4/s640/PrtScr+capture_31.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/7541904552652535949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2013/07/rendering-substance-and-directx11.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/7541904552652535949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/7541904552652535949'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2013/07/rendering-substance-and-directx11.html' title='RENDERING / Substance and DirectX11 Viewport Maya 2014'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUVUzzkRduLFc_wLHyGiwe8O9hcaBuVkXlhouIu1ClL6f6DyI_fO7MpR-UfqumRP0m79Csxvdkn6GEip5UD58xOlAHHfNL1hM8IveI-1lTSP1RZEWuVuotv9e8oEQIDd106o2-pRDtZGpv/s72-c/PrtScr+capture_23.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-97010955265304174</id><published>2013-06-01T07:38:00.001-07:00</published><updated>2013-06-01T07:42:02.313-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="anime"/><category scheme="http://www.blogger.com/atom/ns#" term="baby"/><category scheme="http://www.blogger.com/atom/ns#" term="cartoony"/><category scheme="http://www.blogger.com/atom/ns#" term="face"/><category scheme="http://www.blogger.com/atom/ns#" term="maya"/><category scheme="http://www.blogger.com/atom/ns#" term="rig"/><title type='text'>RIG / Simple Baby</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGuvtpPamTy65YPAyRwUylvnp0sc14uClwzj1sLiMEUlHVemkAgOfwHLrwyvCehbThBr2owJQEQSFgM58bQWfrPQuSdg9xFBLyQebFNzkzVl1Nomm3VpOXXFOJDX9r-hrdMMWWZezGlQc0/s1600/simpleBabyFace.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGuvtpPamTy65YPAyRwUylvnp0sc14uClwzj1sLiMEUlHVemkAgOfwHLrwyvCehbThBr2owJQEQSFgM58bQWfrPQuSdg9xFBLyQebFNzkzVl1Nomm3VpOXXFOJDX9r-hrdMMWWZezGlQc0/s400/simpleBabyFace.jpeg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Modeling and Rigging exercise. This is 6 hours non-stop on Saturday night.&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
The Facial Rig is Suchan Style:&lt;br /&gt;
&lt;a href=&quot;http://www.puppeteerlounge.com/rigging-workshop&quot;&gt;http://www.puppeteerlounge.com/rigging-workshop&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
All Blendshapes driven using Expressions. Even though it is easy to type in expressions, I think in the future, this has to be Python scripted.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixd-hrn1A8p0DM2d6Z4FTF_wWo_0xmC7noEoJClrhO1onOlJy53ri-feTMKGc1avunMI6vZelQjPi27gcJD-mu-f-AFp7saqKVrSApEFHd2V3YDMdoev8H9O0fVJPvJvreSScBi4KdTU7s/s1600/simpleHead_suchanStyle.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixd-hrn1A8p0DM2d6Z4FTF_wWo_0xmC7noEoJClrhO1onOlJy53ri-feTMKGc1avunMI6vZelQjPi27gcJD-mu-f-AFp7saqKVrSApEFHd2V3YDMdoev8H9O0fVJPvJvreSScBi4KdTU7s/s640/simpleHead_suchanStyle.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk3dx27SW_AM3BsfRdgL0qt85kn1fZZEOVNHgZ9Uqdt7uIqGWXlzSqszHluuz4TPDkeqWm9_z3tqzx0Lp3A2kVgTYD4myjNf4WAgkJ9v32aXICrJbLDUnI3nX0mYjB3P0R3rem9IRQeLWQ/s1600/simpleBabyRig.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;430&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk3dx27SW_AM3BsfRdgL0qt85kn1fZZEOVNHgZ9Uqdt7uIqGWXlzSqszHluuz4TPDkeqWm9_z3tqzx0Lp3A2kVgTYD4myjNf4WAgkJ9v32aXICrJbLDUnI3nX0mYjB3P0R3rem9IRQeLWQ/s640/simpleBabyRig.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/97010955265304174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2013/06/rig-simple-baby.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/97010955265304174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/97010955265304174'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2013/06/rig-simple-baby.html' title='RIG / Simple Baby'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGuvtpPamTy65YPAyRwUylvnp0sc14uClwzj1sLiMEUlHVemkAgOfwHLrwyvCehbThBr2owJQEQSFgM58bQWfrPQuSdg9xFBLyQebFNzkzVl1Nomm3VpOXXFOJDX9r-hrdMMWWZezGlQc0/s72-c/simpleBabyFace.jpeg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-3576639424503167530</id><published>2013-05-12T04:01:00.002-07:00</published><updated>2013-07-12T16:18:29.980-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="rigging"/><category scheme="http://www.blogger.com/atom/ns#" term="substitute geometry"/><title type='text'>RIGGING / When Subsitute Geometry Comes In Handy</title><content type='html'>Your character is rigged and skinned, perhaps you use auto-rigging service like Mixamo. And suddenly you have a need to SEPARATE the Head and Body and do some Blendshapes on the Head ONLY.&lt;br /&gt;
&lt;br /&gt;
Can we do it? Yes, apparently it is possible and to do it cleanly using Substitute Geometry.&lt;br /&gt;
&lt;br /&gt;
In the past we probably use Wrap Deformer, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghiezE_DfRluGDWqWlyeiQvYL-RGQqML0ILYLO9xFlDvArL2DnoJSYnSrt2LfPKmNaekrkIbvJvNcMoj-_5nIID5Cbr1TQwZJiyhpj2M48Qy43lhm6Jg2rDGyknLn7t10lLDf_Eb1FOX0n/s1600/separateHeadBody_001.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghiezE_DfRluGDWqWlyeiQvYL-RGQqML0ILYLO9xFlDvArL2DnoJSYnSrt2LfPKmNaekrkIbvJvNcMoj-_5nIID5Cbr1TQwZJiyhpj2M48Qy43lhm6Jg2rDGyknLn7t10lLDf_Eb1FOX0n/s1600/separateHeadBody_001.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Imagine this is your awesome character model consist of Head and Body which are combined.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
1. DUPLICATE THE MESH&lt;br /&gt;
First of all, we create duplicate of skinned geometry. Unlock channels, etc.&lt;br /&gt;
&lt;br /&gt;
2. SEPARATE HEAD AND BODY TRICK&lt;br /&gt;
Do the separation of Head and Body part at Edge Loop where you want the Head blendshapes to be made.&lt;br /&gt;
&lt;br /&gt;
Create duplicate of the Head, for later you will use the Head ONLY for blendshapes.&lt;br /&gt;
&lt;br /&gt;
Basically this video tutorial by&amp;nbsp;&lt;a href=&quot;https://vimeo.com/user6422293&quot; rel=&quot;author&quot; style=&quot;background-color: #f4f5f7; color: #112233; cursor: pointer; font-family: sans-serif; font-size: 14px; font-weight: 700; line-height: 14px; text-decoration: none;&quot;&gt;Jennifer Conley&lt;/a&gt;&amp;nbsp;explain the whole process:&lt;br /&gt;
&lt;a href=&quot;https://vimeo.com/50658157&quot;&gt;https://vimeo.com/50658157&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
3. COMBINE HEAD AND BODY&lt;br /&gt;
Just like shown on Jennifer Conley video, when we combine the Head and Body, we must make sure the Head (that will have Blendshapes applied later on) needs to be selected first before the body.&lt;br /&gt;
&lt;br /&gt;
Check if the new mesh work with Blendshapes. Then delete the Blendshapes. We are going to re-apply it later after Substitution of geometry.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzgmeEmaNkRJYFZ5KAm-jbUqFWH1GTTDClhpYII7-EffC904UQsHvNfAGf3opxyt-TmSkvCff_pz5F-0ftLFVJeGCT0FCQc3pUf9QIy8pVpBIoWVrIHE3hETYNaJAxLNC-NcMCGQ6lUj3h/s1600/separateHeadBody_002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;357&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzgmeEmaNkRJYFZ5KAm-jbUqFWH1GTTDClhpYII7-EffC904UQsHvNfAGf3opxyt-TmSkvCff_pz5F-0ftLFVJeGCT0FCQc3pUf9QIy8pVpBIoWVrIHE3hETYNaJAxLNC-NcMCGQ6lUj3h/s400/separateHeadBody_002.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
4. SUBSTITUTE GEOMETRY&lt;br /&gt;
Now we have this new mesh that is actually slightly different in topology than original Skinned mesh. The good thing about this mesh is that it will work with the Blendhapes. Make sure you delete history on this mesh, before re-skinning it using Substitute Geometry.&lt;br /&gt;
&lt;br /&gt;
Select skinned mesh, select the new geometry, then do the Substite&lt;br /&gt;
&lt;br /&gt;
5. APPLY BLENDSHAPES&lt;br /&gt;
Now, you simply apply the Blendshape Head (ONLY) to the Substitute Geometry (skinned). Make sure Check Topology is OFF for the Blendshape.&lt;br /&gt;
&lt;br /&gt;
It will work as expected, and the Blendshape meshes (head only) will work fine too. Except for one little mole: there is that weird Transform node left behind. Just be careful NOT to delete this stray Transform node created by Substitute Geometry.&lt;br /&gt;
&lt;br /&gt;
If you delete this, the Skin Cluster information that supposed to be there will no longer works.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja3DPeiqovdPaiHIRfsv2RwN5cTF1o61I6DAkALFQsWfhlYuxHFT7cAPX6Zz-zilbcW8ELgzEQEDCK6vVKJrPwg9SlohAHRqkpZOJpn6LTArU08iAS_oj2ewIlfFwkp4LcfXB3XCgxLcRz/s1600/separateHeadBody_003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;499&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja3DPeiqovdPaiHIRfsv2RwN5cTF1o61I6DAkALFQsWfhlYuxHFT7cAPX6Zz-zilbcW8ELgzEQEDCK6vVKJrPwg9SlohAHRqkpZOJpn6LTArU08iAS_oj2ewIlfFwkp4LcfXB3XCgxLcRz/s640/separateHeadBody_003.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Leave that stray Transform node.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;DORA SKIN WEIGHT&lt;/b&gt;&lt;br /&gt;
Maybe if you want a totally clean skin weight, you can use something like Dora Skin Weight Export Import:&lt;br /&gt;
&lt;a href=&quot;http://dorayuki.com/doramaya/SkinWeightIE.htm&quot;&gt;http://dorayuki.com/doramaya/SkinWeightIE.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;CONCLUSION&lt;/b&gt;&lt;br /&gt;
It is better to do the Head&amp;nbsp;+ Body Separate Combine before the skinning. But very likely you will find this kind of situation, so Substitute Geometry can be used in this case. I believe the skinning should be perfect, as long the Skinned and Substitute Geometry are almost identical, apart from slight difference in how the topology is created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;b&gt;TRIVIA QUESTION:&lt;/b&gt;&lt;/h2&gt;
Do you know when Maya&#39;s Post Skinning using Capsule (not the Interactive/Classic that we used to do) comes in handy?&lt;br /&gt;
When doing Facial &quot;Muscle&quot; Skinning. But that is for another post, maybe one day.</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/3576639424503167530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2013/05/rigging-when-subsitute-geometry-comes.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/3576639424503167530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/3576639424503167530'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2013/05/rigging-when-subsitute-geometry-comes.html' title='RIGGING / When Subsitute Geometry Comes In Handy'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghiezE_DfRluGDWqWlyeiQvYL-RGQqML0ILYLO9xFlDvArL2DnoJSYnSrt2LfPKmNaekrkIbvJvNcMoj-_5nIID5Cbr1TQwZJiyhpj2M48Qy43lhm6Jg2rDGyknLn7t10lLDf_Eb1FOX0n/s72-c/separateHeadBody_001.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-8953197426309910126</id><published>2013-05-08T02:23:00.001-07:00</published><updated>2013-05-08T02:41:38.815-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mesh"/><category scheme="http://www.blogger.com/atom/ns#" term="skinned"/><category scheme="http://www.blogger.com/atom/ns#" term="transfer"/><category scheme="http://www.blogger.com/atom/ns#" term="uv"/><title type='text'>PYTHON/ Transfer UV into Skinned Mesh </title><content type='html'>This Python script hack I wrote is based on Zeth Willie step-by-step method to cleanly transferring UV into Skinned Mesh:&lt;br /&gt;
&lt;a href=&quot;http://williework.blogspot.com.au/2011/04/technical-cleanly-transferring-uvs-to.html&quot;&gt;http://williework.blogspot.com.au/2011/04/technical-cleanly-transferring-uvs-to.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Direct to Zeth&#39;s video on Vimeo:&lt;br /&gt;
&lt;a href=&quot;https://vimeo.com/21577038&quot;&gt;https://vimeo.com/21577038&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
Basically this is one method to cleanly transfer UV from one mesh into skinned mesh, via the original mesh (before skinning/deformation applied) which usually hidden as Intermediate Object.&lt;br /&gt;
&lt;br /&gt;
I decided to write a script that does it automatically.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: purple;&quot;&gt;PS: I just realized that Zeth has already written the MEL script that does the same thing. And his MEL script has error checking. Well... it&#39;s okey, I guess. Re-writing it in Python and for practise. It&#39;s like when you got puzzle and found out the solution.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
With the script, all you need to do is:&lt;br /&gt;
1. Select mesh with nicely laid out UV (source).&lt;br /&gt;
2. Shift select mesh that is skinned (target).&lt;br /&gt;
3. Run the Python script below (you can copy paste the script into Script Editor)&lt;br /&gt;
&lt;h3 style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bolder; line-height: 19px; margin: 0.83em 0px; padding: 0px; position: relative;&quot;&gt;
MAYA SPIRAL SCRIPT: Quick transfer UV to Skinned Mesh&lt;/h3&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;pre class=&quot;bbcode_code&quot; style=&quot;background-color: #f2f6f8; border-style: inset; border-width: 1px; direction: ltr; height: 160px; overflow: scroll; padding: 6px; text-align: justify;&quot;&gt;&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: 14px; line-height: 17.265625px;&quot;&gt;import maya.cmds as mc
import maya.mel as mel

&#39;&#39;&#39;
Copyright (c) 2013 Jimmy Gunawan
Name: transferUVToIntermediateMesh.py
Version: 1.0
Author: Jimmy Gunawan
Contact: Maya Spiral Blog
Date Created: 8 May 2013

Transfer Attribute (UV) from One Mesh into Skinned Mesh and clean it up.

How to use:
    1. Select the Mesh with nicely layout UV (source)
    2. Then select the Skinned Mesh (target)
    3. Run the script
&#39;&#39;&#39;

# Query selected objects
selected_objects = mc.ls(selection=True)

mesh_source, mesh_target = selected_objects[0], selected_objects[1]

# Usually the original mesh before skinning has been renamed as *Orig
# and hidden
mc.select(mesh_target, replace=True)
mesh_orig = mc.listHistory(&#39;*Orig&#39;)[0]

print &#39;Mesh Source (with UV) :&#39;, mesh_source
print &#39;Mesh Target (skinned mesh):&#39;, mesh_target
print &#39;Mesh Original:&#39;, mesh_orig

# Toggle OFF the Intermediate Object option box
mc.select(mesh_orig, replace=True)
mc.setAttr(&quot;{mesh_orig}.intermediateObject&quot;.format(mesh_orig=mesh_orig), False);
mc.select(clear=True)

# Transfer UV using Transfer Attribute Command
mc.select(mesh_source, replace=True)
mc.select(mesh_orig, toggle=True)

print(&#39;selecting...&#39;, mesh_source, mesh_orig)

mc.transferAttributes(
        transferPositions=False,
        transferNormals=False,
        transferUVs=2,
        transferColors=2,
        sampleSpace=4,
        sourceUvSpace=&quot;map1&quot;,
        targetUvSpace=&quot;map1&quot;,
        searchMethod=3,
        flipUVs=False,
        colorBorders=True
    )


# Delete Construction History of mesh_orig after we transfer the UV information
mc.select(mesh_orig, replace=True)
mc.delete(constructionHistory=True)
mc.select(clear=True)

# Toggle ON the Intermediate Object option box
mc.select(mesh_orig, replace=True)
mc.setAttr(&quot;{mesh_orig}.intermediateObject&quot;.format(mesh_orig=mesh_orig), True);
mc.select(clear=True)

# Return the selections as it was selected by user
mc.select(mesh_source, replace=True)
mc.select(mesh_target, toggle=True)

# Process complete
mel.eval(&#39;print (&quot;RESULT: UV successfully transferred to skinned mesh, you are welcome.&quot;)&#39;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin: 0px; outline: none; padding: 0px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin: 0px; outline: none; padding: 0px; text-align: justify;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: xx-small; line-height: normal; text-align: start;&quot;&gt;NOTE: My script is not perfect, because there are some hard coded thing (searching &quot;orig&quot;). I will probably improve it in a bit. &amp;nbsp;&lt;/span&gt;Use Zeth&#39;s MEL script if in doubt.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/8953197426309910126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2013/05/python-hack-transfer-uv-into-skinned.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/8953197426309910126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/8953197426309910126'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2013/05/python-hack-transfer-uv-into-skinned.html' title='PYTHON/ Transfer UV into Skinned Mesh '/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-7305362755737974591</id><published>2013-05-07T21:33:00.000-07:00</published><updated>2013-05-08T00:46:56.962-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="exporter"/><category scheme="http://www.blogger.com/atom/ns#" term="obj"/><category scheme="http://www.blogger.com/atom/ns#" term="obj exporter"/><title type='text'>RANTS / Maya OBJ Exporter Is Broken</title><content type='html'>I am working on a project involving OBJ format export-import with some mapping for some kind of realtime environment. Currently I am using Maya 2013.&lt;br /&gt;
&lt;br /&gt;
Today, I just realized how &quot;broken&quot; Maya OBJ Exporter actually is. This is very strange, but has it always been broken? I know OBJ is an old format, but I expect it to be able to export and import mesh with color map, transparency map, reflectivity map, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;INSIDE MAYA 3D Viewport 2.0&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6YDemYzuF_Br8f9kNpKPMHNf4r-1jcAoE_zDNEhapHPwZWVhNo-ex3o8pZj8MHPqA46hhNajDxZ7mHVm1EfS-J_T8y5dNFmQxtzoDrzeGKk3A3x6YDBiUGvKSY50C42uJ_wcU_NHJRNl4/s1600/objexport_001.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;539&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6YDemYzuF_Br8f9kNpKPMHNf4r-1jcAoE_zDNEhapHPwZWVhNo-ex3o8pZj8MHPqA46hhNajDxZ7mHVm1EfS-J_T8y5dNFmQxtzoDrzeGKk3A3x6YDBiUGvKSY50C42uJ_wcU_NHJRNl4/s640/objexport_001.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Viewport 2.0 is nice that it is able to display all those textures as Bump, Specular, Transparency, Reflectivity in 3D viewport.&lt;br /&gt;
&lt;br /&gt;
The Material looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGmB2cRhlZnOp8ZcieOPLaEPZZyaZ9QvqptMvW0ALt4DeaNClaPHpUsnmXzwccrr96UevvIHtaFA8Dqi0OdZX1ySlCBRbh91jyAr2gHFmmWyb5v2KACGUoDl4mA5nAYaKYOPgoPUJ92a2D/s1600/objexport_002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGmB2cRhlZnOp8ZcieOPLaEPZZyaZ9QvqptMvW0ALt4DeaNClaPHpUsnmXzwccrr96UevvIHtaFA8Dqi0OdZX1ySlCBRbh91jyAr2gHFmmWyb5v2KACGUoDl4mA5nAYaKYOPgoPUJ92a2D/s1600/objexport_002.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Color Map&lt;/li&gt;
&lt;li&gt;Specular Map&lt;/li&gt;
&lt;li&gt;Transparency Map&lt;/li&gt;
&lt;li&gt;Bump Map&lt;/li&gt;
&lt;li&gt;Reflectivity Map&lt;/li&gt;
&lt;li&gt;Reflected Color Map (Environment Cube with 6 textures)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;OBJ EXPORTED FROM MAYA&lt;/b&gt;&lt;br /&gt;
Now, I export out the mesh as OBJ. It should export the mesh OBJ and includes the Material MTL file format, which I expected to export all the OBJ plus the textures.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEd1nccPpp5GQqqI8DZKwzJQ0LJzRD6wr7y1ffG5mTOew1wjKNiOXa_FZ1KBhDkEwH9aPojtzyqh4qBg2jgdKkiJeTn36j2ketNjt2dorF2q8rvfU8QdlWLLLYZQOJDSlcUQqoJhxvU0aq/s1600/objexport_006.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEd1nccPpp5GQqqI8DZKwzJQ0LJzRD6wr7y1ffG5mTOew1wjKNiOXa_FZ1KBhDkEwH9aPojtzyqh4qBg2jgdKkiJeTn36j2ketNjt2dorF2q8rvfU8QdlWLLLYZQOJDSlcUQqoJhxvU0aq/s1600/objexport_006.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;OBJ IMPORTED BACK INTO MAYA&lt;/b&gt;&lt;br /&gt;
This is the resulting mesh when imported back into Maya.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJr4yJU8XuV8mhHrbngK70J9wNCmUWIO3n7vKuMc0_eUQ9tXemMOzkC0vMX4PSHk-ZbPpeImpqcKvulVHoFhd0Jj1UxLPDihvD4GLOZLMq7_4saopAYTv2fKJOjj_c5YtCubQZ-PrMVzxc/s1600/objexport_003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;310&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJr4yJU8XuV8mhHrbngK70J9wNCmUWIO3n7vKuMc0_eUQ9tXemMOzkC0vMX4PSHk-ZbPpeImpqcKvulVHoFhd0Jj1UxLPDihvD4GLOZLMq7_4saopAYTv2fKJOjj_c5YtCubQZ-PrMVzxc/s640/objexport_003.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Bump Map link is broken&lt;/li&gt;
&lt;li&gt;Environment Cube is mapped into Reflectivity Map, instead of Reflected Color Map&lt;/li&gt;
&lt;li&gt;Transparency Map is broken&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Further checking into the MTL file, it does not seem to be correct.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoI97VlAk5mbiRVrDYbA8PConz1SUMrMoNx3fHeSTGzGDeaCe-y2YyIof487NGbGtQbWS50LnUICdUNRyKP93l8lLUGkiEUIQfI7jxTOGGSnEGYBBJzPafxhQqgeeDPy_wZTzlzy4jXNeJ/s1600/objexport_004.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;499&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgoI97VlAk5mbiRVrDYbA8PConz1SUMrMoNx3fHeSTGzGDeaCe-y2YyIof487NGbGtQbWS50LnUICdUNRyKP93l8lLUGkiEUIQfI7jxTOGGSnEGYBBJzPafxhQqgeeDPy_wZTzlzy4jXNeJ/s640/objexport_004.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;FIX: BUMP MAP&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I think the one that is the most confusing and weird is the bump map:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWDP1ewwt4wehgyHE_mCVLJM-Hq6nlFRniQBqRXBqGMJDrJrV5kmJSy2YSEuuw0SMF1-Tbas_KjYoNzrX398GFYxrayT_dupmo8VWZCtbAget-L12Yt2Cp6jyeb6J7YTu2g4C9QkcOKvb5/s1600/objexport_005.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWDP1ewwt4wehgyHE_mCVLJM-Hq6nlFRniQBqRXBqGMJDrJrV5kmJSy2YSEuuw0SMF1-Tbas_KjYoNzrX398GFYxrayT_dupmo8VWZCtbAget-L12Yt2Cp6jyeb6J7YTu2g4C9QkcOKvb5/s1600/objexport_005.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Maya seems to read the OBJ incorrectly, reading the last value, instead of the file name:&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;bump pPlaneShape1_normalCamera.png -bm 1&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
To fix the bump, one needs to manually do that inside Maya or edit that line in MTL.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;bump -bm 1&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;pPlaneShape1_normalCamera.png&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
I was reading the OBJ MTL specifications:&lt;br /&gt;
&lt;a href=&quot;http://paulbourke.net/dataformats/mtl/&quot;&gt;http://paulbourke.net/dataformats/mtl/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;font-family: Courier, monospace; font-size: small; line-height: 15px;&quot;&gt; -bm mult
 
 The -bm option specifies a bump multiplier.  You can use it only with 
the &quot;bump&quot; statement.  Values stored with the texture or procedural 
texture file are multiplied by this value before they are applied to the 
surface.
 
 &quot;mult&quot; is the value for the bump multiplier.  It can be positive or 
negative.  Extreme bump multipliers may cause odd visual results because 
only the surface normal is perturbed and the surface position does not 
change.  For best results, use values between 0 and 1.&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
The Bump Map will then correctly applied into the Mesh Material when the OBJ is exported.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;FIX: REFLECTIVITY MAP AND REFLECTED COLOR MAP&lt;/b&gt;&lt;br /&gt;
Then, there is this Reflectivity Map and Reflected Color Map that OBJ does not seem to understand. The Environment Cube get plugged into the wrong slot. This is also quite strange.&lt;br /&gt;
&lt;br /&gt;
I believe OBJ supports it, but maybe the implementation has changed and this has become obsolete.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;FIX: TRANSPARENCY MAP&lt;/b&gt;&lt;br /&gt;
Transparency map is not transferring, the texture map got ignored. Wonder if this is Maya thing or OBJ limitation. Anyhow to fix this manually, we have to make sure that&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Transparency Map File.outColor --&amp;gt; Material.transparency&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Sometimes Maya got it wrong where it will plug it in like below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Transparency Map File.transparency --&amp;gt; Material.transparency&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Be careful with this.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;STRANGE ERROR, RIGHT?&lt;/b&gt;&lt;br /&gt;
So, I am wondering if this is a well-known error? I learn that this day FBX is the common format to transfer file. But I still find this to be quite annoying. OBJ is such a simple format, yet, it does not export and import properly. Such a small easy thing to fix that never gets fix is the one that annoys me a lot.&lt;br /&gt;
&lt;br /&gt;
I checked with Maya 2010, apparently the error has been there since many years ago. Wonder why no one is fixing it? Did it get fix in 2014? Or next version of Maya? I bet it does not. If this is a bug Blender, it will get fix the same day.&lt;br /&gt;
&lt;br /&gt;
This makes me wonder which 3D software out there that actually does OBJ the right way? 3DSMax? XSI?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;THE ALTERNATIVE&lt;/b&gt;&lt;br /&gt;
It is kind of sad to think that OBJ is seems to be forgotten format. OBJ is still the simplest format I could think of to export import generic mesh, since Maya 4.5.&lt;br /&gt;
&lt;br /&gt;
Best alternative apart from FBX is probably DAE Collada. Or maybe just Python.&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/7305362755737974591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2013/05/rants-maya-obj-exporter-is-broken.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/7305362755737974591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/7305362755737974591'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2013/05/rants-maya-obj-exporter-is-broken.html' title='RANTS / Maya OBJ Exporter Is Broken'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6YDemYzuF_Br8f9kNpKPMHNf4r-1jcAoE_zDNEhapHPwZWVhNo-ex3o8pZj8MHPqA46hhNajDxZ7mHVm1EfS-J_T8y5dNFmQxtzoDrzeGKk3A3x6YDBiUGvKSY50C42uJ_wcU_NHJRNl4/s72-c/objexport_001.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-3685156347297694011</id><published>2013-05-06T19:31:00.002-07:00</published><updated>2013-05-08T02:43:08.103-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="file dialog"/><category scheme="http://www.blogger.com/atom/ns#" term="maya"/><category scheme="http://www.blogger.com/atom/ns#" term="slow"/><title type='text'>RANTS / The Slow Maya File Dialog</title><content type='html'>In Maya, don&#39;t you just &quot;love&quot; (read: &quot;hate&quot;) it when you press Ctrl+S (or accidentally calling open dialog while pressing Ctrl+C in Script Editor) and Maya is frozen for 10-15 seconds?&lt;br /&gt;
&lt;br /&gt;
Yes, I understand your feeling. I am wondering how many hundred of hours productivity time has lost while working in Maya when one tries to &lt;b&gt;File-Open&lt;/b&gt; or &lt;b&gt;File-Save As&lt;/b&gt; or &lt;b&gt;File - Set Project&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
This really has got to stop, for good.&lt;br /&gt;
&lt;br /&gt;
This Maya bug might be &quot;Windows only&quot; issue, although perhaps Mac or Linux has its own problem similar to this.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SOLUTION: DISABLE FLOPPY DRIVE(!)&lt;/b&gt;&lt;br /&gt;
Apparently the culprit is Floppy Drive that Maya tries to read while opening File Dialog Box:&lt;br /&gt;
&lt;a href=&quot;http://simplymaya.com/forum/showthread.php?t=37841&quot;&gt;http://simplymaya.com/forum/showthread.php?t=37841&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
So, if you Disable the Floppy Drive under Device Manager, the File Dialog Box in Maya is faster.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhdBIPiZSrZVfKeaLZ7xRh_B38YwUZSIzMS8BliyeIpeVbnflZL74BRtyQ9Jy6cF9NQMGuANc6Kv-aFHw5jOFHhw_K13up9ugZSabdHo64Fi0OJlzCMQitHtoVGFdw_-cIDLl58Ydsumln/s1600/PrtScr+capture.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;481&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhdBIPiZSrZVfKeaLZ7xRh_B38YwUZSIzMS8BliyeIpeVbnflZL74BRtyQ9Jy6cF9NQMGuANc6Kv-aFHw5jOFHhw_K13up9ugZSabdHo64Fi0OJlzCMQitHtoVGFdw_-cIDLl58Ydsumln/s640/PrtScr+capture.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
But, even so, Maya File Open dialog is still amazingly slow.&lt;br /&gt;
&lt;br /&gt;
If I just wanted to quickly open a scene or set a project, I honestly do not &amp;nbsp;always want to go through File Dialog Box. I just want to click and done with.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;USE PYTHON TO OPEN, SAVE AND SET PROJECT MAYBE?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I am pretty sure every good studio using Maya has way to save file using naming convention that is not using Maya File Dialog Box native.&lt;br /&gt;
&lt;br /&gt;
Anyways, for freelancers working at home, maybe it is good idea to look for script that properly does Open, Save, and Set Project; Better than Maya&#39;s own built in.&lt;br /&gt;
&lt;br /&gt;
I decided to explore this a little bit more while getting use to Python in Maya.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;NOTE:&lt;/b&gt;&lt;br /&gt;
I am using Windows and I need to check this script in Mac. But I think Maya MEL and Python to open file is &quot;clever&quot; enough to handle forward slash, backward slash, and double slash.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;In Windows you can &lt;b&gt;Shift+Enter&lt;/b&gt;&amp;nbsp;on a file to Copy Path.&lt;/li&gt;
&lt;li&gt;To my student: do not drag and drop file into Maya, please. It will import, instead of properly opening the file.&lt;/li&gt;
&lt;li&gt;Since I am using PC, there is this &quot;Everything Search Engine&quot; that can search file in Windows with flashing speed, I usually use this to get the full File Path of a certain file.&lt;br /&gt;&lt;a href=&quot;http://www.voidtools.com/&quot;&gt;http://www.voidtools.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bolder; line-height: 19px; margin: 0.83em 0px; padding: 0px; position: relative;&quot;&gt;
MAYA SPIRAL SCRIPT: Quick Open File (no input dialog)&lt;/h3&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;pre class=&quot;bbcode_code&quot; style=&quot;background-color: #f2f6f8; border-style: inset; border-width: 1px; direction: ltr; height: 160px; overflow: scroll; padding: 6px;&quot;&gt;&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17.265625px;&quot;&gt;&quot;&quot;&quot;
Copyright (c) 2013 Jimmy Gunawan
Name: mayaOpenSceneHack.py
Version: 1.0
Author: Jimmy Gunawan
Contact: Maya Spiral Blog
Date Created: 2013.05.07
Function:
To quickly open a file into path using Python instead of having to use Maya slow File Dialog.
How to Use:
Copy paste the exact file path into filepath input
&quot;&quot;&quot;

import maya.cmds as mc
import maya.mel as mel

def fileOpenHack(filepath = &quot;C:\Users\Jimmy\Documents\maya\projects\slyfox\scenes\slyfox.mb&quot;):

    # (Windows Backward Slash is seriously a pain... but gotta live with it)
    # Replace Backslash with Double Backslash in Python
    filepath = filepath.replace(&quot;\\&quot;, &quot;\\\\&quot;)

    # Quick force open document
    mc.file(filepath, force=True, open=True)

    # scene file type string declaration
    # sorry hardcoded, will code proper validation in the future
    scenefile_type = &#39;mayaBinary&#39;

    # Now we use MEL addRecentFile command
    mel.eval(&#39;$filepath = &quot;{filepath}&quot;;&#39;.format(filepath=filepath))
    mel.eval(&#39;addRecentFile $filepath &quot;{scenefile_type}&quot;;&#39;.format(scenefile_type=scenefile_type))

fileOpenHack(&quot;C:\Users\Jimmy\Documents\maya\projects\slyfox\scenes\slyfox_002.mb&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/pre&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;h3 style=&quot;font-size: 14px; font-weight: bolder; line-height: 19px; margin: 0.83em 0px; padding: 0px; position: relative;&quot;&gt;
MAYA SPIRAL SCRIPT: Quick Open File With Input Dialog&lt;/h3&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;pre class=&quot;bbcode_code&quot; style=&quot;background-color: #f2f6f8; border-style: inset; border-width: 1px; direction: ltr; height: 160px; overflow: scroll; padding: 6px;&quot;&gt;&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;line-height: 17.265625px;&quot;&gt;&quot;&quot;&quot;
Copyright (c) 2013 Jimmy Gunawan
Name: mayaOpenSceneHackWithInputDialog.py
Version: 1.0
Author: Jimmy Gunawan
Contact: Maya Spiral Blog
Date Created: 2013.05.07
Function:
To quickly open a file into path using Python instead of having to use Maya slow File Dialog.

&quot;&quot;&quot;

import maya.cmds as mc
import maya.mel as mel

def fileOpenHack():

    result = mc.promptDialog(
            title=&#39;Quick Open Scene&#39;,
            message=&#39;Paste full scene path below:&#39;,
            button=[&#39;OK&#39;, &#39;Cancel&#39;],
            defaultButton=&#39;OK&#39;,
            cancelButton=&#39;Cancel&#39;,
            dismissString=&#39;Cancel&#39;)
    if result == &#39;OK&#39;:
        filepath = mc.promptDialog(query=True, text=True)

        # (Windows Backward Slash is seriously a pain... but gotta live with it)
        # Replace Backslash with Double Backslash in Python
        filepath = filepath.replace(&quot;\\&quot;, &quot;\\\\&quot;)

        # Quick force open document
        mc.file(filepath, force=True, open=True)

        # scene file type string declaration
        # sorry hardcoded, will code proper validation in the future
        scenefile_type = &#39;mayaBinary&#39;

        # Now we use MEL addRecentFile command
        mel.eval(&#39;$filepath = &quot;{filepath}&quot;;&#39;.format(filepath=filepath))
        mel.eval(&#39;addRecentFile $filepath &quot;{scenefile_type}&quot;;&#39;.format(scenefile_type=scenefile_type))

fileOpenHack()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/pre&gt;
&lt;div style=&quot;font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Times New Roman&#39;; font-size: small; line-height: normal;&quot;&gt;For setting project, Maya MEL provides &lt;b&gt;setProject&lt;/b&gt; command. So, you could do something like this:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;setProject &quot;C:/Users/Jimmy/VIZYACKY&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; margin: 0px; outline: none; padding: 0px;&quot;&gt;
That&#39;s fine and dandy, but in Windows, remember how we have backslash? And we need to do do this:&lt;/div&gt;
&lt;div style=&quot;background-color: white; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;setProject &quot;C:\\Users\\Jimmy\\VIZYACKY&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; margin: 0px; outline: none; padding: 0px;&quot;&gt;
A little bit annoying, but just something to keep in mind. You can save that into the Maya Shelf if you just want to quickly set project.&lt;/div&gt;
&lt;div style=&quot;background-color: white; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;h3 style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bolder; line-height: 19px; margin: 0.83em 0px; padding: 0px; position: relative;&quot;&gt;
MAYA SPIRAL SCRIPT: Quick Set Project With Input Dialog&lt;/h3&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;pre class=&quot;bbcode_code&quot; style=&quot;background-color: #f2f6f8; border-style: inset; border-width: 1px; direction: ltr; height: 160px; overflow: scroll; padding: 6px;&quot;&gt;&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17.265625px;&quot;&gt;&quot;&quot;&quot;
Copyright (c) 2013 Jimmy Gunawan
Name: mayaSetProjectHack.py
Version: 1.0
Author: Jimmy Gunawan
Contact: Maya Spiral Blog
Date Created: 2013.05.07
Function:
To quickly set project with specified path
&quot;&quot;&quot;

import maya.cmds as mc
import maya.mel as mel

def setProjectHackWithDialog():

    result = mc.promptDialog(
            title=&#39;Quick Set Project&#39;,
            message=&#39;Project Path:&#39;,
            button=[&#39;OK&#39;, &#39;Cancel&#39;],
            defaultButton=&#39;OK&#39;,
            cancelButton=&#39;Cancel&#39;,
            dismissString=&#39;Cancel&#39;)
    if result == &#39;OK&#39;:

        # Get current working directory
        current_project_path = mc.workspace( query=True, rootDirectory=True )
        print(&quot;Current Project Path:&quot;, current_project_path)

        # Get user input new project path

        if not mc.promptDialog(query=True, text=True):
            new_project_path = &#39;C:\Users\Jimmy\Documents\maya\projects\default&#39;
        else:
            new_project_path = mc.promptDialog(query=True, text=True)
        print(&quot;New Project Path:&quot;, new_project_path)

        # Replace Backslash with Double Backslash in Python
        new_project_path = new_project_path.replace(&quot;\\&quot;, &quot;\\\\&quot;)

        # mc.workspace( new_project_path, openWorkspace=True )

        mel.eval(&#39;setProject &quot;{new_project_path}&quot;;&#39;.format(new_project_path=new_project_path))

setProjectHackWithDialog()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: black; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: normal;&quot;&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;line-height: 17.265625px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;WHAT I HAVE LEARNED&lt;/b&gt;&lt;br /&gt;
While learning to write code properly, I found it very interesting how even such a simply thing to code requires a lot of error checking and validation.&lt;br /&gt;
&lt;br /&gt;
And solutions are around too.Plenty of solutions for one small problem.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;OTHER REFERENCE AND RELATED LINKS&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.scriptswell.net/2010/09/mel-jgincrementalsavemel-increment-your.html&quot;&gt;http://www.scriptswell.net/2010/09/mel-jgincrementalsavemel-increment-your.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://forums.cgsociety.org/archive/index.php/t-722070.html&quot;&gt;http://forums.cgsociety.org/archive/index.php/t-722070.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.mail-archive.com/python_inside_maya@googlegroups.com/msg01057.html&quot;&gt;http://www.mail-archive.com/python_inside_maya@googlegroups.com/msg01057.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://pastebin.com/23UrwX9N&quot;&gt;http://pastebin.com/23UrwX9N&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://forums.cgsociety.org/archive/index.php/t-976132.html&quot;&gt;http://forums.cgsociety.org/archive/index.php/t-976132.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://ewertb.soundlinker.com/mel/mel.034.php&quot;&gt;http://ewertb.soundlinker.com/mel/mel.034.php&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://forums.cgsociety.org/archive/index.php/t-270636.html&quot;&gt;http://forums.cgsociety.org/archive/index.php/t-270636.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://area.autodesk.com/forum/autodesk-maya/python/project-directory-with-python/&quot;&gt;http://area.autodesk.com/forum/autodesk-maya/python/project-directory-with-python/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://forums.cgsociety.org/archive/index.php/t-968015.html&quot;&gt;http://forums.cgsociety.org/archive/index.php/t-968015.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/3685156347297694011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2013/05/rants-slow-maya-file-dialog.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/3685156347297694011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/3685156347297694011'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2013/05/rants-slow-maya-file-dialog.html' title='RANTS / The Slow Maya File Dialog'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhdBIPiZSrZVfKeaLZ7xRh_B38YwUZSIzMS8BliyeIpeVbnflZL74BRtyQ9Jy6cF9NQMGuANc6Kv-aFHw5jOFHhw_K13up9ugZSabdHo64Fi0OJlzCMQitHtoVGFdw_-cIDLl58Ydsumln/s72-c/PrtScr+capture.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-4878029851865591561</id><published>2013-04-17T17:49:00.001-07:00</published><updated>2013-04-17T21:36:21.699-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="blender"/><category scheme="http://www.blogger.com/atom/ns#" term="bullet"/><category scheme="http://www.blogger.com/atom/ns#" term="colorpervertex"/><category scheme="http://www.blogger.com/atom/ns#" term="mentalray"/><category scheme="http://www.blogger.com/atom/ns#" term="rgbpp"/><category scheme="http://www.blogger.com/atom/ns#" term="vertexcolor"/><title type='text'>PYTHON / Getting Particle RGBPP And Apply The Color To Object</title><content type='html'>&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjheeLf5c7QOYOrV1Q8myTSGkVmrTADt2W-YXZ1D-ej00dp6wilGDE2uNeWfsXAwSi4cEc3SxjCLyaz-0YvExMnI062zKdLruicAOEnb1LeoZy7E4SFBbOlxYULtPw-ftpQgnyf74jJ9uy/s1600/PrtScr+capture_3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjheeLf5c7QOYOrV1Q8myTSGkVmrTADt2W-YXZ1D-ej00dp6wilGDE2uNeWfsXAwSi4cEc3SxjCLyaz-0YvExMnI062zKdLruicAOEnb1LeoZy7E4SFBbOlxYULtPw-ftpQgnyf74jJ9uy/s640/PrtScr+capture_3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Maya Particles &amp;gt;&amp;gt; Blender Bullet&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Have you ever wanted to get color value from Particles and pass it into objects (hopefully passing color to their Instances)?&lt;br /&gt;
&lt;br /&gt;
Well, this is kind of task that supposed to be made a lot simpler and straightforward, but unfortunately it is really not simple.&lt;br /&gt;
&lt;br /&gt;
It&#39;s a recurring topic and I am thinking to explore this area and maybe expanding it further each time.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;REQUIREMENTS&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;maya.cmds.particle()&lt;/li&gt;
&lt;li&gt;maya.cmds.polyColorPerVertex()&lt;/li&gt;
&lt;li&gt;Mental Ray Vertex Colors node&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;IF USING RENDERMAN AND SOUP&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
If we are using Renderman and Maya SOuP plugin, I remember that we already can do this and it is pretty much procedural.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We will be relying on Mental Ray for this. It is a pain, but what can we do, it is Maya. Maya Software used to be able to render Vertex Color. Not anymore since recent version. It&#39;s dumb.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;IF USING PYTHON AND MENTAL RAY&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
I want to attempt to just doodle in Python and do something simple, such as creating some Polygon boxes and place each boxes at the position of Particles at the current frame, and then Colorize each boxes based on the corresponding Particles.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is actually really another EASY task, logically. We simply getting and passing on data/value from one object to another. In Maya, this is not always so obvious or clear.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Can we query World Position of particular Particles (based on ID or component)?&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Yes, sure we can.&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mc.xform(&#39;particle1.pt[2461]&#39;, query=True, translation=True)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Can we query RGB PP of particular Particles (based on ID or component)?&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Yes.&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mc.particle( &#39;particle1&#39;, query=True, attribute=&#39;rgbPP&#39;, id=2461 )&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Can we Apply Color to object?&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Yes. For selected object(s), we can just run the Maya commands below.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;mc.polyColorPerVertex(r=redVal, g=greenVal, b=blueVal, a=1, colorDisplayOption=True)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In this case, I will just use Maya Vertex Color (Color-Apply Color). I don&#39;t want to Apply Color directly to diffuse of Material, because imagine if we have millions of objects, we will end up with unmanageable Shaders. We will be using Mental Ray Vertex Color Node in order to pass the color into the shader.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So, I guess the rest will be EASY then? Yes, actually. All we need to do is to LOOP and get every values we need and then apply it somewhat to our objects.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Let&#39;s do it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;PASSING RGBPP AND PARTICLE POSITION INTO OBJECTS&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
1. Create Particles which Color RGBPP inherited from Texture.&lt;/div&gt;
&lt;div&gt;
We should have this kind of knowledge of Particles, if you don&#39;t, you simply learn that first from Luis Pages Maya Open Source VFX Learning. Maya Dynamics 1, Week 2:&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.vfxlearning.com/videos/opensource&quot;&gt;http://www.vfxlearning.com/videos/opensource&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
(Make sure you donate!)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Anyways, let say we already have the Particles setup to emit from Textures and with color like below:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifLmbXmS32HImCRYvJi8xQK9RPOvhAq6uPISuRN-RxizFQJk5WUKZcsrbGvf993RS7mLmb8T-j9nKH4BzneSJHmI66LlCIenTOP_zxzWKY0tX99BNV7WStKlJAsWR07HhWcoVerpLHvtdR/s1600/pythonParticle_001.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;265&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifLmbXmS32HImCRYvJi8xQK9RPOvhAq6uPISuRN-RxizFQJk5WUKZcsrbGvf993RS7mLmb8T-j9nKH4BzneSJHmI66LlCIenTOP_zxzWKY0tX99BNV7WStKlJAsWR07HhWcoVerpLHvtdR/s320/pythonParticle_001.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I am using Ramp and passing the Ramp texture into Particle RGBPP.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
2. Query the COLOR and POSITION of every particles RGB PP and print it out.&lt;/div&gt;
&lt;div&gt;
We want to loop over each and every particles. To do so, we need to know the &lt;b&gt;Total Number of Particles&lt;/b&gt; beforehand.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;totalParticle = mc.particle( &#39;particle1&#39;, query=True, count=True)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;print(totalParticle)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Knowing the total number of Particles at the current frame, we can then iterate through every Particle via its Particle ID and get any attributes we like. In our case, we want World Position and Color.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;for (id) in range(totalParticle):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # Query and print Particle position&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; myPos = mc.xform(&#39;particle1.pt[{id}]&#39;.format(id=id), query=True, translation=True)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # Query and print Particle Color RGBPP&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; myColor = mc.particle( &#39;particle1&#39;, query=True, attribute=&#39;rgbPP&#39;, id=id )&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; print &#39;Particle ID&#39;, id, &#39;Position:&#39;, myPos, &#39;Color:&#39;, myColor&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
That prints out the list of values we need. Position and RGBPP.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
All we need to do is to iterate and ask Maya what to do with them. I am still learning on how to efficiently use the data in the fastest way in Python. Sometimes if we don&#39;t know Python well enough, we might do unnecessary thing like creating big list of data which will slow down the process. Python can be a little faster if we code properly.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
3. Create bunch of Cubes with Position and RGBPP from Particles&lt;/div&gt;
&lt;div&gt;
This is pretty straightforward, we will just put all the code above into one&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;import maya.cmds as mc&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# get Total Number of Particles&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;totalParticle = mc.particle( &#39;particle1&#39;, query=True, count=True)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#myRGBval = mc.getAttr(&#39;particle1.pt[2461].rgbPP&#39;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Size of cube we will create for each Particle&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;cubeSize = 0.5&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;for (id) in range(totalParticle):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # Query and print Particle position&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; myPos = mc.xform(&#39;particle1.pt[{id}]&#39;.format(id=id), query=True, translation=True, worldSpace=True)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # Query and print Particle Color RGBPP&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; redVal, greenVal, blueVal = mc.particle( &#39;particle1&#39;, query=True, attribute=&#39;rgbPP&#39;, id=id )&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; #print &#39;Particle ID&#39;, id, &#39;Position:&#39;, myPos, &#39;Color:&#39;, myColor&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # Create Cube and Assign Cube Color based on queried Particle ID (color and position)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; myCube = mc.polyCube (constructionHistory=False, object=True, width=cubeSize, height=cubeSize, depth=cubeSize, createUVs=4)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; mc.xform(myCube, translation=myPos, worldSpace=True)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; mc.polyColorPerVertex(r=redVal, g=greenVal, b=blueVal, a=1, colorDisplayOption=True)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
That will do the dirty job. Watch the number of objects being created though.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_B4NVt7iKdtmBohBgron3nYjiQFqXGoANSwZeTjujL01mdho9N3egVByvZ1PZvBDk0EDKxmOum8AkJpeQP4Bfdw150Xm-7WjFkM7ijKsN-diZ0xYBVOumo51ZrzY7zXj2hYKM5RKXUziu/s1600/pythonParticle_002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;511&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_B4NVt7iKdtmBohBgron3nYjiQFqXGoANSwZeTjujL01mdho9N3egVByvZ1PZvBDk0EDKxmOum8AkJpeQP4Bfdw150Xm-7WjFkM7ijKsN-diZ0xYBVOumo51ZrzY7zXj2hYKM5RKXUziu/s640/pythonParticle_002.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Turning that into a function:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;def cubifyParticles(cubeSize = 0.5):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # get Total Number of Particles&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; totalParticle = mc.particle( &#39;particle1&#39;, query=True, count=True)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; #myRGBval = mc.getAttr(&#39;particle1.pt[2461].rgbPP&#39;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; for (id) in range(totalParticle):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Query and print Particle position&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myPos = mc.xform(&#39;particle1.pt[{id}]&#39;.format(id=id), query=True, translation=True, worldSpace=True)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Query and print Particle Color RGBPP&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; redVal, greenVal, blueVal = mc.particle( &#39;particle1&#39;, query=True, attribute=&#39;rgbPP&#39;, id=id )&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #print &#39;Particle ID&#39;, id, &#39;Position:&#39;, myPos, &#39;Color:&#39;, myColor&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Create Cube and Assign Cube Color based on queried Particle ID (color and position)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myCube = mc.polyCube (constructionHistory=False, object=True, width=cubeSize, height=cubeSize, depth=cubeSize, createUVs=4)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mc.xform(myCube, translation=myPos, worldSpace=True)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mc.polyColorPerVertex(r=redVal, g=greenVal, b=blueVal, a=1, colorDisplayOption=True)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;NOTE: For script above, make sure particle1 node is exist.&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;RENDERING OUT VERTEX COLOR&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Now, above, I am actually colorizing the Cubes using Vertex Color. And since Maya Software is dumb and cannot render the Vertex Color automatically we must use Mental Ray Vertex Color node.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We could bake the color as Texture, maybe that is kind of efficient and then Maya Software can render, but then it looks ugly anyway, unless properly lit.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Maya Hardware.... will render the Vertex Color alright.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
With Mental Ray, we need to do some plugging.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The idea is like this:&lt;/div&gt;
&lt;div&gt;
1. We just want to use 1 Shader only for all cubes.&lt;/div&gt;
&lt;div&gt;
2. We create Mental Ray Vertex Color node.&lt;/div&gt;
&lt;div&gt;
3. Create the required connection.&lt;/div&gt;
&lt;div&gt;
4. Render.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The thing is, Mental Ray Vertex Color node required Color Set Input connection from each and every mesh objects. For that example above, I have around 3000 cubes created from Particles. We cannot do manual connection, that will be waste of time.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The quick dirty way is: to combine all the Cube meshes and then so we have only 1 mesh Vertex Color Input to plug. And Mental Ray will render it fine.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8Ap9aHC4bTV2pJUJUD74i8rwJd-tA2XPkqdFQ3ihJxEE5JHbxnWsNxsQBIO7Ndnzgvq_irGTOIaXRoyX9xMDVqpVAIShq_BfCscnEILvUB_pNCqDjEi3Xn96eOBvtbSqvYWhFHeWvKyTF/s1600/pythonParticle_003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8Ap9aHC4bTV2pJUJUD74i8rwJd-tA2XPkqdFQ3ihJxEE5JHbxnWsNxsQBIO7Ndnzgvq_irGTOIaXRoyX9xMDVqpVAIShq_BfCscnEILvUB_pNCqDjEi3Xn96eOBvtbSqvYWhFHeWvKyTF/s1600/pythonParticle_003.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is really ok if our Cube is supposed to be a single mesh and static.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPFeRc9YoC742Uda1Lu4CbA0gK_8-eRV2qVniK2BRfSXLQMETdiDvxP2VC7bqWypMy3IuAIcV3AslTXXFIIBIuppf3ETqa3uQUEQDn3UBhpfvA6kvaGqgY55Zq3v2RogWhASVgIEhQYujw/s1600/pythonParticle_004.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPFeRc9YoC742Uda1Lu4CbA0gK_8-eRV2qVniK2BRfSXLQMETdiDvxP2VC7bqWypMy3IuAIcV3AslTXXFIIBIuppf3ETqa3uQUEQDn3UBhpfvA6kvaGqgY55Zq3v2RogWhASVgIEhQYujw/s1600/pythonParticle_004.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Even combined mesh can be cool as Maya like it. We can use nCloth and then do some fancy dynamics to it... oh wait.. Maya will get rid of Color Set when we convert Polygon into nCloth... that is silly. Forget it.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Not even the Maya Bullet can handle 3000 cubes. Maybe it&#39;s my RAM needed upgrade, but Blender Bullet can handle 3000 objects.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Forget the dynamics for now.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
However, a better way if we did not want to combine the cubes, is to connect the Array of Color Set Name Inputs from Cubes into Mental Ray Vertex Color node using Python as well.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;def forceConnectColorName():&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; myList = mc.ls(selection=True, long=True)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; for num, item in enumerate(myList):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shape = mc.listRelatives(item, fullPath=True, shapes=True)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mc.connectAttr(&quot;{shape}.colorSet[0].colorName&quot;.format(shape=shape[0]), &quot;mentalrayVertexColors1.cpvSets[{num}]&quot;.format(num=num), force=True)&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;NOTE: For script above, make sure mentalrayVertexColors1 node is exist.&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
By connecting it like that, Maya can then render each Cube with vertex color happily.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdpkQu5FTUPperV1sv3A6zXj7sWBPHdnGh57virF9ODVd_MEy-NYepmruWiNpHUFUXAENMljo5JiA5hqQG3ZdtcdAcvnNT9gXBid_T7NBdhL6CaO5h8cCCsdl_xW0eUdhFFW1TgUNuQlGO/s1600/pythonParticle_005.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdpkQu5FTUPperV1sv3A6zXj7sWBPHdnGh57virF9ODVd_MEy-NYepmruWiNpHUFUXAENMljo5JiA5hqQG3ZdtcdAcvnNT9gXBid_T7NBdhL6CaO5h8cCCsdl_xW0eUdhFFW1TgUNuQlGO/s1600/pythonParticle_005.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In regard to passing color from Particles to &quot;Instances&quot;, that will be for next blog post.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;### FINAL SCRIPT: To be refined overtime ###&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;import maya.cmds as mc&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# select -r particle1.pt[2461] ;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;def cubifyParticles(cubeSize = 0.5, particleNode=&#39;particle1&#39;):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39;&#39;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Generate bunch of Colored cubes at Position of Particles.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Created by: Jimmy Gunawan&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Source: Maya Spiral Blog&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Last update: 2013.04.18&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39;&#39;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # get Total Number of Particles&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; totalParticle = mc.particle( particleNode, query=True, count=True)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; for (id) in range(totalParticle):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Query and print Particle position&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myPos = mc.xform(&#39;{particleNode}.pt[{id}]&#39;.format(particleNode=particleNode, id=id), query=True, translation=True, worldSpace=True)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Query and print Particle Color RGBPP&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; redVal, greenVal, blueVal = mc.particle( particleNode, query=True, attribute=&#39;rgbPP&#39;, id=id )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #print &#39;Particle ID&#39;, id, &#39;Position:&#39;, myPos, &#39;Color:&#39;, myColor&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Create Cube and Assign Cube Color based on queried Particle ID (color and position)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myCube = mc.polyCube (constructionHistory=False, object=True, width=cubeSize, height=cubeSize, depth=cubeSize, createUVs=4)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mc.xform(myCube, translation=myPos, worldSpace=True)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mc.polyColorPerVertex(r=redVal, g=greenVal, b=blueVal, a=1, colorDisplayOption=True)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;def forceConnectColorName():&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; myList = mc.ls(selection=True, long=True)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; for num, item in enumerate(myList):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; shape = mc.listRelatives(item, fullPath=True, shapes=True)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mc.connectAttr(&quot;{shape}.colorSet[0].colorName&quot;.format(shape=shape[0]), &quot;mentalrayVertexColors1.cpvSets[{num}]&quot;.format(num=num), force=True)&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;EXPORT DATA AS XML&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
I will also attempt to spit out the data as XML. Just for practice. Will add more info here later in regards to XML. Because I want to probably export out objects from Maya into Blender to do further simulations.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Quick Doodle Script on &lt;b&gt;XML Export&lt;/b&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&#39;&#39;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Export color as XML to pass to other 3D software (Blender rocks!)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&#39;&#39;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;from xml.etree import cElementTree as ElementTree&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# PRETTY PRINT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# function to pretty print the XML code&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;def prettyPrint(element, level=0):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39;&#39;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Printing in elementTree requires a little massaging&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Function taken from elementTree site:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; http://effbot.org/zone/element-lib.htm#prettyprint&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39;&#39;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; indent = &#39;\n&#39; + level * &#39; &amp;nbsp;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; if len(element):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not element.text or not element.text.strip():&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; element.text = indent + &#39; &amp;nbsp;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not element.tail or not element.tail.strip():&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; element.tail = indent&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for element in element:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prettyPrint(element, level + 1)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if not element.tail or not element.tail.strip():&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; element.tail = indent&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; else:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if level and (not element.tail or not element.tail.strip()):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; element.tail = indent&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; return element&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Get user selected objects&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;myObjects = mc.ls(selection=True)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Create ROOT node&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;rootNode = ElementTree.Element(&#39;root&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# mc.getAttr(&#39;pCube3.vtx[4].red&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;for object in myObjects:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # Create another node = CHILD element&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; elementNode = ElementTree.Element(object)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # Parent CHILD node to ROOT&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; rootNode.append(elementNode)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # print mc.polyColorPerVertex( &#39;pCube3.vtx[0]&#39;, &amp;nbsp;query=True, rgb=True )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # Adding more attributes&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; elementNode.attrib[&#39;rgbVal&#39;] = str(mc.polyColorPerVertex( &#39;{object}.vtx[0]&#39;.format(object=object), &amp;nbsp;query=True, rgb=True ))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # Adding text&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; elementNode.text = &#39;Vertex Value RGB&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# Pretty print the rootNode&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;prettyPrint(element=rootNode)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# We need to convert to STRING before we can see the whole thing&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;xmlText = ElementTree.tostring(rootNode)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# FINAL RESULT, we need to append the HEADER&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;print ( &#39;&amp;lt;?xml version=&quot;1.0&quot; ?&amp;gt;\n{xmlText}&#39;.format(xmlText=xmlText) )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;outputPath = &quot;C://xml//test.xml&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;fileObject = open(outputPath, &#39;w&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;fileObject.write(&#39;&amp;lt;?xml version=&quot;1.0&quot; ?&amp;gt;\n&#39; + xmlText)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;fileObject.close()&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;TAKE IT FROM HERE, BLENDER...&lt;/b&gt;&lt;br /&gt;
From here, Blender will handle the Bullet dynamics, rendering, compositing, video editing etc.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikWhyphenhyphencyivgKQgdCg3hWhwTDdfR4_B2s6ZR9pR63TPjFLHA1OhFYONClfevYaqjya5mjFysIXRZMAvtDCZBO6CHbHwqq7hMatoJmE8cmQb4yYqiJpwrULEu-QtZp-1iusS7wNplaYHyZSs5/s1600/maya2blender_3000cubes.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikWhyphenhyphencyivgKQgdCg3hWhwTDdfR4_B2s6ZR9pR63TPjFLHA1OhFYONClfevYaqjya5mjFysIXRZMAvtDCZBO6CHbHwqq7hMatoJmE8cmQb4yYqiJpwrULEu-QtZp-1iusS7wNplaYHyZSs5/s640/maya2blender_3000cubes.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/4878029851865591561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2013/04/python-getting-particle-rgbpp-and-apply.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/4878029851865591561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/4878029851865591561'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2013/04/python-getting-particle-rgbpp-and-apply.html' title='PYTHON / Getting Particle RGBPP And Apply The Color To Object'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjheeLf5c7QOYOrV1Q8myTSGkVmrTADt2W-YXZ1D-ej00dp6wilGDE2uNeWfsXAwSi4cEc3SxjCLyaz-0YvExMnI062zKdLruicAOEnb1LeoZy7E4SFBbOlxYULtPw-ftpQgnyf74jJ9uy/s72-c/PrtScr+capture_3.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-7865776680674941907</id><published>2013-04-16T18:25:00.001-07:00</published><updated>2013-04-16T18:29:20.493-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="batch rename"/><category scheme="http://www.blogger.com/atom/ns#" term="maya"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="rename"/><category scheme="http://www.blogger.com/atom/ns#" term="renamer"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><title type='text'>PYTHON / Renamer Is Piece Of Cake</title><content type='html'>Like the title of this post, I was Python doodle scripting, and thinking &quot;Renamer&quot;. Apparently it is &quot;piece of cake&quot; in Python. Python is so good at manipulating string that somewhat it works amazingly well inside Maya. Because after all many of Maya Commands are pretty handy too.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;NOT ANOTHER RENAMER SCRIPT!&lt;/b&gt;&lt;br /&gt;
I know, I know, there are already plenty of Renamer scripts out there already.&lt;br /&gt;
&lt;br /&gt;
Why make another one? Because I want to learn Python better and nothing better to learn than accomplishing simple task but by writing it yourself without looking at the solution from other people. And once we have solution, we look at other peopl and see &quot;the most elegant&quot; script out there to learn from that.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;REQUIREMENT&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;maya.cmds.ls()&lt;/li&gt;
&lt;li&gt;maya.cmds.rename()&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;THE SCRIPT IS SUPER SIMPLE, BUT BE CAREFUL&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&#39;&#39;&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;The script will list of object selected in order&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;rename the object with the new name&amp;nbsp;+ 2 digit numbers&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&#39;&#39;&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;import maya.cmds as mc&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# import maya.mel as mel&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;selected_objects = mc.ls(selection=True)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# specify new name here&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;newname = &quot;corgiTail&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;for number, object in enumerate(selected_objects):&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; print &#39;Old Name:&#39;, object&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; print &#39;New Name:&#39;, &#39;%s%02d&#39; % (newname, number)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; mc.rename(object, (&#39;%s%02d&#39; % (newname, number)))&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;### EXAMPLE RESULT&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
Old Name: joint1&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
New Name: corgiTail00&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
Old Name: joint2&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
New Name: corgiTail01&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
Old Name: joint3&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
New Name: corgiTail02&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
Old Name: joint4&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
New Name: corgiTail03&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
Old Name: joint5&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
New Name: corgiTail04&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
Old Name: joint6&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
New Name: corgiTail05&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
Old Name: joint7&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
New Name: corgiTail06&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
### MIGHT AS WELL TURNING THAT INTO A FUNCTION&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;div&gt;
import maya.cmds as mc&lt;/div&gt;
&lt;div&gt;
import maya.mel as mel&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
def jgRenamer(newname = &quot;corgiTail&quot;):&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &#39;&#39;&#39;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; Rename selected objects with specified string&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &#39;&#39;&#39;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; selected_objects = mc.ls(selection=True)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; for number, object in enumerate(selected_objects):&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &#39;Old Name:&#39;, object&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &#39;New Name:&#39;, &#39;%s%02d&#39; % (newname, number)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mc.rename(object, (&#39;%s%02d&#39; % (newname, number)))&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
As you can see, it is pretty easy task to do using Python. Simple but useful. Just because of the way Python handling String format.&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
Mind you that the above script is NOT totally correct because we did not tell Maya to regard the HIERARCHY of nodes.&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
We need to enable &quot;Long&quot; path name when we use the maya.cmds.ls(). Because Maya allows same node name within hierachy and if we are asking Maya to rename object, it will get confused if it find more than one object with the same name inside hierarhy.&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
Node naming is such a simple concept, but very important in Maya. There should be no node in Maya with the same name.&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
So, my quick hack is to do the renaming in reverse:&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
(the lowest child first, then the parent, next parent, etc):&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;b&gt;RENAMER SCRIPT (a better version)&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;import maya.cmds as mc&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;import maya.mel as mel&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;def jgRenamer(newname = &quot;corgiTail&quot;):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39;&#39;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Rename selected objects with specified string&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39;&#39;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; selected_objects = mc.ls(selection=True, long=True)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; selected_objects.reverse()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; totalObjects = len(selected_objects)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # We are doing this in reverse, last object renamed first&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; for number, object in enumerate(selected_objects):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &#39;Old Name:&#39;, object&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &#39;New Name:&#39;, &#39;%s%02d&#39; % (newname, totalObjects-number)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mc.rename(object, (&#39;%s%02d&#39; % (newname, totalObjects-number)))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# USAGE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;jgRenamer(&#39;pigTail&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# RESULT (You see how we are doing it backward)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Old Name: |corgiTail01|corgiTail02|corgiTail03|corgiTail04|corgiTail05|corgiTail06|corgiTail07|corgiTail08&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;New Name: pigTail08&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Old Name: |corgiTail01|corgiTail02|corgiTail03|corgiTail04|corgiTail05|corgiTail06|corgiTail07&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;New Name: pigTail07&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Old Name: |corgiTail01|corgiTail02|corgiTail03|corgiTail04|corgiTail05|corgiTail06&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;New Name: pigTail06&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Old Name: |corgiTail01|corgiTail02|corgiTail03|corgiTail04|corgiTail05&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;New Name: pigTail05&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Old Name: |corgiTail01|corgiTail02|corgiTail03|corgiTail04&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;New Name: pigTail04&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Old Name: |corgiTail01|corgiTail02|corgiTail03&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;New Name: pigTail03&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Old Name: |corgiTail01|corgiTail02&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;New Name: pigTail02&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Old Name: |corgiTail01&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;New Name: pigTail01&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;


&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;b&gt;ADD SUFFIX SCRIPT&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
Maya already has &quot;Prefix Hierarhy Names&quot; and &quot;Search and Replace Names&quot; which are handy every now and then. But I think they are missing Suffix Hierarchy Names.&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
A quick Python script for adding suffix is probably something like below:&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;def jgAddSuffix(suffix = &quot;_jnt&quot;):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39;&#39;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Add user specifid suffix to selected objects&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &#39;&#39;&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; selected_objects = mc.ls(selection=True, long=True)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; selected_objects_short = mc.ls(selection=True, long=False)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; selected_objects.reverse()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; selected_objects_short.reverse()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; totalObjects = len(selected_objects)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; # We are doing this in reverse, last object get suffix added first&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; for number, object in enumerate(selected_objects):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &#39;Old Name:&#39;, object&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print &#39;New Name:&#39;, selected_objects_short[number]+suffix&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mc.rename(object, selected_objects_short[number]+suffix)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;jgAddSuffix(&#39;_jimmy&#39;)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;b&gt;PUT THEM ALL TOGETHER&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;/div&gt;
We can see already how Python really handles list of Strings really well and it makes Maya MEL wrapped in Python becoming more fluid.&lt;br /&gt;
&lt;br /&gt;
From 2 scripts above, actually it would be nicer to put all those RENAMER function together with a nice UI.&lt;br /&gt;
&lt;br /&gt;
A while back ago, I made something like this. This one was taught by Suchan Raj of Puppet Lounge:&lt;br /&gt;
&lt;a href=&quot;http://puppeteerlounge.com/&quot;&gt;http://puppeteerlounge.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
.... as part of the Rigging Workshop. This one was created using MEL script.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnsI3jfwrPLwf4oTuY635wtPFci0IraalHvxrYY_JriHP2pSOrLIMLV0CKCM_8lJbejgR_g-L1_VUDL0tXxvBsURPlf1fViMaB7-OSXF3oaoW3onrUgqG36Ono9Ep43xU5tyaiqlBW2ZDq/s1600/PrtScr+capture_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnsI3jfwrPLwf4oTuY635wtPFci0IraalHvxrYY_JriHP2pSOrLIMLV0CKCM_8lJbejgR_g-L1_VUDL0tXxvBsURPlf1fViMaB7-OSXF3oaoW3onrUgqG36Ono9Ep43xU5tyaiqlBW2ZDq/s1600/PrtScr+capture_2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
That&#39;s a nice simple script that allow user to RENAME every node in the scene into a nice convention:&lt;br /&gt;
{charactername01}_{whichSidePrefix}_{objectName}_{suffixName}&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
jimmy01_l_wing01_jnt&lt;br /&gt;
&lt;br /&gt;
jimmy01_c_spine01_jnt&lt;br /&gt;
jimmy01_c_spine01_ctrl&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I can redo that script in Python by translating each line of MEL, but .... I think I should try to do that in PyQT...&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;TO BE CONTINUED...&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/7865776680674941907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2013/04/python-renamer-is-piece-of-cake.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/7865776680674941907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/7865776680674941907'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2013/04/python-renamer-is-piece-of-cake.html' title='PYTHON / Renamer Is Piece Of Cake'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnsI3jfwrPLwf4oTuY635wtPFci0IraalHvxrYY_JriHP2pSOrLIMLV0CKCM_8lJbejgR_g-L1_VUDL0tXxvBsURPlf1fViMaB7-OSXF3oaoW3onrUgqG36Ono9Ep43xU5tyaiqlBW2ZDq/s72-c/PrtScr+capture_2.png" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-6366785209373728125</id><published>2013-04-10T01:40:00.000-07:00</published><updated>2013-04-10T01:40:11.467-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="particle"/><category scheme="http://www.blogger.com/atom/ns#" term="particle tool"/><title type='text'>PYTHON / A Better Particle Tool</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I want to touch just a little bit on this Particle Tool in Maya. It&#39;s a very old tool, but it still serves its purpose.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Sketch Particles is especially nice for sketching particles on LIVE mesh.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This tool also allow user to create a &lt;b&gt;2D and 3D matrix of Particle arrays grids&lt;/b&gt;, but I think the tool itself is not so intuitive and kind of dangerous. It is very easy for user to accidentally create zillions number of Particles by accident and having to restart Maya or restart computer because it really taken the whole RAM.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdR2Anlg9-YkaqInmGEEqfZXgH4Kd4BJhbJLLgpkWNyBKjWI7Xs5MxfWOFSVBtelljKvkMkhVpWStnnDGNx4I7nDDPvK7XcafM-SK_LaPT_J02ftyd8d7m6l70nBme8srI38f_WHqoQcFd/s1600/particleGrid_002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdR2Anlg9-YkaqInmGEEqfZXgH4Kd4BJhbJLLgpkWNyBKjWI7Xs5MxfWOFSVBtelljKvkMkhVpWStnnDGNx4I7nDDPvK7XcafM-SK_LaPT_J02ftyd8d7m6l70nBme8srI38f_WHqoQcFd/s320/particleGrid_002.png&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglhiFgcbxQnsNC4_Vb7mQQVme0LVGHysp6JaTN4LjlW_3_Ja8i9Wyye9SkHZz1y7KufFy4I1Gi4spqm3YZw_6Rz58bedKk-SPUQENLtdfUvdpVeSfK1MMqUL4QakxdpulY7NgvYwesQU82/s1600/particleGrid_001.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglhiFgcbxQnsNC4_Vb7mQQVme0LVGHysp6JaTN4LjlW_3_Ja8i9Wyye9SkHZz1y7KufFy4I1Gi4spqm3YZw_6Rz58bedKk-SPUQENLtdfUvdpVeSfK1MMqUL4QakxdpulY7NgvYwesQU82/s1600/particleGrid_001.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Creating Particle Grid &lt;b&gt;With Cursor&lt;/b&gt; is a lot better than &lt;b&gt;With Text Fields&lt;/b&gt;, because at least we know where exactly we will be placing the Particle Grid, and whether it is as 2D or 3D.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;For 2D Particle Grid With Cursor&lt;/b&gt;&lt;br /&gt;
A better way to visualize the creation of 2D Particle Grid is really by using Maya&#39;s Polygon grid.&lt;br /&gt;
&lt;br /&gt;
Let say, I created a plane 10 x 20 (width x height) units. Using Particle Tool, I would &lt;b&gt;vertex snap&lt;/b&gt;&amp;nbsp;the Particle Tool from the bottom left (minimum corner) into top right (maximum corner) of the Plane.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitd2leum6xeQazM5TuiUEBEcagnEDQEsCZ9xqIcLEYiJrUqZt-YffhC5Bs_AJ6js3ceFpLfIi8GQahBbMQNOgWfoDTZaaWe2ABON0PVR3Zph7N1lKNWalzLDNLt8TtZ4XwfMEnCkJd1q1T/s1600/particleGrid_003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;321&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitd2leum6xeQazM5TuiUEBEcagnEDQEsCZ9xqIcLEYiJrUqZt-YffhC5Bs_AJ6js3ceFpLfIi8GQahBbMQNOgWfoDTZaaWe2ABON0PVR3Zph7N1lKNWalzLDNLt8TtZ4XwfMEnCkJd1q1T/s640/particleGrid_003.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
For 10 x 20 dimension, with Particle Spacing set to 1.0, we will be getting 231 number of Particles (11 x 21), the same number as the vertices of the poly grid.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;For 3D Particle Grid With Cursor&lt;/b&gt;&lt;br /&gt;
Similarly, with the creation of 3D Particle Grid, I would use Poly Cube to first visualize the Density of Particle Grid that I will be creating.&lt;br /&gt;
&lt;br /&gt;
Let say, if I choose to create 20 x 5 x 10 (width x height x depth), then I use the Particle Tool and vertex snap the Minimum Corner and Maximum Corner:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBjZchqj_yo1XhDdXrS5F2Zt-Bh2sa93RsK1Gz7bds64c9timWsXn7jwGjzivSULcR1-faZsRZerQkH_suykxNe8cUNd2OY_kgA6MuhPxqBiS8Qw1b_n7m8fva5QMk76f1vY_Fi2eOX_Cc/s1600/particleGrid_004.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;343&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBjZchqj_yo1XhDdXrS5F2Zt-Bh2sa93RsK1Gz7bds64c9timWsXn7jwGjzivSULcR1-faZsRZerQkH_suykxNe8cUNd2OY_kgA6MuhPxqBiS8Qw1b_n7m8fva5QMk76f1vY_Fi2eOX_Cc/s640/particleGrid_004.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM8FMoIrLM6xvrc5l4ZrEif7DVCs9dM4R2mxT6stmBHXZq7I6ZBoRwipDkTJemmqadxOhfR0Fv8piTU6O-6s1buUiZ_q2PmTpWbuRHLomUTc3CXuGzhlBTobq6qrdztr6Uzo1uRpXa9pDe/s1600/particleGrid_005.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;345&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM8FMoIrLM6xvrc5l4ZrEif7DVCs9dM4R2mxT6stmBHXZq7I6ZBoRwipDkTJemmqadxOhfR0Fv8piTU6O-6s1buUiZ_q2PmTpWbuRHLomUTc3CXuGzhlBTobq6qrdztr6Uzo1uRpXa9pDe/s640/particleGrid_005.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I will end up with 1386 Particles (21 x 6 x 11) if the Particle Tool is set with Particle Spacing 1.0.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A BETTER VISUALIZATION: Using Fluid Shape Voxel&lt;/b&gt;&lt;br /&gt;
I want to propose a better visualization, by using Fluid Shape (without any emitter of course). We simply specify the dimensions inside the Fluid Shape Size XYZ.&lt;br /&gt;
&lt;br /&gt;
The resolution XYZ will be the Particle Spacing.&lt;br /&gt;
&lt;br /&gt;
If Particle Spacing = 1.0, then both the Size and Resolution are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;ResolutionX, ResolutionY, ResolutionZ = 20, 5, 10&lt;/li&gt;
&lt;li&gt;SizeX, SizeY, SizeZ = 20, 5, 10&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
If Spacing = 0.5, this means the Particle is quadruple (Size / Particle Spacing = Resolution):&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;ResolutionX, ResolutionY, ResolutionZ = 40, 10, 20&lt;/li&gt;
&lt;li&gt;SizeX, SizeY, SizeZ = 20, 5, 10&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY26wJ6mVgd9-RoL3wpYF0fL5Et0mkQnNAF2frvAv62o29xAfyLYJ-plO7GVeC_SLDCtAdqhn__dznLr13azqrYGWrPTHl2xpIClJTBrBG6EIHSbq7J2k8ooMG_Q9Gs6hgmDMP9Uo-mGaA/s1600/particleGrid_007.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY26wJ6mVgd9-RoL3wpYF0fL5Et0mkQnNAF2frvAv62o29xAfyLYJ-plO7GVeC_SLDCtAdqhn__dznLr13azqrYGWrPTHl2xpIClJTBrBG6EIHSbq7J2k8ooMG_Q9Gs6hgmDMP9Uo-mGaA/s1600/particleGrid_007.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Below is the Particle Grid Density when visualized using Fluid Shape.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXIrLJMfS73LQYhQV3x4icX-duINX6xXlXoVKmN-TLrRcdyPY4rsI9Ph6YCBm_w09Hh606LoYqZhW0tCmW-4yHMAOR4DXp044NeWaULWWyf0ikSSBFTmEahCYUlsLf5DTqZwfLJ4YF-ywK/s1600/particleGrid_006.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;412&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXIrLJMfS73LQYhQV3x4icX-duINX6xXlXoVKmN-TLrRcdyPY4rsI9Ph6YCBm_w09Hh606LoYqZhW0tCmW-4yHMAOR4DXp044NeWaULWWyf0ikSSBFTmEahCYUlsLf5DTqZwfLJ4YF-ywK/s640/particleGrid_006.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Unfortunately, we cannot really snap to the corners of Fluid Shape or the voxel grid.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A BETTER CREATION: 2D or 3D Particle Grid With Locator Pair&lt;/b&gt;&lt;br /&gt;
I think it would be nicer if we can just specify 2 Locators that correspond to Minimum Corner and Maximum Corner. So, we can probably create some kind of Python script to aid this creation.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh0O8_kKxTKaA036Qen5QkokyvUKKxCM0cr25rLlHFJPTNi8U0yWGN6e51dUG2gNVQzbT6IYrqCiC5bY_gw_5Ml_8Cyxp2iaPe_fA_9S2Q-RvA8yWjY1_YvZawfh_aTw3cgj1nuomzlZBC/s1600/particleGrid_008.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh0O8_kKxTKaA036Qen5QkokyvUKKxCM0cr25rLlHFJPTNi8U0yWGN6e51dUG2gNVQzbT6IYrqCiC5bY_gw_5Ml_8Cyxp2iaPe_fA_9S2Q-RvA8yWjY1_YvZawfh_aTw3cgj1nuomzlZBC/s400/particleGrid_008.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
When Maya created 2D or 3D Particle grid (using cursor or text field), it will spit out MEL like below:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;particle -ll -10 0 5 -ur 10 0 -5 -grs 1 -c 1 ;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Translated into Python like below: (if we use &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;import maya.cmds as mc&lt;/span&gt;)&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mc.particle( lowerLeft = [-10, 0, 5], upperRight = [10, 0, -5], gridSpacing = 1, conserve = 1 ) ;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
What would be nicer and convenient is of course to use our Locator Pair, if Locator Pair is named:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;minCorner_loc&lt;/li&gt;
&lt;li&gt;maxCorner_loc&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
We can tell Python to query the position of minCorner_loc and maxCorner_loc in World Space and then run the Particle command Python script to create the grid. For example:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKM-Eo5nO7mGYSLHHYpWEkS4WHX8Y-PCeSVNbdJUCai49a9W8gYxnNF4Wpeh9J0B_wtXINnn9a8bfp9JTjVwwHU65ybN3yGD7y917HJfzoioP9TmffJ4iPqjKTTW-eVgxZsyz28SHIxkz7/s1600/particleGrid_009.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKM-Eo5nO7mGYSLHHYpWEkS4WHX8Y-PCeSVNbdJUCai49a9W8gYxnNF4Wpeh9J0B_wtXINnn9a8bfp9JTjVwwHU65ybN3yGD7y917HJfzoioP9TmffJ4iPqjKTTW-eVgxZsyz28SHIxkz7/s1600/particleGrid_009.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This is really better than Maya Particle Tool.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A BETTER WARNING&lt;/b&gt;&lt;br /&gt;
And also, it would be nice to warn user if they are actually going to be creating a huge amount of Particle that potentially crashing Maya or having to restart the machine.&lt;br /&gt;
&lt;br /&gt;
So, the rough Python script idea of a better Particle Tool is something like below:&lt;br /&gt;
&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot; /&gt;
&lt;div style=&quot;background-color: white; margin: 0px; outline: none; padding: 0px; text-align: justify;&quot;&gt;
&lt;h3&gt;
MAYA SPIRAL DOODLE SCRIPT: To Create 2D or 3D Particle Grid&lt;/h3&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px; text-align: start;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;pre class=&quot;bbcode_code&quot; style=&quot;background-color: #f2f6f8; border-style: inset; border-width: 1px; direction: ltr; height: 160px; overflow: scroll; padding: 6px;&quot;&gt;&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17.265625px;&quot;&gt;import maya.cmds as mc

totalParticleLimit = 500000

# Query the position of minCorner_loc and maxCorner_loc in World Space
llxyz = mc.xform(&#39;minCorner_loc&#39;, query=True, worldSpace=True, translation=True)
urxyz = mc.xform(&#39;maxCorner_loc&#39;, query=True, worldSpace=True, translation=True)

# What is the total number of Particles will be created?
width = abs(urxyz[0] - llxyz[0])
height = abs(urxyz[1] - llxyz[1])
depth = abs(urxyz[2] - llxyz[2])

totalParticles = (width+1) * (height+1) * (depth+1)

print(&#39;Total Particles is roughtly =&#39;, totalParticles)

# If Particle is Over A Million, give warning to user
# And ask whether to Continue anyway (risk of crashing) or Cancel

if(totalParticles) &amp;gt; totalParticleLimit:
    print(&#39;Sorry cannot create Particles over {totalParticleLimit}&#39;.format(totalParticleLimit=totalParticleLimit))
else:
    # Create Particle Grid
    mc.particle( lowerLeft = llxyz, upperRight = urxyz, gridSpacing = 1, conserve = 1 ) ;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #333333; font-family: Helvetica Neue Light, HelveticaNeue-Light, Helvetica Neue, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 19px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px;&quot;&gt;&lt;span style=&quot;font-family: inherit; line-height: 19px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
To do:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;If one day I am more familiar with Maya API and Python, this should be a better tool to visualize Particles before the creation.&lt;/li&gt;
&lt;li&gt;Creating UI maybe?&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/6366785209373728125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2013/04/python-better-particle-tool.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/6366785209373728125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/6366785209373728125'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2013/04/python-better-particle-tool.html' title='PYTHON / A Better Particle Tool'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdR2Anlg9-YkaqInmGEEqfZXgH4Kd4BJhbJLLgpkWNyBKjWI7Xs5MxfWOFSVBtelljKvkMkhVpWStnnDGNx4I7nDDPvK7XcafM-SK_LaPT_J02ftyd8d7m6l70nBme8srI38f_WHqoQcFd/s72-c/particleGrid_002.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-2057551591668204799</id><published>2013-04-07T19:47:00.003-07:00</published><updated>2013-04-07T19:47:32.544-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dice"/><category scheme="http://www.blogger.com/atom/ns#" term="fruit ninja"/><category scheme="http://www.blogger.com/atom/ns#" term="metal gear rising"/><category scheme="http://www.blogger.com/atom/ns#" term="polycut"/><category scheme="http://www.blogger.com/atom/ns#" term="polysplit"/><category scheme="http://www.blogger.com/atom/ns#" term="slice"/><category scheme="http://www.blogger.com/atom/ns#" term="total recall"/><title type='text'>PYTHON / Poly Cutting and Splitting</title><content type='html'>Now with my better understanding of Python in Maya, I start to find a new &quot;love&quot; with Maya.&lt;br /&gt;
&lt;br /&gt;
My frustration in the past was usually because &quot;Certain Maya Tool is not doing what is expected to be doing&quot;. Either the tool failed or Maya crashes. This is pretty common thing to happen. Sometimes it is because of stupid Maya bug, but some other time, it is could because the mesh is messy and Maya Tool simply got confused.&lt;br /&gt;
&lt;br /&gt;
These days, I started to look and dig at Maya Tool in term of Python context. Some tools may work better via Script because we are more specifically telling Maya what to do.&lt;br /&gt;
&lt;br /&gt;
In the past, using Maya Tool is simply an act of doing steps:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Select an object&lt;/li&gt;
&lt;li&gt;Use the tool with mouse gesture&lt;/li&gt;
&lt;li&gt;Adjust the attribute of node until we are happy with the result&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
With Python, it is more of act of observation and writing values and executing, but of course, it comes from understanding what the tool is actually doing and providing the correct argument(s).&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The first place to check will always be Maya Help-Python Command Reference. The documentation will usually help you understand the tool. Sometimes the description of the tool is really boring though.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
It takes a while to transfer from &quot;manual way&quot; to &quot;scripted way&quot;.&lt;/div&gt;
&lt;h2&gt;
&lt;b&gt;polyCut()&lt;/b&gt;&lt;/h2&gt;
&lt;div&gt;
Let say we are doing &lt;b&gt;Cut Faces Tool&lt;/b&gt;&amp;nbsp;on a poly cube mesh.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1Vaht2tjF8nkgqRtyJPiRr7isWoe0UAcRldqJ5J-V-US7mAvdvJkIZNn4Jf9XjctJkYXSLIgn3gFTG7s3RW9ye0_pN9t1STfwsNNvZzxy31APmxoi5lfQAqAK-hYeb8Uhdj-289P1wpPu/s1600/polycut_001.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1Vaht2tjF8nkgqRtyJPiRr7isWoe0UAcRldqJ5J-V-US7mAvdvJkIZNn4Jf9XjctJkYXSLIgn3gFTG7s3RW9ye0_pN9t1STfwsNNvZzxy31APmxoi5lfQAqAK-hYeb8Uhdj-289P1wpPu/s320/polycut_001.png&quot; width=&quot;253&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Poly Cut is one of my favourite tool, because it is pretty random and unusual but also STABLE, this tool does the job of cutting of object Faces by mouse gesture.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Pretty awesome tool to use when we want to SLICE 3D mesh ala Metal Gear Rising or Fruit Ninja.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9gsyCLJWhNOgK1bsBpuK_xwTLYEHLPXBS6LWtAZZfk34l3IRCCoREPO6xvE8B98c-BOC2jzSAky93BaLJcuEJlFCM3hiceIbOqM7kFSmwSNCAVsIQgw_2p1ytE7u9HE-uP5QAL48qgsuz/s1600/polycut_002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9gsyCLJWhNOgK1bsBpuK_xwTLYEHLPXBS6LWtAZZfk34l3IRCCoREPO6xvE8B98c-BOC2jzSAky93BaLJcuEJlFCM3hiceIbOqM7kFSmwSNCAVsIQgw_2p1ytE7u9HE-uP5QAL48qgsuz/s320/polycut_002.png&quot; width=&quot;146&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now, how do we do this using Python?&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We can certainly jump and read Maya documentation about this tool, for Maya 2013, for example:&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://download.autodesk.com/global/docs/maya2013/en_us/CommandsPython/polyCut.html&quot;&gt;http://download.autodesk.com/global/docs/maya2013/en_us/CommandsPython/polyCut.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Reading documentation usually does not help much when we have bunch of arguments that we are not 100% what they are actually doing. And if we try changing the value and execute Python commands each time to see the result, this is also not very helpful.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The best way is to check the &lt;b&gt;Poly Cut node&lt;/b&gt;&amp;nbsp;as if we are doing it manually and see what attribute really matters:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbd_bQVcAGejXLD_WuQhjPaiNJEE8Hv527imkLPC2d5SfiMtXbHd9X2-64srSj9uDnobKzPHAVKo9o-g1ccFVIM1I4KJSV_6hvMjtlVoHRhPq5fnM39jZWGrZ4WKBbOZNVkUHfdZdCI452/s1600/polycut_003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;520&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbd_bQVcAGejXLD_WuQhjPaiNJEE8Hv527imkLPC2d5SfiMtXbHd9X2-64srSj9uDnobKzPHAVKo9o-g1ccFVIM1I4KJSV_6hvMjtlVoHRhPq5fnM39jZWGrZ4WKBbOZNVkUHfdZdCI452/s640/polycut_003.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Cut Plane Center XYZ&lt;/li&gt;
&lt;li&gt;Cut Plane Rotate XYZ&lt;/li&gt;
&lt;li&gt;Extract Faces ON/OFF (True or False)&lt;/li&gt;
&lt;li&gt;Extract Offset XYZ&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
I tested the resulting Cut by changing the Channel/Attribute value.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Based on that knowledge, we can now execute Python Command in a more intuitive way. This is of course only a starting point because usually scripted Maya Command has plenty of hidden options.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiwsFKmsVKn8mvAvSTNZgEUQ747vinHsRaQqJCkDhblnJVp6pLAFuNobBequdYnbAifsDWG4kN41v5-5oOL2mwvGXNMnEdtmlEAaGK5vl0AYfIkDogd9_0pUkH56VuaFTtYFzMlvxD04Ig/s1600/polycut_004.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiwsFKmsVKn8mvAvSTNZgEUQ747vinHsRaQqJCkDhblnJVp6pLAFuNobBequdYnbAifsDWG4kN41v5-5oOL2mwvGXNMnEdtmlEAaGK5vl0AYfIkDogd9_0pUkH56VuaFTtYFzMlvxD04Ig/s1600/polycut_004.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Two examples are shown on the above script:&lt;/div&gt;
&lt;div&gt;
FIRST EXAMPLE: It is doing the cut based on the Cut Plane Center and Rotate.&lt;/div&gt;
&lt;div&gt;
SECOND EXAMPLE: using the Cutting Direction option, we specify X, Y, Z and it will cut exactly in the middle center of Bounding Box of the object.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The middle cutting using Cutting Direction might be useful for some cases. But we want more control. So, instead of constraining to X, Y, Z plane and bounding box, we will still want to use cutPlaneCenter, cutPlaneRoate, extractFaces, and extractOffset.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To get the cutPlaneCenter confirming the Object Center, we can just &lt;b&gt;objectCenter()&lt;/b&gt; command.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGJeKlj3cfdlWPDUKsSER8mVPI4ICcQbuzSAeklI-dY63RgOEy5aG3hwCY70aDnXmwqkDLxT0A6T0ramq8ersl_ER3vQr3SpNI7SQz5fucx3ffOW9WTXLoqvM7TX0XSpX9FvrJ4GvYYhBd/s1600/polycut_006.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGJeKlj3cfdlWPDUKsSER8mVPI4ICcQbuzSAeklI-dY63RgOEy5aG3hwCY70aDnXmwqkDLxT0A6T0ramq8ersl_ER3vQr3SpNI7SQz5fucx3ffOW9WTXLoqvM7TX0XSpX9FvrJ4GvYYhBd/s1600/polycut_006.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyyykkeaDpJwSy9cnZ8QAV7upm6FMR8EvyVYj9E0uPwf0Yj2U-mdyhL1SnSmJJaNkGoWHTdDbiapx7bCciaW8Q9ou8JnA0JuNOTIYWgk3OBucm8VvsH-HR9Fc9yUyft5edKpEqyRr1BZ5B/s1600/polycut_005.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyyykkeaDpJwSy9cnZ8QAV7upm6FMR8EvyVYj9E0uPwf0Yj2U-mdyhL1SnSmJJaNkGoWHTdDbiapx7bCciaW8Q9ou8JnA0JuNOTIYWgk3OBucm8VvsH-HR9Fc9yUyft5edKpEqyRr1BZ5B/s1600/polycut_005.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWTrEp94KtVowrsqnK44IYRAlKT7oBmQe0KgEse1hyphenhyphen6_6l_N1NClpTyjwX282GcabTghedN0CGdxsXTsjULG4WjU9eiBQHE1T1KFzcA7F3wRDKyaEEMyO516lVG6INqO7Hbn-SUnzfDu8S/s1600/polycut_007.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWTrEp94KtVowrsqnK44IYRAlKT7oBmQe0KgEse1hyphenhyphen6_6l_N1NClpTyjwX282GcabTghedN0CGdxsXTsjULG4WjU9eiBQHE1T1KFzcA7F3wRDKyaEEMyO516lVG6INqO7Hbn-SUnzfDu8S/s1600/polycut_007.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
With above experiments, this means we can do something like below:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2pznv_m0k7NlAgGcfh-hWI2tGrT4FHSeHWW5WcqtEV0EOs5P-VId7ObTLDc4CQSbJiU7QFiehX5usxc59ubFfdulQ8KFGHZTNp5H0BpV1S8MmCZhOnRa4Qm-JpyMcO3zUwHyzoH3tzzoI/s1600/polycut_008.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2pznv_m0k7NlAgGcfh-hWI2tGrT4FHSeHWW5WcqtEV0EOs5P-VId7ObTLDc4CQSbJiU7QFiehX5usxc59ubFfdulQ8KFGHZTNp5H0BpV1S8MmCZhOnRa4Qm-JpyMcO3zUwHyzoH3tzzoI/s1600/polycut_008.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Or something like below:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg43mbjrvWwtvbRmV0lDNXR9VkJfu4MbmQLUNzPWxbWxKhxdwmrtKVu2EfQ0kx8uK61uKRxsIAiuwE0r-2ZCklqG3Tb8JKXKaiVohzASnrlvzE43UtlAvHNsVUUBr15EhCfw091b6yZWJPM/s1600/polycut_009.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg43mbjrvWwtvbRmV0lDNXR9VkJfu4MbmQLUNzPWxbWxKhxdwmrtKVu2EfQ0kx8uK61uKRxsIAiuwE0r-2ZCklqG3Tb8JKXKaiVohzASnrlvzE43UtlAvHNsVUUBr15EhCfw091b6yZWJPM/s1600/polycut_009.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Or maybe like below: (actually more useful)&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA5GGIGP_jwUfODMokGDYgJOxr8jIMqs6J8dHhIUYgLO7M7rFWFEyj5Y_XGcjVG4RN6ULiZ7sgVJDMw_o9zw3z1loD4A3vFHEDHvyYEQ08dy6Jce8VS92RWn7btl3aUCptIcq89zEjybvq/s1600/polycut_010.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;484&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA5GGIGP_jwUfODMokGDYgJOxr8jIMqs6J8dHhIUYgLO7M7rFWFEyj5Y_XGcjVG4RN6ULiZ7sgVJDMw_o9zw3z1loD4A3vFHEDHvyYEQ08dy6Jce8VS92RWn7btl3aUCptIcq89zEjybvq/s640/polycut_010.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So we can slice &quot;Suzanne the Monkey&quot; (from Blender) like below like the Total Recall Effect&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://www.youtube.com/watch?v=UiKpEvUShtY&quot;&gt;https://www.youtube.com/watch?v=UiKpEvUShtY&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj6n6ZjPQqziSEd6LhH5XjCvEhni2ZRoZxZmPozuSpbjmoKjrXoL5FqZ8UYea7rCmhBWVWn9cPmqrcBRsh4-KFTnhg-pkEli3zL0W-sebu_A3cT4wO-nILWVA-iG50GBOkdictgZkTSCej/s1600/polycut_011.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj6n6ZjPQqziSEd6LhH5XjCvEhni2ZRoZxZmPozuSpbjmoKjrXoL5FqZ8UYea7rCmhBWVWn9cPmqrcBRsh4-KFTnhg-pkEli3zL0W-sebu_A3cT4wO-nILWVA-iG50GBOkdictgZkTSCej/s320/polycut_011.png&quot; width=&quot;315&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Sorry Suzanne!&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Or maybe if you are cutting Carrot nice and evenly:&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6XevXknXC3_rC9kc3k2xBB8wz4tplD4L5Gl6XF9fMt6tG4rn9_gb1xkjxrX-KIcI5jHklF6cJhPfbEn9YnNhyphenhyphenQrb14UJC7mqm5RuYVfABPlZCTFoE0EShhyphenhyphenAXV9LZ0m8EHlTWcIyqJ8Gv/s1600/polycut_012.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6XevXknXC3_rC9kc3k2xBB8wz4tplD4L5Gl6XF9fMt6tG4rn9_gb1xkjxrX-KIcI5jHklF6cJhPfbEn9YnNhyphenhyphenQrb14UJC7mqm5RuYVfABPlZCTFoE0EShhyphenhyphenAXV9LZ0m8EHlTWcIyqJ8Gv/s400/polycut_012.png&quot; width=&quot;361&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
And Apple. You got the idea. What missing here is probably to automatically Fill Hole with certain Material for the inside area.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMF_VwOscvhOru9zJmI5mUnDUpJGhvXVvan-NSioIrtTlC9XMLbm6DMoh_19EUxBvilHK8M-u3WEbej5-pzWrLAZQa6-Jx5_UMlWeMr0rMtdA_wvoFvVNf_XC3RBk4NTw29EP3m9ParXw3/s1600/polycut_013.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;404&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMF_VwOscvhOru9zJmI5mUnDUpJGhvXVvan-NSioIrtTlC9XMLbm6DMoh_19EUxBvilHK8M-u3WEbej5-pzWrLAZQa6-Jx5_UMlWeMr0rMtdA_wvoFvVNf_XC3RBk4NTw29EP3m9ParXw3/s640/polycut_013.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;b&gt;polySplit()&lt;/b&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
Now, let&#39;s explore Poly Split Tool in Python context.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Poly Split is slightly tricky because this tool really has plenty of option and parameter under the sleeves. I probably won&#39;t be able to cover all of them.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Anyhow, we can observe it. I will start with a flat Poly Plane, single Face like below, nothing too fancy yet:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-D2ztSQJJtR880kUi8Urr1nL-kmJQPmPFr-ss4DBGyg6jipnn9y5qjlZ-HDDnXVIlR7PMqAz0j40EPipYbgeBZAG70g_bj8g6xYoq5XXGBHdpRoKRPmXd8NDGIPQUi1hov4n8wZOLHlU4/s1600/polycut_014.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;260&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-D2ztSQJJtR880kUi8Urr1nL-kmJQPmPFr-ss4DBGyg6jipnn9y5qjlZ-HDDnXVIlR7PMqAz0j40EPipYbgeBZAG70g_bj8g6xYoq5XXGBHdpRoKRPmXd8NDGIPQUi1hov4n8wZOLHlU4/s320/polycut_014.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You can check the Maya documentation on this command, but I already checked and it&#39;s pretty useless. I mean as reference it is okey, but the example is not so useful, unless you break it further, like I am doing below:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqXFZBsvNJBqv-QflJ_cTrQQ_iElpRYEAMUAsT49fKSCiPUlfn_DH-W_3v-SpQ3FdBYk7sCyurh2t3McrFQkQmEFat_jve410XJDWHC_RXhchCP-1oIxEPeVj8FBg4n7IMPkijGcOIAyOF/s1600/polycut_015.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqXFZBsvNJBqv-QflJ_cTrQQ_iElpRYEAMUAsT49fKSCiPUlfn_DH-W_3v-SpQ3FdBYk7sCyurh2t3McrFQkQmEFat_jve410XJDWHC_RXhchCP-1oIxEPeVj8FBg4n7IMPkijGcOIAyOF/s1600/polycut_015.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
What is happening there? Maya is doing edge split based on the edge number. I figure it out if I go to Component Mode and select it, MEL is spitting the edge [index] number.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0tV7S_9imx-71ZucfDX_CNxlxsrve_BV35DqctlXo405LXk26qrbZu5vc-Kngy3b3-24mJWFroYpLQI0TZimgofqxNZE_GUAUHBM17y3Jyfo6f0Wq3JgpaHrS2wXpIfQxhR52m_zipEci/s1600/polycut_017.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;460&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0tV7S_9imx-71ZucfDX_CNxlxsrve_BV35DqctlXo405LXk26qrbZu5vc-Kngy3b3-24mJWFroYpLQI0TZimgofqxNZE_GUAUHBM17y3Jyfo6f0Wq3JgpaHrS2wXpIfQxhR52m_zipEci/s640/polycut_017.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
mc.polySplit( ip=[(2, 0.5), (3, 0.5)] )&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Translates as:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Do poly split with weight 0.5 for edge no.2&lt;/li&gt;
&lt;li&gt;Do poly split with weight 0.5 for edge no.3&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
If I change the &quot;weight&quot; to 0.1, it looks something like below:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhywCRO1y6L8F2YIzJuK0gwghnfuftqwbl4-8_JRGNgPSQRzc_aWSqgS8K9EIxA-zWZAOLAgZrfx2DVb_-IEdPTj3lpFr6m189bVYkUJ7PqpFwOv0VrjZE2M3Zvg5LjbytPTIGQXxwbHxhf/s1600/polycut_018.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhywCRO1y6L8F2YIzJuK0gwghnfuftqwbl4-8_JRGNgPSQRzc_aWSqgS8K9EIxA-zWZAOLAgZrfx2DVb_-IEdPTj3lpFr6m189bVYkUJ7PqpFwOv0VrjZE2M3Zvg5LjbytPTIGQXxwbHxhf/s1600/polycut_018.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
See how the weight 0.1 of the split is placed within the edge. Kind of interesting.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
What if we simplified and just do a Split Cut between Edge no.1 and no.2?&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7PfpZCDnmJMI8guFOy62VQSy0rcLc5Ykkc5AEfDyDJH87DyMyt0WpOAQLhH2mM_jL7Z_yAwIhNkVvFTNcMzwaRYtv8tLltlK_zEnYFOvDKNDpuw167BBD_Sa5nE9ctBksZ4m6uegN9cjJ/s1600/polycut_019.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7PfpZCDnmJMI8guFOy62VQSy0rcLc5Ykkc5AEfDyDJH87DyMyt0WpOAQLhH2mM_jL7Z_yAwIhNkVvFTNcMzwaRYtv8tLltlK_zEnYFOvDKNDpuw167BBD_Sa5nE9ctBksZ4m6uegN9cjJ/s1600/polycut_019.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span id=&quot;goog_578585482&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_578585483&quot;&gt;&lt;/span&gt;That&#39;s simply and clear. But what interesting is how Maya change the Component Index Number (Edge Index), if we do the above command few times, with Weight of 0.5, we can see the effect to the mesh:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE70mhrplPzGEOfvOoBNjqWUA4AiG_YzTW4kEjfupyiZACd1rWK_ezXMnjEbHdpxt_Rdhv2geXXfNwG9YXUSGg_JTrM4G9aMga4l7CyU4duSF8AFwGIxWypgku-EG-LktfABYl6KOY4aMR/s1600/polycut_020.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE70mhrplPzGEOfvOoBNjqWUA4AiG_YzTW4kEjfupyiZACd1rWK_ezXMnjEbHdpxt_Rdhv2geXXfNwG9YXUSGg_JTrM4G9aMga4l7CyU4duSF8AFwGIxWypgku-EG-LktfABYl6KOY4aMR/s1600/polycut_020.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
We are &quot;slicing&quot; Edge No.1 and No.2, when we do so, it creates Pair Edge No.4 and No.5, while the new Edge is index No.6. And so on...&lt;br /&gt;
&lt;br /&gt;
We get Edge pattern like this, which is interesting:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPVhI9k7P9tz95qjx8jzNAEOQX30z6pw8GYVWiDPTAwtYEHwPphk232-sPMVVdU6RksCpIChBi3fyx1RUhNWFWPD6KGoai7MDh_xq1kEjOcT7A6P0V8l3HWi69xtU5zKpcj7TqjighM-hG/s1600/polycut_021.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;604&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPVhI9k7P9tz95qjx8jzNAEOQX30z6pw8GYVWiDPTAwtYEHwPphk232-sPMVVdU6RksCpIChBi3fyx1RUhNWFWPD6KGoai7MDh_xq1kEjOcT7A6P0V8l3HWi69xtU5zKpcj7TqjighM-hG/s640/polycut_021.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I am curious on how we can do Split Cut ala PolyCut tool, if we like to have something more random. I think we must look into Math and study the Pattern (how Maya changes the index).&lt;br /&gt;
&lt;br /&gt;
Maya actually already provide a way to Slice Edges using Insert Edge Loop tool:&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
polySplitRing&lt;b&gt;()&lt;/b&gt;&lt;/h2&gt;
&lt;br /&gt;
There is also PolySplitRing command that is triggered when we are using Insert Edge Tool. This also works in different way. And this kind of work in Edge Component Mode, unlike the polySplit() command.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;b&gt;Back to polySplit()....&lt;/b&gt;&lt;/h2&gt;
&lt;br /&gt;
So, if we want to EVENLY CUT EDGES, the math goes like this: For 5 divisions, the weight goes like this:&lt;br /&gt;
1st cut = 1/5&lt;br /&gt;
2nd cut = 1/4&lt;br /&gt;
3rd cut = 1/3&lt;br /&gt;
4th cut = 1/2&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOsCMaOEC27UyFd_3j9J7D7jUl1989DRcMzg67FnsDLsoRmq4oZI1XNaKGBBIkNqpB4u1EWpvssGrDw1wbq3OH6YhmIxBgAjLo4OfHsInbZJN_TqvZlYGkt43WdxksDJ4uChal4tCbm6LJ/s1600/polycut_022.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;276&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOsCMaOEC27UyFd_3j9J7D7jUl1989DRcMzg67FnsDLsoRmq4oZI1XNaKGBBIkNqpB4u1EWpvssGrDw1wbq3OH6YhmIxBgAjLo4OfHsInbZJN_TqvZlYGkt43WdxksDJ4uChal4tCbm6LJ/s640/polycut_022.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I guess that&#39;s pretty much for now. We could further using Random number to split and cut.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/2057551591668204799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2013/04/python-poly-cutting-and-splitting.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/2057551591668204799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/2057551591668204799'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2013/04/python-poly-cutting-and-splitting.html' title='PYTHON / Poly Cutting and Splitting'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1Vaht2tjF8nkgqRtyJPiRr7isWoe0UAcRldqJ5J-V-US7mAvdvJkIZNn4Jf9XjctJkYXSLIgn3gFTG7s3RW9ye0_pN9t1STfwsNNvZzxy31APmxoi5lfQAqAK-hYeb8Uhdj-289P1wpPu/s72-c/polycut_001.png" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-1278791143829077253</id><published>2013-03-26T18:24:00.000-07:00</published><updated>2013-03-26T18:24:11.698-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="function"/><category scheme="http://www.blogger.com/atom/ns#" term="list"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="randomize"/><category scheme="http://www.blogger.com/atom/ns#" term="vertex"/><category scheme="http://www.blogger.com/atom/ns#" term="vertex position"/><title type='text'>PYTHON / Revisiting Randomize Move Vertex Position</title><content type='html'>In these recent months, I get more serious with Python and Python in Maya.&lt;br /&gt;
&lt;br /&gt;
I happened to also enrolled CG Workshop class with&amp;nbsp;&lt;b&gt;Shaun Friedberg&lt;/b&gt; as the teacher. The short course helps me to put everything together.&lt;br /&gt;
&lt;br /&gt;
By having assignments here and there and being shown how Python can be used in Maya, I am forced to think further about actually writing my own Python scripts and further understand about Python and its usage in Maya.&lt;br /&gt;
&lt;br /&gt;
Python is after all a very easy programming language and surprisingly flexible especially when packing and unpacking and processing List and Dictionary and those kind of stuffs that would be a lot more complicated to do in MEL.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;PYTHON IN BLENDER&lt;/b&gt;&lt;br /&gt;
Outside Maya, I am also really interested about Python usage in order 3D package. I have not got time to study Python in Houdini or Softimage.&lt;br /&gt;
&lt;br /&gt;
However, I have been diving inside Blender Python and more so recently.&lt;br /&gt;
&lt;a href=&quot;http://blendersushi.blogspot.com.au/search?q=python&quot;&gt;http://blendersushi.blogspot.com.au/search?q=python&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Maya users out there, if you have not used Blender, you are missing a big thing.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;PYTHON IN MAYA&lt;/b&gt;&lt;br /&gt;
I decided to revisit my previous blog post and update some of the old MEL scripts, such as:&lt;br /&gt;
&lt;a href=&quot;http://mayaspiral.blogspot.com.au/2012/08/script-randomize-vertex-position.html&quot;&gt;http://mayaspiral.blogspot.com.au/2012/08/script-randomize-vertex-position.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Below is the updated script in Python, much simpler.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;background-color: white; margin: 0px; outline: none; padding: 0px; text-align: justify;&quot;&gt;
&lt;h3 style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bolder; line-height: 19px; margin: 0.83em 0px; padding: 0px; position: relative;&quot;&gt;
SCRIPT DOODLE: Move vertex position in random direction within min and max value&lt;/h3&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px; text-align: start;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;pre class=&quot;bbcode_code&quot; style=&quot;background-color: #f2f6f8; border-style: inset; border-width: 1px; direction: ltr; height: 160px; overflow: scroll; padding: 6px;&quot;&gt;&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17.265625px;&quot;&gt;import maya.cmds as mc
import maya.mel as mel
import random as random

mySelectedObjects = mc.ls(selection=True, long=True)
myVerts = mel.eval(&quot;getVerts;&quot;)

for vert in myVerts:
    min = -0.5
    max = 0.5
    randNumX = random.uniform(min, max)
    randNumY = random.uniform(min, max)
    randNumZ = random.uniform(min, max)

    mc.select(vert, replace=True)
    mc.move(randNumX, randNumY, randNumZ, relative=True)

mc.select(mySelectedObjects, replace=True)
&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;hr style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot; /&gt;
&lt;br style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
Of course doing it like above is not very elegant. I cheated by using &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mel.eval(&quot;getVerts;&quot;)&lt;/span&gt; which still basically using Maya MEL to get list of vertices and its index value from selected object.&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;b&gt;PYTHON WAY TO GET VERTS LIST OF SELECTED OBJECT&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mySelectedObjects = mc.ls(selection=True, long=True)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;myVertsList = []&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;for object in mySelectedObjects:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; totalVerts = mc.polyEvaluate(object, vertex=True)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; for number in range(totalVerts):&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; myVertsList.append(object+&#39;.vtx[{number}]&#39;.format(number=number))&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;background-color: white; margin: 0px; outline: none; padding: 0px; text-align: justify;&quot;&gt;
&lt;h3 style=&quot;margin: 0.83em 0px; padding: 0px; position: relative; text-align: start;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Above, we basically use Python command polyEvaluate that will get the total number of vertex of currently selected object, and then do another loop that will append the data into a List that contains the vertex address.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
We could update the script like below:&lt;/div&gt;
&lt;h3 style=&quot;margin: 0.83em 0px; padding: 0px; position: relative; text-align: start;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bolder; line-height: 19px; text-align: justify;&quot;&gt;SCRIPT DOODLE: Move vertex position in random direction within min and max value v2&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px; text-align: start;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;pre class=&quot;bbcode_code&quot; style=&quot;background-color: #f2f6f8; border-style: inset; border-width: 1px; direction: ltr; height: 160px; overflow: scroll; padding: 6px;&quot;&gt;&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17.265625px;&quot;&gt;import maya.cmds as mc
import maya.mel as mel
import random as random

mySelectedObjects = mc.ls(selection=True, long=True)
#myVerts = mel.eval(&quot;getVerts;&quot;)

myVertsList = []

for object in mySelectedObjects:
    totalVerts = mc.polyEvaluate(object, vertex=True)
    for number in range(totalVerts):
        myVertsList.append(object+&#39;.vtx[{number}]&#39;.format(number=number))

for vert in myVertsList:
    min = -0.5
    max = 0.5
    randNumX = random.uniform(min, max)
    randNumY = random.uniform(min, max)
    randNumZ = random.uniform(min, max)

    mc.select(vert, replace=True)
    mc.move(randNumX, randNumY, randNumZ, relative=True)

mc.select(mySelectedObjects, replace=True)
&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;hr style=&quot;background-color: white; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; text-align: justify;&quot; /&gt;
Of course doing it like above is still pretty ugly and not a very elegant code. At the moment, it is simply running codes line after line. It does the job but we can make it better to turn it into a FUNCTION.&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;background-color: white; margin: 0px; outline: none; padding: 0px; text-align: justify;&quot;&gt;
&lt;h3 style=&quot;margin: 0.83em 0px; padding: 0px; position: relative; text-align: start;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bolder; line-height: 19px; text-align: justify;&quot;&gt;SCRIPT DOODLE: Move vertex position in random direction within min and max value v3&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px; text-align: start;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;pre class=&quot;bbcode_code&quot; style=&quot;background-color: #f2f6f8; border-style: inset; border-width: 1px; direction: ltr; height: 160px; overflow: scroll; padding: 6px;&quot;&gt;&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17.265625px;&quot;&gt;import maya.cmds as mc
import maya.mel as mel
import random as random

def getVerts():

    mySelectedObjects = mc.ls(selection=True, long=True)
    myVertsList = []

    for object in mySelectedObjects:
        totalVerts = mc.polyEvaluate(object, vertex=True)
        for number in range(totalVerts):
            myVertsList.append(object+&#39;.vtx[{number}]&#39;.format(number=number))

    return myVertsList

def randomizeVerts(myVertsList):
    for vert in myVertsList:
        min = -0.5
        max = 0.5
        randNumX = random.uniform(min, max)
        randNumY = random.uniform(min, max)
        randNumZ = random.uniform(min, max)

        mc.select(vert, replace=True)
        mc.move(randNumX, randNumY, randNumZ, relative=True)

    mc.select(mySelectedObjects, replace=True)

vertexList= getVerts()
randomizeVerts(vertexList)
&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
Above, I break things into 2 different functions:&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
1. First function getVerts() will return a list of vertex from selected objects.&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
2. Second function randomizeVerts() will process whatever vertex data specified and passed into it. Which in our case, delivered from getVerts().&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
It is probably fine to make the Python script more general and portable, but for our purpose in creating Maya Python script that &quot;randomize move vertex position&quot;, we can just simply put everything together and giving the user ability to focus and change the value MIN and MAX of randomize move vertices of currently selected objects.&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
Simpler is better.&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;background-color: white; margin: 0px; outline: none; padding: 0px; text-align: justify;&quot;&gt;
&lt;h3 style=&quot;margin: 0.83em 0px; padding: 0px; position: relative; text-align: start;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; font-weight: bolder; line-height: 19px; text-align: justify;&quot;&gt;SCRIPT DOODLE: Move vertex position in random direction within min and max value v4&lt;/span&gt;&lt;/h3&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px; text-align: start;&quot;&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;pre class=&quot;bbcode_code&quot; style=&quot;background-color: #f2f6f8; border-style: inset; border-width: 1px; direction: ltr; height: 160px; overflow: scroll; padding: 6px;&quot;&gt;&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;span style=&quot;color: #333333;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 17.265625px;&quot;&gt;import maya.cmds as mc
import maya.mel as mel
import random as random

def randomizeMoveVertex(min, max):
    &#39;&#39;&#39;
    To move and randomize the vertex position based on specified min and max

    Parameters
    ----------------------------
    min = float value
    max = float value

    Returns
    ----------------------------
    None

    Examples
    ----------------------------
    1. Select some objects in 3D Scene
    2. Run the command: randomizeMoveVertex(-0.5, 0.5)

    &#39;&#39;&#39;
    # Get user selected objects as list
    mySelectedObjects = mc.ls(selection=True, long=True)

    for object in mySelectedObjects:
        totalVerts = mc.polyEvaluate(object, vertex=True)
        for number in range(totalVerts):

            randNumX = random.uniform(min, max)
            randNumY = random.uniform(min, max)
            randNumZ = random.uniform(min, max)

            # Directly selecting Vertex and Move it one by one
            mc.select(object+&#39;.vtx[{number}]&#39;.format(number=number))
            mc.move(randNumX, randNumY, randNumZ, relative=True)

    # Re-Select the previously selected objects
    mc.select(mySelectedObjects, replace=True)

randomizeMoveVertex(-0.2, 0.2)
&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;div style=&quot;color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 13.63636302947998px; line-height: 17.27272605895996px; margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
That is pretty much it. The Python script to randomize move vertex position for currently selected object(s) is working as before.&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
Very simple example. What we does is basically converting it from MEL and then we started to think in Python context and I also tidy up the script a bit.&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
Of course a simple script like above can be improved further, such as making it so user can select particular XYZ axis. Or perhaps we can create some kind of UI that make the script LIVE and the value can be changed further and the effect can be seen in realtime.&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0px; outline: none; padding: 0px;&quot;&gt;
Maybe that will happen in near future.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/1278791143829077253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2013/03/python-revisiting-randomize-move-vertex.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/1278791143829077253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/1278791143829077253'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2013/03/python-revisiting-randomize-move-vertex.html' title='PYTHON / Revisiting Randomize Move Vertex Position'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-3992774343585332951</id><published>2013-01-14T17:45:00.001-08:00</published><updated>2013-03-09T14:36:25.981-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="blender"/><category scheme="http://www.blogger.com/atom/ns#" term="dust"/><category scheme="http://www.blogger.com/atom/ns#" term="fire"/><category scheme="http://www.blogger.com/atom/ns#" term="fluid"/><category scheme="http://www.blogger.com/atom/ns#" term="maya"/><category scheme="http://www.blogger.com/atom/ns#" term="resolution"/><category scheme="http://www.blogger.com/atom/ns#" term="smoke"/><category scheme="http://www.blogger.com/atom/ns#" term="upres"/><category scheme="http://www.blogger.com/atom/ns#" term="volumetric"/><title type='text'>SOUP / Up Res Maya Fluid</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a class=&quot;vt-p&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZciYJuxfqKlzzNxhm6_22iboeUTxFyk5NXWnVNLtdQGGauOkux42928_iwYztknTXvRHol7KqdfXRGhUpKlqyqcNykkzXdt1y0HdSVdWG0NgqR_NlDDnta7OWY8ildZprsgqp-joEyzgP/s1600/soup_002_hires.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZciYJuxfqKlzzNxhm6_22iboeUTxFyk5NXWnVNLtdQGGauOkux42928_iwYztknTXvRHol7KqdfXRGhUpKlqyqcNykkzXdt1y0HdSVdWG0NgqR_NlDDnta7OWY8ildZprsgqp-joEyzgP/s640/soup_002_hires.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;HIGH RES version of the low resolution Fluid below. Cached in about 30 minutes.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
I am currently doing self RnD (Research and Development) in the area of 3D Fluid and Volumetric. I am going to compare Maya Fluid, Blender Fluid, Houdini Fluid (Smoke Solver), adding more information whenever I have time in between projects.&lt;br /&gt;
&lt;br /&gt;
I was actually going to title this post: &lt;b&gt;&quot;Maya Fluid RnD VS Blender Fluid VS Houdini Fluid&quot;&lt;/b&gt;, but that was quite too ambitious after all.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a class=&quot;vt-p&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZIIu73w-XIjbVsD3ITB0e4iQDEQd8ERvcN3BXNPDE-8asAgp_X0nHcSDEfyVhHOBGvFwaFBJ4d33zrWA-muvcBZm1boj9LUU33ZgIXV9BJdV58jQ3VItEiVnII5i-h0Wlvw8uCWbPqlYK/s1600/soup_002_lores.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;225&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZIIu73w-XIjbVsD3ITB0e4iQDEQd8ERvcN3BXNPDE-8asAgp_X0nHcSDEfyVhHOBGvFwaFBJ4d33zrWA-muvcBZm1boj9LUU33ZgIXV9BJdV58jQ3VItEiVnII5i-h0Wlvw8uCWbPqlYK/s400/soup_002_lores.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;LOW RES version of the Fluid above. Cached very fast, probably 3-5 minutes.&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
The aim of the post is really to share a bit of information that I feel about Maya Fluid, my finding and understanding of &amp;nbsp;&lt;b&gt;UpResFluid SOuP&lt;/b&gt;&amp;nbsp;node that comes with SOuP plugin.&lt;br /&gt;
&lt;br /&gt;
UpResFluid SOuP can save you a lot of wasted time trying to up resolution the Fluid, while maintaining and controling the motion that you have setup using lo-res or mid-res Fluid.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;NOTE:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;I am a self-taught, and unlike many of you CG artists that have worked on &quot;real&quot; high end projects, my skill is probably nothing. So please correct me for every wrong information I might have written in here.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;FLUID = TIME CONSUMING, BUT COOL LOOKING IN HIGH RESOLUTION&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Fluid and Volumetric FX is one of the high end feature of Computer Graphics that tends to be time consuming, unpredictable, eating hundreds or thousands of hours easily, both human and computer hours to simulate. There are plenty of attributes and parameters to tweak to get particular look of Fluid, multiple takes, trial and error brute force are unavoidable.&lt;br /&gt;
&lt;br /&gt;
Maya Fluid itself comes with nearly hundred of parameters, giving the artist plenty of controls (and also plenty of headache) to create certain Fluid look (whether it is going to be smoke like, dust like, fire like, steam like, etc).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Blender Fluid (the new Smoke and Fire)&lt;/b&gt; is simpler in term of parameters to control. I will not talk too much about it in this blog post, but it is something that is worth learning as well.&lt;br /&gt;
&lt;br /&gt;
Blender Smoke and Fire 3D viewport preview is really fast and interactive, I think it is because of CUDA. While Houdini Fluid, I have not touched much at the moment, only knowing few parameters and workflow.&lt;br /&gt;
&lt;br /&gt;
However, not matter whether it is Maya, Blender, or Houdini, getting Fluid to behave and render beautifully will require a lot of time. Simulation will take hours (also need plenty of Disk Space and RAM), rendering will also take more hours.&lt;br /&gt;
&lt;br /&gt;
The trick is to let the machine calculate the heavy fluid cache whenever you are sleeping. No time should be wasted. This means that we need to understand what each attribute/parameter value of Fluid does to affect the simulation, what value can still be changed after the cache.&lt;br /&gt;
&lt;br /&gt;
Similar to Particle, I think working with Fluid, one need to think about:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;The real Fluid (get references, study them, and think how you can recreate and enhance it in CG)&lt;/li&gt;
&lt;li&gt;The Setup (Source of Emission, Domain/Container)&lt;/li&gt;
&lt;li&gt;The Controlled Animation&lt;/li&gt;
&lt;li&gt;The Simulation (Fluid Cache)&lt;/li&gt;
&lt;li&gt;The Final Look&lt;/li&gt;
&lt;/ol&gt;
A quick observation notes:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Blender 3D Fluid is super fast in 3D Viewport, a lot faster than Maya. Blender 3D Fluid takes quite a few steps to be rendered correctly. Blender Fluid tends to be noisy with default setting, so increase of steps and other value is required.&lt;/li&gt;
&lt;li&gt;Maya 3D Fluid looks really good in high resolution. Working on low resolution fluid and render in high resolution is wrong because the simulation will change when we started to up res. One should work and understand what changes during the up resolution of fluid.&lt;/li&gt;
&lt;li&gt;Maya Fluid comes with plenty of attributes and values. Blender Fluid is much simplified, less attribute to watch for.&lt;/li&gt;
&lt;li&gt;Houdini Fluid ......&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;MAYA FLUID&lt;/b&gt;&lt;br /&gt;
For typical dynamic 3D Fluid, we need 3D Fluid Container and Fluid Emitter, at least. Fluid cannot exist outside of its container.&lt;br /&gt;
&lt;br /&gt;
Maya Fluid is made of Voxel which is defined by the size of container and how many slices you set for the container. Maya Fluid 2D just means it has 1 voxel size for one of the axis (maybe Z).&lt;br /&gt;
&lt;br /&gt;
Always watch for the &lt;b&gt;RATIO of Fluid&lt;/b&gt;. (Container)&amp;nbsp;Size and (Base) Resolution, both account for the appearance, behaviour and realism of the fluid:&lt;br /&gt;
- 1:1 Ratio of Fluid is too low of resolution. Good for nothing.&lt;br /&gt;
- 1:50 probably better for test.&lt;br /&gt;
- 1:100 starts to look good and realistic&lt;br /&gt;
- Higher than 200 ratio and you probably start looking at hours of calculation.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;NOTE:&lt;/b&gt;&lt;br /&gt;
When I wrote low resolution is &quot;good for nothing&quot;, this is not completely true. Some simulations actually can use low resolution Fluid and already sufficient.&lt;br /&gt;
&lt;br /&gt;
Always take your computer RAM and CPU power into consideration, otherwise Maya may crash if you overload it. To add into complexity, Maya has the &lt;b&gt;High Detail Solve&lt;/b&gt;, which usually make the Fluid behave like Ink dropped into water. A more correct Fluid, but much slower.&lt;br /&gt;
&lt;br /&gt;
Main things and important values to watch for:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Fluid Container Boundary (open or closed or automatic?)&lt;/li&gt;
&lt;li&gt;Fluid Gravity&lt;/li&gt;
&lt;li&gt;Fluid Buoyancy (rise = positive value, fall = negative value)&lt;/li&gt;
&lt;li&gt;Fluid Dissipation&lt;/li&gt;
&lt;li&gt;Fluid Swirl and Turbulance&lt;/li&gt;
&lt;li&gt;Fluid Look&lt;/li&gt;
&lt;li&gt;Emitter Density and Rate&lt;/li&gt;
&lt;li&gt;Emission Speed&lt;/li&gt;
&lt;li&gt;Emission Source&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;b&gt;VELOCITY MATTER THE MOST IN DRIVING VOXEL&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Turn on Draw Velocity to be able to see the resulting velocity of the simulation. This is a quick way to see the behaviour of Fluid that we are trying to control.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;BLENDER FLUID&lt;/b&gt;&lt;br /&gt;
I am going to write a post special on Smoke and Fire in Blender &amp;nbsp;at &lt;b&gt;Blender Sushi&lt;/b&gt; blog. When it is ready I will (put the link here)&lt;br /&gt;
&lt;br /&gt;
Blender Sushi Blog:&amp;nbsp;&lt;a class=&quot;vt-p&quot; href=&quot;http://blendersushi.blogspot.com.au/&quot;&gt;blendersushi.blogspot.com.au&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/-c9SjVXy3Ko&quot; width=&quot;640&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;br /&gt;
I did write a bit about Volumetric Effect: (kind of like Blender way to crunch, displace, and prepare Voxel Data into something that is renderable)&lt;br /&gt;
&lt;a class=&quot;vt-p&quot; href=&quot;http://blendersushi.blogspot.com.au/2012/01/volumetric-understanding-point-density.html&quot;&gt;http://blendersushi.blogspot.com.au/2012/01/volumetric-understanding-point-density.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is another quicky effort on Blender Fire Smoke to create Fire Flame. It can be a lot better of course...&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/Lq7mhI-KU9I&quot; width=&quot;640&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Although, for actual &lt;b&gt;Smoke and Fire Simulation&lt;/b&gt; in Blender, especially with the new Blender Smoke and Fire feature, I have to take a bit of time to write a new article about it. It is much simpler than Maya, actually. It seems like limited in term of control, but you never guess until you use it. Maybe Blender Fluid is all you ever need.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;HOUDINI FLUID&lt;/b&gt;&lt;br /&gt;
Houdini Fluid (Smoke Solver) is the one that I have not looked very deeply, but as soon as it is ready, I will post it at &lt;b&gt;Houdini Doodles Blog&lt;/b&gt;.&lt;br /&gt;
&lt;a class=&quot;vt-p&quot; href=&quot;http://houdoodles.blogspot.com.au/&quot;&gt;http://houdoodles.blogspot.com.au/&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
Houdini workflow is similar to Maya SOuP Upres.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;CUDA FLUID PLUGIN FOR MAYA AND HOUDINI&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
There is this cool experimental plugin that you may want to play around with:&lt;br /&gt;
&lt;a class=&quot;vt-p&quot; href=&quot;http://www.foliativ.net/book/index.php?post/2011/03/04/Cuda-Fluid-Solver-Plugin&quot;&gt;http://www.foliativ.net/book/index.php?post/2011/03/04/Cuda-Fluid-Solver-Plugin&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
It is a technology demo, so not really for production, but it can help you to see how Fluid parameter works and how it will &quot;advect&quot; high volume of Particles.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
&lt;b&gt;SOUP UPRES FLUID NODE&lt;/b&gt;&lt;/h2&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a class=&quot;vt-p&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQV7DrTmohwyK4yKzMqnOfXhyphenhyphenCrXJ1YCFPt8IdEq8W0hfp2oq9lyl1rffXEAkEPqh6Vwj3P-8FG2AlFg8gJwxnYKga_SAU8_2eIhThOdqoWxf56gmxe7nH_eFr5bgX_B7kESslfma67-g5/s1600/upres_001.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;417&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQV7DrTmohwyK4yKzMqnOfXhyphenhyphenCrXJ1YCFPt8IdEq8W0hfp2oq9lyl1rffXEAkEPqh6Vwj3P-8FG2AlFg8gJwxnYKga_SAU8_2eIhThOdqoWxf56gmxe7nH_eFr5bgX_B7kESslfma67-g5/s640/upres_001.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Low Resolution Fluid VS High Resolution Fluid.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Finally, we get to the actual topic: &lt;b&gt;SOuP UpResFluid node.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Before you read my notes, you must have read the little description of the node here:&lt;br /&gt;
&lt;a class=&quot;vt-p&quot; href=&quot;http://www.soup-dev.com/examples2_1.htm&quot;&gt;http://www.soup-dev.com/examples2_1.htm&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
And like me, you must also have studied and watched some Maya Fluid stuffs from &lt;b&gt;David Schoneveld&lt;/b&gt;, including the video on UpRes Fluid and Wavelet stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Why do we need something like UpResFluid node?&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
The main reason &amp;nbsp;is because when you are working with Maya Fluid with low resolution voxel, it will not give you the same Fluid motion when you are simply increasing the resolution.&lt;br /&gt;
&lt;br /&gt;
The behaviour of Fluid will change when you increase the resolution of Fluid. And this can be quite frustrating. A lot of guessing work. And when working with high resolution Fluid, everything becomes so much slower.&lt;br /&gt;
&lt;br /&gt;
With this UpResFluid node, we will not get much surprise or big changes in motion of Fluid when we are upping the resolution of Fluid. We also work from and with Low Resolution Cache while able to continue up-res the Fluid and see the result.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;LOW RES FLUID vs HIGH RES FLUID NOTES&lt;/b&gt;&lt;br /&gt;
This is something that you need to test yourself if you are working with low resolution, but wanting a higher resolution Fluid.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;DISSIPATION: Faster with less voxel. Slower with more voxel&lt;/li&gt;
&lt;li&gt;SWIRL: Stronger with less voxel. Weaker with more voxel&lt;/li&gt;
&lt;li&gt;Buoyancy depends on Density, but more voxel seems to make the voxel goes &quot;up&quot; faster.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Ok, now, how do we use SOuP UpResFluid node?&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Applying the UpResFluid is very easy, simply by select your Low Resolution Fluid Shape and then select upresFluid node from SOuP Shelves and you will have your Higher Resolution Fluid that in theory &lt;b&gt;will maintain the fluid behaviour of low resolution fluid&lt;/b&gt; while giving it a much higher resolution look.&lt;br /&gt;
&lt;br /&gt;
What will happen under the hood:&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a class=&quot;vt-p&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5WGxBMg63wxdcpe-0XdXlwh1cgvJ7y9IBLjqP-hpQ3bGgwWhtD9VBL03qgUnSRDtXVmdxEdXGmBzL3h4YZzBGs4IeCrE_6m3fZu-zL0MSdZvAbUDurZG_uFBuvU-i6spDm06v1N7kTI8O/s1600/upres_004.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;340&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5WGxBMg63wxdcpe-0XdXlwh1cgvJ7y9IBLjqP-hpQ3bGgwWhtD9VBL03qgUnSRDtXVmdxEdXGmBzL3h4YZzBGs4IeCrE_6m3fZu-zL0MSdZvAbUDurZG_uFBuvU-i6spDm06v1N7kTI8O/s640/upres_004.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;RED = original setup, GREEN = automatically created&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;480&quot; src=&quot;http://www.youtube.com/embed/uq3qNNUQcXE&quot; width=&quot;640&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
Above is my first test using a very basic low resolution Fluid, and upping the resolution using the SOuP upresFluid node.&lt;br /&gt;
&lt;br /&gt;
My simulation above is not actually perfect (lots of anomaly there) as I need a bit more time to understand this node better. However, I feel like writing down my note anyway how to set this thing up.&lt;br /&gt;
&lt;br /&gt;
You might notice the High Resolution Fluid looks like something you see in many recent CG effect movies.&lt;br /&gt;
&lt;br /&gt;
Funny Fact:&lt;br /&gt;
I kind of figured out the workflow of this probably because I looked at Houdini Fluid a bit. Just the way Houdini able to cache, and re-using the cache to re-simulate.&lt;br /&gt;
&lt;br /&gt;
I supposed, that is basically the point of SOuP plugin, ability to transfer and passing information in deep component level. Something that Maya unable to do out of the box, but Houdini can do quite easily.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;THE WORKFLOW GOES LIKE THIS:&lt;/b&gt;&lt;br /&gt;
1. Work with a low resolution Fluid (small ratio) first. Get the Fluid motion right. I am personally happy to work with Maya Fluid as long I can see the changes interactively. Not having to wait hours for Playblast, or seeing simulation goes 1-2 minutes per frame or higher.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;LOW RESOLUTION FLUID&lt;/b&gt;&lt;/div&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a class=&quot;vt-p&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWxqGo_Ba5tmKROCfj_pCJ6xs0IlWC6ATvwpvDnUV-BW-T4evae3G9fpM_yo1llnJxNQihSsdKdoqyacbNXuxvi8Y6_MTpbs2-gsToEg2tZjST_wfEzzpomMU9z4-S3wg90UGRuZMsnub4/s1600/upres_002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWxqGo_Ba5tmKROCfj_pCJ6xs0IlWC6ATvwpvDnUV-BW-T4evae3G9fpM_yo1llnJxNQihSsdKdoqyacbNXuxvi8Y6_MTpbs2-gsToEg2tZjST_wfEzzpomMU9z4-S3wg90UGRuZMsnub4/s1600/upres_002.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Very low resolution, only 1:1.5 Ratio. Probably too low, but just for example.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
2. Once you are happy with the motion of the fluid, do cache your Low Resolution Fluid. You must do this. Once the low res Fluid is cached, simply turn it off.&lt;br /&gt;
&lt;br /&gt;
3. Assign UpResFluid SOuP node to this Fluid. You will now have a new High Resolution Fluid Shape node that is controlled by UpResFluid SOuP node.&lt;br /&gt;
&lt;br /&gt;
4. Select a frame where you can see your Fluid. Start tweaking UpResFluid SOuP node and see the changes in real time (turn on Envelope). Do test render time to time.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a class=&quot;vt-p&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim0SphsDFcqFrPNJTuh7sj7IK-xlxULrfpPLJppR-qbVJnc3ZN0C2HBlwk1SYLXIl3w_zR097YA_Arl8Jld3WRpwvlnt3p-1nBhqSJRB7WH4O1aa748V0lUxvWiqFG34MwvK9ajp7-53XP/s1600/upres_005.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim0SphsDFcqFrPNJTuh7sj7IK-xlxULrfpPLJppR-qbVJnc3ZN0C2HBlwk1SYLXIl3w_zR097YA_Arl8Jld3WRpwvlnt3p-1nBhqSJRB7WH4O1aa748V0lUxvWiqFG34MwvK9ajp7-53XP/s640/upres_005.png&quot; width=&quot;339&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
5. When you are happy with the look, now you need to Cache the High Resolution Fluid (that is automatically created by UpResFluid SOuP node)&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;HIGH RESOLUTION FLUID (automatically created by SOuP UpResFluid node)&lt;/b&gt;&lt;/div&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a class=&quot;vt-p&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirzIhfeak4OpSK2EPw3_YYV96cAySZj0vuUoBpJ8g6hXnPjlhczbngdwkzmixUth6H3fIz2Zmv4Mz3mNCqsCcyooLBodkednEDKPKA5Siik9irhi79TKUWLCGjUkRKY9QIYQ8LJt8wakzA/s1600/upres_003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirzIhfeak4OpSK2EPw3_YYV96cAySZj0vuUoBpJ8g6hXnPjlhczbngdwkzmixUth6H3fIz2Zmv4Mz3mNCqsCcyooLBodkednEDKPKA5Siik9irhi79TKUWLCGjUkRKY9QIYQ8LJt8wakzA/s1600/upres_003.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Much higher resolution, &amp;nbsp;1: 12 Ratio, but still manageable.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Keep in mind that the Fluid Caching will still take some times to bake. Few hours are quite normal. Over night is also normal.&lt;br /&gt;
&lt;br /&gt;
You should also consider your computer RAM. If you go too crazy with Up-Res without thinking about RAM, Maya will crash.&lt;br /&gt;
&lt;br /&gt;
I think good computer for TD (Technical Director) has 24 GB of RAM. I have 6 GB at home, but probably only 4 GB really used by Maya before it crashes.&lt;br /&gt;
&lt;br /&gt;
6. Once the high resolution Fluid is cached, you can simply render the high resolution fluid.&lt;br /&gt;
&lt;br /&gt;
Think of this upres stuff &amp;nbsp;like when Low Poly Geometry turned into High Poly Geometry by using Catmull Clark Division and with high-resolution displacement.&lt;br /&gt;
&lt;br /&gt;
Of course the Fluid upres is not that simple. It is not simply &quot;displacing&quot; the voxel like if you are using Texture for Fluid. It does further my manipulating cached Velocity from low resolution Fluid, etc, etc.&lt;br /&gt;
&lt;br /&gt;
You need to ask Peter Shipkov for proper explanation. Or you can also search around for some information on Fluid, in regards to upres.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;EXAMPLE: COFFEE STEAM FLUID BY IVAYLOKATEV&lt;/b&gt;&lt;br /&gt;
&lt;a class=&quot;vt-p&quot; href=&quot;http://www.youtube.com/watch?v=nQHVxpqQ3Dc&quot;&gt;http://www.youtube.com/watch?v=nQHVxpqQ3Dc&lt;/a&gt;&lt;br /&gt;
I like the &quot;multi-layered&quot; high resolution feel of the Fluid simulation there, simulating Coffee Steam.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;EXAMPLE: RAINBOW COFFEE STEAM&lt;/b&gt;&lt;br /&gt;
&lt;a class=&quot;vt-p&quot; href=&quot;http://www.youtube.com/watch?v=6kEkcad5Tng&quot;&gt;http://www.youtube.com/watch?v=6kEkcad5Tng&lt;/a&gt;&lt;br /&gt;
This one is kind of cool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
WHEN YOU THINK YOU KNOW FLUID...&lt;/h2&gt;
... you don&#39;t.&lt;br /&gt;
&lt;br /&gt;
Not until you have painstakingly gone through different levels of Fluid situations and problems and found great solutions.&lt;br /&gt;
&lt;br /&gt;
3D Viewport Playblast and Simulation does not always equal the High Resolution simulations and render.&lt;br /&gt;
&lt;br /&gt;
Fluid is frustrating, requires lots of experiments and note-taking (as well as guessing). I guess I started to understand the challenge of VFX artists....&lt;br /&gt;
&lt;br /&gt;
Below are probably the main common attribute of Fluid that you need to keep eyes on all the time&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Emission and Noise Texture&lt;/li&gt;
&lt;li&gt;Swirl and Turbulance&lt;/li&gt;
&lt;li&gt;Size&amp;nbsp;+ Resolution of Container, which will affect the actual fluid simulations.&lt;/li&gt;
&lt;li&gt;The Ramp and Input Bias&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a class=&quot;vt-p&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6qgKYwAwlqEhZe4r7tJo5iaTmYMHuup8OC3DSTuS7ItYUo3IGRhD5AVuPRPhqtYKX3rohXDVhVse59brYJxVrt3KYBVCoEpJ3dJcWeE70DT9E8EGP80wS2vCynPFWeOho-RVGu9AqSQ9U/s1600/vfx_fire_019_pc.0070.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6qgKYwAwlqEhZe4r7tJo5iaTmYMHuup8OC3DSTuS7ItYUo3IGRhD5AVuPRPhqtYKX3rohXDVhVse59brYJxVrt3KYBVCoEpJ3dJcWeE70DT9E8EGP80wS2vCynPFWeOho-RVGu9AqSQ9U/s640/vfx_fire_019_pc.0070.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;PROBLEM: Fluid Edge too hard. Need to adjust Opacity Ramp and Input Bias.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a class=&quot;vt-p&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEQfUk3WCv5YLkP0_w5e2fIQupp7vDVlWznm0wtkICMzi5SGIOQNbdPT9hEh1dC0PIO1ZJSc5u-oUtanE7WsOwVudjQeAQRG_AxNzJyuG7xpaPofW7Wj6yROBSMGhgAynpYP1hW-8AT08e/s1600/vfx_fire_020_pc.0301.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEQfUk3WCv5YLkP0_w5e2fIQupp7vDVlWznm0wtkICMzi5SGIOQNbdPT9hEh1dC0PIO1ZJSc5u-oUtanE7WsOwVudjQeAQRG_AxNzJyuG7xpaPofW7Wj6yROBSMGhgAynpYP1hW-8AT08e/s640/vfx_fire_020_pc.0301.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;PROBLEM: Voxel TOO DENSE, everything started to look like puff-puff and blocky like big particles.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h2&gt;
&lt;span style=&quot;color: red;&quot;&gt;UPDATE 20130118 / When NOT to use Up Res node&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
As additional CAUTION when using UpRes node from Luis my mentor advice me not to use this in assignments for now, eventhough it is seems like a good handy node.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For beginner&#39;s Fluid artist, we have to learn to push the limit and get the most out of your containers (Maya out of the box). SOuP production workflow won&#39;t be realistic for production and may add struggle to get studio work.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So, in my opinion, this node gives you power and access to this, but you need to use with care and it is much better for you to first understand Maya Fluid strength and limitation, before you look into this SOuP stuff.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
SPECIAL THANKS&lt;/h2&gt;
Thank you to&amp;nbsp;&lt;b&gt;Luis Pages&lt;/b&gt;, my teacher/mentor at VFX Learning. Some of information you gave from your lecture helps me understanding Maya Fluid. Although Fluid is still pain in the ass as it really takes hundred of hours to understand before one can started able to control and work and create something interesting.&lt;br /&gt;
&lt;br /&gt;
Thanks again for&amp;nbsp;&lt;b&gt;Peter Shipkov&lt;/b&gt;&amp;nbsp;for all the helps and providing this awesome high-end tool that makes Maya feels like high end tool for individual.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
RELATED ARTICLE&lt;/h3&gt;
&lt;a class=&quot;vt-p&quot; href=&quot;http://www.fxguide.com/featured/sci-tech-oscars-technical-coolness/&quot;&gt;http://www.fxguide.com/featured/sci-tech-oscars-technical-coolness/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/3992774343585332951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2013/01/soup-up-res-maya-fluid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/3992774343585332951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/3992774343585332951'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2013/01/soup-up-res-maya-fluid.html' title='SOUP / Up Res Maya Fluid'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZciYJuxfqKlzzNxhm6_22iboeUTxFyk5NXWnVNLtdQGGauOkux42928_iwYztknTXvRHol7KqdfXRGhUpKlqyqcNykkzXdt1y0HdSVdWG0NgqR_NlDDnta7OWY8ildZprsgqp-joEyzgP/s72-c/soup_002_hires.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-293130851605161500</id><published>2012-09-18T22:15:00.003-07:00</published><updated>2012-09-18T22:15:51.016-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="display"/><category scheme="http://www.blogger.com/atom/ns#" term="error"/><category scheme="http://www.blogger.com/atom/ns#" term="issue"/><category scheme="http://www.blogger.com/atom/ns#" term="maya"/><category scheme="http://www.blogger.com/atom/ns#" term="paint weight"/><category scheme="http://www.blogger.com/atom/ns#" term="weight"/><title type='text'>BUG / Paint Weight NOT Displaying Weight</title><content type='html'>This is another &quot;silly&quot; thing that Maya UI has that often cause a headache.&amp;nbsp;Few students have this issue.&lt;br /&gt;
&lt;br /&gt;
Have you ever encounter this in Maya:&lt;br /&gt;
You select your mesh geometry that is bound to joints and start using &lt;b&gt;Paint Weight Tool&lt;/b&gt;, but not seeing any Color or weight indication whatsoever?&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD33KlR91SKmNWJMs8yZ4xySsz-8xj8u7Sd0rYx6qGCcmL5ts-EW7JzXryAP5726ShinWNJ8BnilFuKt8dicZJf3O86Db291u7LW5Bk9Npco9MuACa403_bDp78eXvTTSFeo563kV6M2Vt/s1600/Autodesk+Maya+2012+x64+-+Student+Version+CUsersJimmyDocumentsmayaprojectsPLscenestejo_093_cbs.mb+++---+++tejoHi_geo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD33KlR91SKmNWJMs8yZ4xySsz-8xj8u7Sd0rYx6qGCcmL5ts-EW7JzXryAP5726ShinWNJ8BnilFuKt8dicZJf3O86Db291u7LW5Bk9Npco9MuACa403_bDp78eXvTTSFeo563kV6M2Vt/s1600/Autodesk+Maya+2012+x64+-+Student+Version+CUsersJimmyDocumentsmayaprojectsPLscenestejo_093_cbs.mb+++---+++tejoHi_geo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
And you wonder why this does not work? And you create new Maya file and you are still getting the same &quot;3D viewport issue&quot;.&amp;nbsp;Well, well, the culprit is most like this:&lt;br /&gt;
&lt;br /&gt;
TURN OFF USE DEFAULT MATERIAL ON 3D VIEW&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUfZSiBWYhhKTfK3LxkwRewb_jwrwHoh0zNC5vxCesL8BtLcRc6YW6HWAGaR-VrTBkwWq52oZ_xcu_qHoCF3Z0qEj97k5Euu6omJ_A59wk7BJipp32VRrMs_h2WbIGyVZ2lulajDYKzwSe/s1600/Autodesk+Maya+2012+x64+-+Student+Version+CUsersJimmyDocumentsmayaprojectsPLscenestejo_093_cbs.mb+++---+++tejoHi_geo_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUfZSiBWYhhKTfK3LxkwRewb_jwrwHoh0zNC5vxCesL8BtLcRc6YW6HWAGaR-VrTBkwWq52oZ_xcu_qHoCF3Z0qEj97k5Euu6omJ_A59wk7BJipp32VRrMs_h2WbIGyVZ2lulajDYKzwSe/s1600/Autodesk+Maya+2012+x64+-+Student+Version+CUsersJimmyDocumentsmayaprojectsPLscenestejo_093_cbs.mb+++---+++tejoHi_geo_2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Turn OFF the &quot;Use default material&quot; option. That option will basically OVERRIDE the Paint Weight display. This is I think a little bit silly feature of Maya UI designer.&lt;br /&gt;
&lt;br /&gt;
Second potential culprit is usually the Paint Weight Tool itself, but usually if you Reset Tool, it should be okey:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjun-T2XPwjjAVPJHguCG8SSDm2rTb0UY5jwBNPJ2ytARdTr8MVq6BB2iq-fTPSVGLPDe3WeSUw9PWYGngxLzWkram4m0j3UUYPAjAh6RzUDPYTcWMbhf-SVznTbe0zqNi8IuOP9k_RpOkK/s1600/Autodesk+Maya+2012+x64+-+Student+Version+CUsersJimmyDocumentsmayaprojectsPLscenestejo_093_cbs.mb+++---+++tejoHi_geo_3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjun-T2XPwjjAVPJHguCG8SSDm2rTb0UY5jwBNPJ2ytARdTr8MVq6BB2iq-fTPSVGLPDe3WeSUw9PWYGngxLzWkram4m0j3UUYPAjAh6RzUDPYTcWMbhf-SVznTbe0zqNi8IuOP9k_RpOkK/s1600/Autodesk+Maya+2012+x64+-+Student+Version+CUsersJimmyDocumentsmayaprojectsPLscenestejo_093_cbs.mb+++---+++tejoHi_geo_3.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif45Bg5wTSvNi_u3yq4u9WxtcKJEkF2SRpFu99pGuiRyxJqsfjOXU3lbXs3KYuJYn3skV-iVmWZxxtW_hts_JTw2QpkUy_2-H667RlzZqHQHo4cg22hlek5bYcPVxx593uE44dw-0Luwoc/s1600/PrtScr+capture_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEif45Bg5wTSvNi_u3yq4u9WxtcKJEkF2SRpFu99pGuiRyxJqsfjOXU3lbXs3KYuJYn3skV-iVmWZxxtW_hts_JTw2QpkUy_2-H667RlzZqHQHo4cg22hlek5bYcPVxx593uE44dw-0Luwoc/s1600/PrtScr+capture_2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
BUT, that 3D View&#39;s Display Options that actually overrides 3D View Port is super annoying.&amp;nbsp;Just keep that in mind.&lt;br /&gt;
&lt;br /&gt;
Watch also any hidden option that relates to 3D Viewport such as &quot;Interactive Shading&quot;. Can be useful at time, but for general Maya users, it is very unlikely they know what&#39;s going on:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXRD2L5nwiaQgIraEnwo8OrEDvwYEZN5Ry_6hU-bO0VnZxosU39ha2P-VJiTyWNPMj-lbJZt7ziuM-Pn1x14qT5j068GgEUsNdvmIV4PALrU6WjxzRgFqhht7uEpavTvh3qSoLzIBsn1e1/s1600/Autodesk+Maya+2012+x64+-+Student+Version+CUsersJimmyDocumentsmayaprojectsPLscenestejo_093_cbs.mb+++---+++tejoHi_geo_4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXRD2L5nwiaQgIraEnwo8OrEDvwYEZN5Ry_6hU-bO0VnZxosU39ha2P-VJiTyWNPMj-lbJZt7ziuM-Pn1x14qT5j068GgEUsNdvmIV4PALrU6WjxzRgFqhht7uEpavTvh3qSoLzIBsn1e1/s1600/Autodesk+Maya+2012+x64+-+Student+Version+CUsersJimmyDocumentsmayaprojectsPLscenestejo_093_cbs.mb+++---+++tejoHi_geo_4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
RESET PREFERENCE&lt;br /&gt;
This is also major culprit sometimes. When preferences changed without user knowledge, it is good idea to delete Maya preferences, but consult your Technical Director or teacher or mentor:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmreKl5FRTwZg8mk2DJQS8dkDjQp15c9xhKes0H8pROa7ifDZxzaASmefBehkWabp02PkK28QVDFT3NFiGPySvnFbMEYnm7NUvSCf-J9c_VDSu4oj7gqwl_42UVp8E8TQx3YMAALeW1hVx/s1600/Zoomit+Zoom+Window_3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmreKl5FRTwZg8mk2DJQS8dkDjQp15c9xhKes0H8pROa7ifDZxzaASmefBehkWabp02PkK28QVDFT3NFiGPySvnFbMEYnm7NUvSCf-J9c_VDSu4oj7gqwl_42UVp8E8TQx3YMAALeW1hVx/s1600/Zoomit+Zoom+Window_3.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Anyways, if you encounter something weird with your Maya scene file. Save it as Maya ASCII, and re-import into new fresh Maya with empty scene. That will usually fix most of issue. If not, it could be one of the node inside your Maya file is causing error and you need to delete that manually inside Text Editor.</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/293130851605161500/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/bug-paint-weight-not-displaying-weight.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/293130851605161500'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/293130851605161500'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/bug-paint-weight-not-displaying-weight.html' title='BUG / Paint Weight NOT Displaying Weight'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD33KlR91SKmNWJMs8yZ4xySsz-8xj8u7Sd0rYx6qGCcmL5ts-EW7JzXryAP5726ShinWNJ8BnilFuKt8dicZJf3O86Db291u7LW5Bk9Npco9MuACa403_bDp78eXvTTSFeo563kV6M2Vt/s72-c/Autodesk+Maya+2012+x64+-+Student+Version+CUsersJimmyDocumentsmayaprojectsPLscenestejo_093_cbs.mb+++---+++tejoHi_geo.png" height="72" width="72"/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-8353244635810165778</id><published>2012-09-17T05:30:00.003-07:00</published><updated>2012-09-17T15:50:41.288-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="abstract"/><category scheme="http://www.blogger.com/atom/ns#" term="blender"/><category scheme="http://www.blogger.com/atom/ns#" term="maya"/><category scheme="http://www.blogger.com/atom/ns#" term="mesh"/><category scheme="http://www.blogger.com/atom/ns#" term="point"/><category scheme="http://www.blogger.com/atom/ns#" term="pointcloudtomesh"/><category scheme="http://www.blogger.com/atom/ns#" term="soup"/><title type='text'>SOUP / PointCloudToMesh = Abstract</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgedpS_0t_2nBnDE3OKElmq89_4gur-xX_ABw3UvpQrM3R3r1AU-ezE2ONNwhkLGDMEEFkP4Gyl6jPcccoMANrefiwNUrbYtYn8BvHYohyphenhyphen-DD89T91lEh43lwktQfXvMdHk8vrBrg-aQcBv/s1600/MAKA_MESH.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgedpS_0t_2nBnDE3OKElmq89_4gur-xX_ABw3UvpQrM3R3r1AU-ezE2ONNwhkLGDMEEFkP4Gyl6jPcccoMANrefiwNUrbYtYn8BvHYohyphenhyphen-DD89T91lEh43lwktQfXvMdHk8vrBrg-aQcBv/s400/MAKA_MESH.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;INGREDIENT&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;PointCloudToMesh SOuP&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;RECIPE&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
This node in particular is something that is useful to create abstract looking mesh. It just asked for it.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
1. POINT POSITION&lt;/div&gt;
&lt;div&gt;
You basically start with anything in Maya that can supply Point Position: Particles, Mesh, Curves, etc.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
2. FILTERING&lt;/div&gt;
&lt;div&gt;
With Particles, you simply pipe it into PointCloudToMesh SOuP node and then output as Mesh. For some other points, you need to use node like PointAttributeToArray and turn on Point Position option.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Supposedly, this PontCloudToMesh SOuP also regards the point normal, point color (rgba). I have not seen it happening yet.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdjlXPgPNGyK4TTc20IGPtzlsyYzvWlFWISyMdFMRr27Twkiq87C8DOiPvhjcg0hLNI8U_6TIepj_6WY6BxpdFJj6XktJhvH3k7QjBgTT73DMbx7KcVcUqcd85DFYh8VS_UU1lQ3Tqu5KP/s1600/PrtScr+capture_4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdjlXPgPNGyK4TTc20IGPtzlsyYzvWlFWISyMdFMRr27Twkiq87C8DOiPvhjcg0hLNI8U_6TIepj_6WY6BxpdFJj6XktJhvH3k7QjBgTT73DMbx7KcVcUqcd85DFYh8VS_UU1lQ3Tqu5KP/s1600/PrtScr+capture_4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
3. PRESENTATION&lt;/div&gt;
&lt;div&gt;
The resulting mesh of PointCloudToMesh is really random. The mesh is very non-manifold, so it needs to be cleaned up. You get all sort of funny and interesting patterns, depending on how things were ordered.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5kg1I6utLv5fooWWi0nbvCy5VNye0tI-Zc2_1f7SbWoYXi4T_EX2jorj9l77-qst7GjwRW812xo0Maxqw2jWhai9hjViHlJc3aYCkNB8FwVtRn0Be5jZTp8zMp-K9vUDP7_WP_G8AAsqH/s1600/PrtScr+capture_5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;269&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5kg1I6utLv5fooWWi0nbvCy5VNye0tI-Zc2_1f7SbWoYXi4T_EX2jorj9l77-qst7GjwRW812xo0Maxqw2jWhai9hjViHlJc3aYCkNB8FwVtRn0Be5jZTp8zMp-K9vUDP7_WP_G8AAsqH/s640/PrtScr+capture_5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I usually would bring it into Blender to make it more &quot;solid&quot; and to render it out.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis5rlOxwED7sGqNipGE1-J_b3Jy4eCQMrcOMjY2tiJZO-6mSVfI7xnfJnIAtjLnY0-Il52nhmWPk3moObCdwBwSEvhtiyasITP4EjuMMZb9W8rXybUD04O0fKw4VMKIYukYdsGgPcVYNOz/s1600/soup_abstract_glass.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis5rlOxwED7sGqNipGE1-J_b3Jy4eCQMrcOMjY2tiJZO-6mSVfI7xnfJnIAtjLnY0-Il52nhmWPk3moObCdwBwSEvhtiyasITP4EjuMMZb9W8rXybUD04O0fKw4VMKIYukYdsGgPcVYNOz/s640/soup_abstract_glass.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;ADDITIONAL TOOL: Blender (the one and only)&lt;/b&gt;&lt;/div&gt;
So for job like this that Maya cannot handle, I usually use my secret tool: &lt;b&gt;Blender&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
I use Blender to render (Blender Cycles GPU renderer) because it is fast and can handle billions of polygons and the result is realtime and realistic, where Maya failed and often over complicated with Mental Ray.&lt;br /&gt;
&lt;br /&gt;
And using Blender allows me to also extend the &quot;procedurality&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8DiQCHO5FbOBYHWs-XuDbV5i6rqD6FMpYso__5Q009TMPnei1VFnTvVS5MGORwbyiyI_XL_stoEhDJk_3rknrQQQGD2tri04dpow7BDDs74iTaFkS2ze7xGtn2PC1K6BAJsjqP4X50dpQ/s1600/PrtScr+capture_3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;513&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8DiQCHO5FbOBYHWs-XuDbV5i6rqD6FMpYso__5Q009TMPnei1VFnTvVS5MGORwbyiyI_XL_stoEhDJk_3rknrQQQGD2tri04dpow7BDDs74iTaFkS2ze7xGtn2PC1K6BAJsjqP4X50dpQ/s640/PrtScr+capture_3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SEE ALSO: Point Cloud To Curve&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://mayaspiral.blogspot.com.au/2012/06/soup-point-cloud-to-curve.html&quot;&gt;http://mayaspiral.blogspot.com.au/2012/06/soup-point-cloud-to-curve.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/8353244635810165778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-pointcloudtomesh-is-abstract.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/8353244635810165778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/8353244635810165778'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-pointcloudtomesh-is-abstract.html' title='SOUP / PointCloudToMesh = Abstract'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgedpS_0t_2nBnDE3OKElmq89_4gur-xX_ABw3UvpQrM3R3r1AU-ezE2ONNwhkLGDMEEFkP4Gyl6jPcccoMANrefiwNUrbYtYn8BvHYohyphenhyphen-DD89T91lEh43lwktQfXvMdHk8vrBrg-aQcBv/s72-c/MAKA_MESH.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-4734067315001686778</id><published>2012-09-16T22:04:00.001-07:00</published><updated>2012-09-26T17:23:50.135-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="blendshapes"/><category scheme="http://www.blogger.com/atom/ns#" term="facial"/><category scheme="http://www.blogger.com/atom/ns#" term="map"/><category scheme="http://www.blogger.com/atom/ns#" term="muscle"/><category scheme="http://www.blogger.com/atom/ns#" term="rigging"/><category scheme="http://www.blogger.com/atom/ns#" term="tension"/><category scheme="http://www.blogger.com/atom/ns#" term="veins"/><title type='text'>SOUP / Tension Blendshape NEW</title><content type='html'>It comes to my pleasant surprise that Peter Shipkov just added&amp;nbsp;&lt;b&gt;Tension BlendShape&lt;/b&gt;&amp;nbsp;SOuP node and it is now available &amp;nbsp;inside SOuP Toolbox!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;PREVIOUSLY...&lt;/b&gt;&lt;br /&gt;
So ... basically all my previous posts that are scratching the&amp;nbsp;&lt;b&gt;Tension Map SOuP&lt;/b&gt; node has now easily be achieved using a single node called &lt;b&gt;Tension Blendshape.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This single node&amp;nbsp;handles procedural Blendshapes, driven by Tension Weight (compression, stretch, squash and stretch):&lt;br /&gt;
&lt;br /&gt;
Video demo and tutorial from recently updated SOuP Example Section:&lt;br /&gt;
&lt;a href=&quot;http://www.soup-dev.com/videos/tensionBlendShape.mp4&quot;&gt;http://www.soup-dev.com/videos/tensionBlendShape.mp4&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I actually just applied the yesterday&#39;s Tension Map research and experiment into this facial rig of character MAKA (this MAKA character is also from Puppeteer Lounge, I did the facial rig by following the class, and my guru is Mr. Suchan Raj).&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/qw5XQ2nwfcA&quot; width=&quot;640&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;TENSION BLENDSHAPE&lt;/b&gt;&lt;br /&gt;
Ok, now with the Tension Blendshape SOuP node, you can simply apply Blendshapes Compression and Stretchy mesh to be triggered by Tension Map. Super easy and amazing little node.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s see how this works.&lt;br /&gt;
&lt;br /&gt;
I will use the example provided with latest update of SOuP plugin. The example is kind of broken, so I will try to recreate the basic that I know it will work. I will not go advance for now.&amp;nbsp;Start with SIMPLE example to understand the concept first, before you go complex.&lt;br /&gt;
&lt;br /&gt;
This node looks like made to be simpe to use. Basically you need at least 2 mesh that will automatically trigger Blendshape when a mesh got STRETCHED or COMPRESSED by all kind of deformation (joint, cluster, etc).&lt;br /&gt;
&lt;br /&gt;
You start with 3 mesh shapes:&lt;br /&gt;
1. Original Mesh -&amp;gt; to be deformed with joints, clusters, or all kind of other deformation&lt;br /&gt;
2. Compressed Mesh&lt;br /&gt;
3. Stretched Mesh&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSTUt8NHMHhVhEGJRoNTi4u_hADVBpj6MiA4bXoFEuKifeX7s2cM1E0Ae69exPR6ThU1CZ7DZ12aWqndSD0nZkCoC2SaaMnzH_CYJvC2mHuEPATPgvX6FBN8yFWy1X9lw_Q_bWpedxiccq/s1600/PrtScr+capture_3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSTUt8NHMHhVhEGJRoNTi4u_hADVBpj6MiA4bXoFEuKifeX7s2cM1E0Ae69exPR6ThU1CZ7DZ12aWqndSD0nZkCoC2SaaMnzH_CYJvC2mHuEPATPgvX6FBN8yFWy1X9lw_Q_bWpedxiccq/s640/PrtScr+capture_3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
That BLACK color mesh is what happened when you applied Tension Blendshape. This is because turns on the Mesh Component Color Display by default. When the mesh got stretched or compressed, it will indicate the changes on the Point Component Color.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;HOW TO SETUP TENSION BLENDSHAPE&lt;/b&gt;&lt;br /&gt;
1. Select your original Mesh to be deformed.&lt;br /&gt;
2. Go to your NEW menu &quot;TensionBS&quot;, then select CreateTensionBlendShape.&amp;nbsp;It will create some node chain automatically similar to any Maya deformer.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2n1uSp_k5_4lDM1u3tgoP3EgiuoPd6IPBuRB7njZG5qqo6g4OqCEL2e56-vkT2adt1hZ8huxUIN7e_Fy-wioz95FluF8DlR27FAD1xCqN6FivrJW1Or7rWl8hrOQ4Ezij_3lB8FWjLMCL/s1600/PrtScr+capture_4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;270&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2n1uSp_k5_4lDM1u3tgoP3EgiuoPd6IPBuRB7njZG5qqo6g4OqCEL2e56-vkT2adt1hZ8huxUIN7e_Fy-wioz95FluF8DlR27FAD1xCqN6FivrJW1Or7rWl8hrOQ4Ezij_3lB8FWjLMCL/s640/PrtScr+capture_4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
3. Next, you need to connect the Stretch mesh and Compression mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Select Stretch Mesh, select original mesh (which you have applied TensionBlendShape) and go to menu &lt;b&gt;TensionBS - Connect Stretch&lt;/b&gt;.&lt;/li&gt;
&lt;li&gt;Do the same with Compression Mesh and choose &lt;b&gt;TensionBS - Connect Compression&lt;/b&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3pEkaJTkz5wNpixGdiyP4X7gfAbCi4VrQn68nGVoDotCJkDz4rQH0k9-jrfO9TRluuEy1LSbpyrAy0m4jxlofUgHWqICORsvcoOxicF26qL8emw2zYWGXuVlCPphmWPXqjstIRcLLnj-0/s1600/PrtScr+capture_5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3pEkaJTkz5wNpixGdiyP4X7gfAbCi4VrQn68nGVoDotCJkDz4rQH0k9-jrfO9TRluuEy1LSbpyrAy0m4jxlofUgHWqICORsvcoOxicF26qL8emw2zYWGXuVlCPphmWPXqjstIRcLLnj-0/s1600/PrtScr+capture_5.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
PS: You don&#39;t need to open Hypershade, all the connection is done automatically in the background.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
4. You are done. Now if you are deforming the original mesh (toggle the Maya transformation fall off using Shorcut B), you will have the mesh to Stretch and to Compress while at the same time triggering the Stretch mesh and Compression Mesh, on the area that got stretch or compressed. Very cool!&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuxCCS51GsBUJ6KYQfeyjMX1IN7BzAswpXobv55oAUYFocAEIR8u20sGha5Q0-DoBXLnZ0YsxOaU2rHa12fr0ChE59ePRhSh3OOsvwETO6zuHMrHwM4XXsKy_wya51y9gwiO6ftmq9_PW6/s1600/PrtScr+capture_6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuxCCS51GsBUJ6KYQfeyjMX1IN7BzAswpXobv55oAUYFocAEIR8u20sGha5Q0-DoBXLnZ0YsxOaU2rHa12fr0ChE59ePRhSh3OOsvwETO6zuHMrHwM4XXsKy_wya51y9gwiO6ftmq9_PW6/s1600/PrtScr+capture_6.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;When Compressed.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY2tV0yK7FAsRblMbtWEAd2TJAku4bLv3Z70ZOJgbvwanQV_LMBJh8y6L2SV-zap_oc-LHOHRSitw5EsplgeOA3fhJbjCUiW_MZSJLu66VRBJKGj7FbDPfVuqOeUA5xhtEWd3k_xHwKRuE/s1600/PrtScr+capture_7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhY2tV0yK7FAsRblMbtWEAd2TJAku4bLv3Z70ZOJgbvwanQV_LMBJh8y6L2SV-zap_oc-LHOHRSitw5EsplgeOA3fhJbjCUiW_MZSJLu66VRBJKGj7FbDPfVuqOeUA5xhtEWd3k_xHwKRuE/s640/PrtScr+capture_7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;When Stretched.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;PROCEDURAL FACIAL RIG MUSCLE USING TENSION BLENDSHAPE&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This is applicable to FACIAL RIG when you are adding wrinkles, veins, muscles etc or all kind of blendshape related animation. This adds extra layer of details very easily!&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1x6ek49BGiUf3dwsdsh8bEqh94AJhPiF2nesoJyCp2s29mJp-GblddwdPmdu9by5wGmoR0Hfr2yeJpgfldQUquo3JTTDypxwswVTQjpjMFAHYEDuQD-8kRKb1xjzViWm0ZXGn700mogqZ/s1600/PrtScr+capture_9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;304&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1x6ek49BGiUf3dwsdsh8bEqh94AJhPiF2nesoJyCp2s29mJp-GblddwdPmdu9by5wGmoR0Hfr2yeJpgfldQUquo3JTTDypxwswVTQjpjMFAHYEDuQD-8kRKb1xjzViWm0ZXGn700mogqZ/s640/PrtScr+capture_9.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Automatic Wrinkle based on Tension Map&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiht66WzMHlswl6lM8EYeatZbeetek6jsa9AZhvEqp5uuF5V7Zv5ux1ctlh61zNeq5-t25FsyAJBFsLDhnTzaoa1qHpB3cof_RqZNihthl2vQItQ2SJFRkO5AqDTWNb7Xr10zeFjnlGwNgc/s1600/PrtScr+capture_10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;275&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiht66WzMHlswl6lM8EYeatZbeetek6jsa9AZhvEqp5uuF5V7Zv5ux1ctlh61zNeq5-t25FsyAJBFsLDhnTzaoa1qHpB3cof_RqZNihthl2vQItQ2SJFRkO5AqDTWNb7Xr10zeFjnlGwNgc/s640/PrtScr+capture_10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;CAUTION: MESH EXPLODE&lt;/b&gt;&lt;br /&gt;
If your mesh explodes like this: (I believe this is because of the way it works, there is &quot;safe cycle&quot; happening, sometimes explosion not undoable).&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia9dXGLtcwTWwgEgzKYu3Sps1OltlRVc8FsHtHr7_yQheOXK77XFzS7Y9OvqwWmhcXx7fdujdj3hG3UFrhHp82QKcsHsHUh9_Cir6N89W_an43UyPLuDg84S9wu1bqM10X2c6MTGqbr4BE/s1600/PrtScr+capture_11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia9dXGLtcwTWwgEgzKYu3Sps1OltlRVc8FsHtHr7_yQheOXK77XFzS7Y9OvqwWmhcXx7fdujdj3hG3UFrhHp82QKcsHsHUh9_Cir6N89W_an43UyPLuDg84S9wu1bqM10X2c6MTGqbr4BE/s320/PrtScr+capture_11.png&quot; width=&quot;264&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Avoid exploding mesh like this by activating LIMIT.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
You need to tweak the setting for Tension BlendShape. &lt;b&gt;Turn ON the Stretch and Compression LIMIT.&amp;nbsp;&lt;/b&gt;&amp;nbsp;Tweak the value until you fix the &quot;exploding mesh&quot;. But&lt;b&gt;, t&lt;/b&gt;o be safe, you want to do this before you start to deform the original mesh in component level.&lt;br /&gt;
&lt;br /&gt;
The good thing about this Tension Blendshape workflow setup is that you get everything automatic and you don&#39;t need to worry about DG cycle errorto happen or any other complexity. It just works.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2jNouq2BJHY6E1bf3_DWy167s3FaFIN8ERTYQm8og_Lhclc4jrMxVautKnPeIME1m0MNOhdiUuRXjLomPbreXPzGpuhtQX8OIsGO2BCbdIhpYKgAaYY2-bpU3Zjd5J_UamDglcbBTv9qs/s1600/PrtScr+capture_12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2jNouq2BJHY6E1bf3_DWy167s3FaFIN8ERTYQm8og_Lhclc4jrMxVautKnPeIME1m0MNOhdiUuRXjLomPbreXPzGpuhtQX8OIsGO2BCbdIhpYKgAaYY2-bpU3Zjd5J_UamDglcbBTv9qs/s1600/PrtScr+capture_12.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCIqiBO7g8cWa2tDhq4LKsjrvYeLVBOmw-2qlzTlo1DfKisn6Q-bbzwgBTFaob7aDvFdpLTyfViiIMeObPau1amXWf280Rpv847iizoj99hFoW08lSjYvjb8ds-QvBhyphenhyphenFb7FRHLebpIrZL/s1600/PrtScr+capture_13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCIqiBO7g8cWa2tDhq4LKsjrvYeLVBOmw-2qlzTlo1DfKisn6Q-bbzwgBTFaob7aDvFdpLTyfViiIMeObPau1amXWf280Rpv847iizoj99hFoW08lSjYvjb8ds-QvBhyphenhyphenFb7FRHLebpIrZL/s400/PrtScr+capture_13.png&quot; width=&quot;385&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Explosion fixed after you add LIMIT.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Here is the result using Tension Blendshape SOuP node. Much easier, and it works on top of your typical animation rigging setup. For joint based facial rig, this could work really well. Similat to above, except that this SOuP network is much easy to setup and the effect is easy to tweak:&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/JHEpAbuq-t0&quot; width=&quot;640&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Thanks again to Peter Shipkov and SOuP plugin you can now make a more awesome facial rig!&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/4734067315001686778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-tension-blendshape-new.html#comment-form' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/4734067315001686778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/4734067315001686778'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-tension-blendshape-new.html' title='SOUP / Tension Blendshape NEW'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/qw5XQ2nwfcA/default.jpg" height="72" width="72"/><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-6480585544083374112</id><published>2012-09-16T06:54:00.000-07:00</published><updated>2012-09-16T20:58:57.686-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="array"/><category scheme="http://www.blogger.com/atom/ns#" term="displacement"/><category scheme="http://www.blogger.com/atom/ns#" term="fStretch"/><category scheme="http://www.blogger.com/atom/ns#" term="live"/><category scheme="http://www.blogger.com/atom/ns#" term="map"/><category scheme="http://www.blogger.com/atom/ns#" term="maya"/><category scheme="http://www.blogger.com/atom/ns#" term="soup"/><category scheme="http://www.blogger.com/atom/ns#" term="wrinkle"/><title type='text'>SOUP / Tension Driven Displacement Map ala fStretch</title><content type='html'>This is again continuation for my previous post on &lt;b&gt;Tension Map SOuP node&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
After so many hours and days of research and trials and errors and reading all kind of postings at SOuP forum -- &amp;nbsp;also asked Peter for some hints -- I finally managed to find a solution that riggers can use to simulate fStretch using &lt;b&gt;Maya SOuP plugin&lt;/b&gt; by Peter Shipkov.&lt;br /&gt;
&lt;br /&gt;
It feels like a long way to get there, but once the concept is understood, this Tension Map setup may as well be something that can be implemented for Facial Rigging. Just another trick you can use.&lt;br /&gt;
&lt;br /&gt;
Similar to fStretch for Maya, basically we try to setup automation for:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;What happened when mesh get pulled/stretched&lt;/li&gt;
&lt;li&gt;What happened when mesh get compressed&lt;/li&gt;
&lt;li&gt;What happened when mesh is bending at an angle&lt;/li&gt;
&lt;li&gt;Automatic wrinkle, etc&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
SOuP Recipes for this setup:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Tension Map SOuP&lt;/li&gt;
&lt;li&gt;Peak SOuP&amp;nbsp;&lt;/li&gt;
&lt;li&gt;SplitRGBA SOuP&lt;/li&gt;
&lt;li&gt;ArrayToArray SOuP&lt;/li&gt;
&lt;li&gt;ArrayBlend SOuP&lt;/li&gt;
&lt;li&gt;Maya Blendshapes node&lt;/li&gt;
&lt;li&gt;TextureToArray&lt;/li&gt;
&lt;li&gt;RGBAToColorAndAlpha&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
If I have time, I am going to break down the whole setup to share to you all and maybe an example using a real character face setup. I think the setup is nearly there, but maybe can be made more efficient.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that this is not a magic trick. We try to make the mechanism more procedural and automatic (instead of manually setting SDK and paint blendshape map). But of course, the artist still need to sculpt proper wrinkles and model a solid blendshapes for the character.&lt;br /&gt;
&lt;br /&gt;
I am seeing this as an additional layer of influence on top of normal setup. It seems that Facial Setup with Joints is perfect candidate for this kind of setup. Like something for game.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For now, just a quick demo:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/OHnBewp7zJ8&quot; width=&quot;640&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
In the mean time,&amp;nbsp;one may want to study about wrinkle map:&lt;br /&gt;
&lt;a href=&quot;http://freesdk.crydev.net/display/SDKDOC3/Creating+Wrinkle+Maps&quot;&gt;http://freesdk.crydev.net/display/SDKDOC3/Creating+Wrinkle+Maps&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/6480585544083374112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-tension-driven-displacement-map.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/6480585544083374112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/6480585544083374112'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-tension-driven-displacement-map.html' title='SOUP / Tension Driven Displacement Map ala fStretch'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/OHnBewp7zJ8/default.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-5383586354297775311</id><published>2012-09-13T07:43:00.003-07:00</published><updated>2012-09-13T15:00:11.811-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="blendshapes"/><category scheme="http://www.blogger.com/atom/ns#" term="fStretch"/><category scheme="http://www.blogger.com/atom/ns#" term="soup"/><category scheme="http://www.blogger.com/atom/ns#" term="tension map"/><title type='text'>SOUP / Tension Driven Blendshapes</title><content type='html'>This is the whole network to setup Blendshapes that are driven by Tension Map.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJcjBe2iJ4glFh-74U_DnFzwr2bvtlmcIw5XnK1cIHz99qZfzYb00EJZ-VmMOwYMPdfZQlPxldPWqtz4n30U3vaFxbBIYD3I7_H0T39AQHJrMjX_HKCL35LN-pAm1ZcKsMU0TyyFy1m6yF/s1600/PrtScr+capture.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJcjBe2iJ4glFh-74U_DnFzwr2bvtlmcIw5XnK1cIHz99qZfzYb00EJZ-VmMOwYMPdfZQlPxldPWqtz4n30U3vaFxbBIYD3I7_H0T39AQHJrMjX_HKCL35LN-pAm1ZcKsMU0TyyFy1m6yF/s640/PrtScr+capture.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The concept is similar to previous posts on Tension Map node.&amp;nbsp;It seems complex, but in actuality, there is nothing new, just adding everything together.&lt;br /&gt;
&lt;br /&gt;
I will explain the above network step by step from LEFT TO RIGHT:&lt;br /&gt;
1.&amp;nbsp;Basically we started with a mesh. This mesh will be deformed, stretched and compressed.&lt;br /&gt;
&lt;br /&gt;
2.&amp;nbsp;In above example, I am using Joints aka SkinCluster.&lt;br /&gt;
&lt;br /&gt;
3.&amp;nbsp;We need &quot;intermediate mesh&quot; and here that is exactly what I did. This is always necessary to avoid dependency cycles. I actually have 2 x mesh bound to Joints. One as Intermediate Mesh and the other the actual final mesh.&lt;br /&gt;
&lt;br /&gt;
4.&amp;nbsp;Tension Map is added and it will track the Intermediate Mesh, whether it is stretched or compressed. We know already that the result will be real time and interactive Weight Map. I am filtering the BLUE color or Stretch value.&lt;br /&gt;
&lt;br /&gt;
5. We are not using SOuP node like Peak, so for this purpose, we need to actually use multiAttributeTransfer to &quot;convert&quot; into Maya&#39;s Weight Map. We are doing it via the transferring of array values.&lt;br /&gt;
&lt;br /&gt;
6. Eventually the multiAttributeTransfer goes into the Blendshape node using the MEL script I mentioned above. And doing this will transfer the &quot;weight&quot; of Tension Map.&lt;br /&gt;
&lt;br /&gt;
7. Point SOuP is there to force update the dirty Maya DG via the getAttr MEL.&lt;br /&gt;
&lt;br /&gt;
8. Finally, it goes to the final Mesh, which is both driven by Blendshape and SkinCluster, as well as the Tension Map.&lt;br /&gt;
&lt;br /&gt;
If we are thinking to use such setup for rigging, it is perhaps a good idea to break it up and make it as another &quot;blendshape&quot; or &quot;influence&quot; for the final mesh. Never really apply it directly to final mesh. Good idea to always use Blendshape as &quot;container&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;EXAMPLE USAGES&lt;/b&gt;&lt;br /&gt;
For example, maybe you want to use this Tension Map Driven Blendshapes to trigger wrinkle when skin is compressed, or perhaps to create bulge ala Muscle, or maybe dragon scales that become more pronounced when tension happens in the skin or for something like cloth that wrinkles in certain way when compressed or stretched. I think all those are possible. As long it is well planned, it should not be a problem.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;A LITTLE THOUGHT&lt;/b&gt;:&lt;br /&gt;
I have yet to find the perfect solution that I really like. Although I can see this setup manage to transfer tension map &quot;weight&quot; via Multiple Attribute Transfer, into Blendshapes, I still prefer the &quot;Peak&quot; node seamless method in transferring weight.&lt;br /&gt;
&lt;br /&gt;
I have a bit of SOuP brainstorming this morning and I think the best solutions is to actually baking out every single Blendshape as Texture Maps with Normals, which then be connected back into multi Peak nodes to create a &lt;b&gt;Hybrid Blendshapes&lt;/b&gt; that can be driven by compression or stretch data provided by Tension Map.&lt;br /&gt;
&lt;br /&gt;
This is still something I need to try and find the best solutions. I need to consult Peter Shipkov. But I think this might be better and more efficient.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/J_Fy5Ejo-mk&quot; width=&quot;640&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/5383586354297775311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-tension-driven-blendshapes.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/5383586354297775311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/5383586354297775311'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-tension-driven-blendshapes.html' title='SOUP / Tension Driven Blendshapes'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJcjBe2iJ4glFh-74U_DnFzwr2bvtlmcIw5XnK1cIHz99qZfzYb00EJZ-VmMOwYMPdfZQlPxldPWqtz4n30U3vaFxbBIYD3I7_H0T39AQHJrMjX_HKCL35LN-pAm1ZcKsMU0TyyFy1m6yF/s72-c/PrtScr+capture.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-3526624400527838790</id><published>2012-09-12T23:17:00.003-07:00</published><updated>2012-09-13T04:52:18.283-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="peak"/><category scheme="http://www.blogger.com/atom/ns#" term="rigging"/><category scheme="http://www.blogger.com/atom/ns#" term="soup"/><category scheme="http://www.blogger.com/atom/ns#" term="squash"/><category scheme="http://www.blogger.com/atom/ns#" term="stretch"/><category scheme="http://www.blogger.com/atom/ns#" term="tension"/><category scheme="http://www.blogger.com/atom/ns#" term="tentacle"/><title type='text'>SOUP / Tension Map x Peak = Auto Squash and Stretch</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaTMLOKYviFfdTVTfWsrVOVVRkYNU-XffbREomx36cjhSAizaDhKZOnTDZHMXKgQTQC11aIw_7aU3_BhogH5tUc1WAoa8guyRZ3Zws01SREd_76IS0hXBtUB-2nfCqlDMINQ47YHmDKPeX/s1600/PrtScr+capture_12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;451&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaTMLOKYviFfdTVTfWsrVOVVRkYNU-XffbREomx36cjhSAizaDhKZOnTDZHMXKgQTQC11aIw_7aU3_BhogH5tUc1WAoa8guyRZ3Zws01SREd_76IS0hXBtUB-2nfCqlDMINQ47YHmDKPeX/s640/PrtScr+capture_12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
(Deforming and Slides Skin Automatically, isn&#39;t that one of rigger&#39;s dream?)&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/eC3vj_YUnVk&quot; width=&quot;640&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
This is another SOuP &quot;cooking&quot; technique using Tension Map to expand the science project from the previous post. This behaviour we are going to setup is similar to Muscle.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SOUP INGREDIENT&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Tension Map SOuP&lt;/li&gt;
&lt;li&gt;Peak SOuP&lt;/li&gt;
&lt;li&gt;Point SOuP&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;THE SOUP SETUP&lt;/b&gt;&lt;br /&gt;
1. For this example, I will use 3 joints and a skinned cylinder mesh, just like the last time.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-mRfYuc_4HzxS4rc1DweiHTrEBgiB_4yvZHEdQHGUEJGN_-RG6pGVHaPebnFjWEmdtEGYZaskpFHzwYB4oWL1bEEDhVE-k5vZFhHmJVIDmXwRmYr4Jd8oZYLuQAB_vuIbn-wRX7bOcq6M/s1600/squashStretch.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-mRfYuc_4HzxS4rc1DweiHTrEBgiB_4yvZHEdQHGUEJGN_-RG6pGVHaPebnFjWEmdtEGYZaskpFHzwYB4oWL1bEEDhVE-k5vZFhHmJVIDmXwRmYr4Jd8oZYLuQAB_vuIbn-wRX7bOcq6M/s320/squashStretch.png&quot; width=&quot;140&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
2. To avoid cycles, we will try to separate and simplify this complex deformation into 3 different container shapes:&lt;br /&gt;
a. The actual mesh to be driven by Joint SkinCluster and Blendshape. This is the final mesh.&lt;br /&gt;
b. Second mesh, also driven by Joint SkinCluster, as intermediate object.&lt;br /&gt;
c. The influence mesh to be deformed by Peak deformer -&amp;gt; which is driven by Tension Map weight of second mesh (the intermediate mesh) -&amp;gt; and to then be piped back into the actual mesh via Blendshape.&lt;br /&gt;
&lt;br /&gt;
3. So, for our Cylinder mesh, create 3x duplicates of original mesh.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-P3_6mTFA-797k6Db4LyBSK18fBPRJq8RWwwGLOc9BI0nh-sS2WIxCnPjfHTRaRyN_38Usjbu587FXlQ_F98zrFPYaW7AFMFaPsqzMOlFRFMxmsGRTQgBg_MU8hBsSNeDPPpDUXNITcHN/s1600/squashStretch_3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-P3_6mTFA-797k6Db4LyBSK18fBPRJq8RWwwGLOc9BI0nh-sS2WIxCnPjfHTRaRyN_38Usjbu587FXlQ_F98zrFPYaW7AFMFaPsqzMOlFRFMxmsGRTQgBg_MU8hBsSNeDPPpDUXNITcHN/s320/squashStretch_3.png&quot; width=&quot;313&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
4. Let&#39;s do the mesh connection as mentioned on (2c) first. This mesh is needed to drive mesh&amp;nbsp;(2a) in the end via Blendshape.&amp;nbsp;We need to think &quot;backward&quot;. So for the Yellow color mesh (2c), apply Peak deformer.&lt;br /&gt;
&lt;br /&gt;
5. You couldcreate Blendshape connection now from (2c) to (2a). Yellow mesh (with Peak applied) is the target Blendshape for Blue mesh. Make the weight 1 so Blendshape is applied. Make sure that your Input order is correct.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvgOsXK_HHxo1LmuKtQOBraxKH8rMjlHiYtXsEoJIKI0dF-_xAs35Gcn8Ccgr5aM4EUXmBDUc_FDChoy9j9TLc299hY7LpiwiA3CSnPWDagiRJG-WzCaJ-DeYJa36sJLQw_gYFVN_4a3zE/s1600/squashStretch_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvgOsXK_HHxo1LmuKtQOBraxKH8rMjlHiYtXsEoJIKI0dF-_xAs35Gcn8Ccgr5aM4EUXmBDUc_FDChoy9j9TLc299hY7LpiwiA3CSnPWDagiRJG-WzCaJ-DeYJa36sJLQw_gYFVN_4a3zE/s1600/squashStretch_2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
6. Next , we need to calculate Tension Weight of the Blue Mesh using Tension Map SOuP node. This Tension Map will then piped from Red mesh (2b) into Yellow mesh (2c).&lt;br /&gt;
&lt;br /&gt;
So, when the tension is actually working on mesh (2b) with Color turned on, you get something like below.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-eNlV0aoDGaHodvoX4KOTsebSw7LiCkhkCQbd5YNj-9KzfviD1yw_UkvzR-xDgZQ9Xr7vjYEfJmQF2SAgPIRWi_IvyAb3BzoOE779Feuq4gHewhtutmmVBdyzMPobP-oYNH9gsiODWgIV/s1600/squashStretch_4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-eNlV0aoDGaHodvoX4KOTsebSw7LiCkhkCQbd5YNj-9KzfviD1yw_UkvzR-xDgZQ9Xr7vjYEfJmQF2SAgPIRWi_IvyAb3BzoOE779Feuq4gHewhtutmmVBdyzMPobP-oYNH9gsiODWgIV/s1600/squashStretch_4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This Tension weight is then piped into Yellow Mesh&#39;s&amp;nbsp;Peak node.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;[tensionMap].outTensionPP -&amp;gt; [peak].inWeightPP&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihS6nTXniLa6e1QfmtPxI0cdVoJbBUDXPivg7RruGbAJcGNdEUIm0Wx7W2it-qRvLFkxD60RiG48EDqkEkNLwQf2D9ftDtqeRLuNapsiUx8OzmqyknA4KKtMpYCBx2UfpiVZNDDUq5cvss/s1600/squashStretch_5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihS6nTXniLa6e1QfmtPxI0cdVoJbBUDXPivg7RruGbAJcGNdEUIm0Wx7W2it-qRvLFkxD60RiG48EDqkEkNLwQf2D9ftDtqeRLuNapsiUx8OzmqyknA4KKtMpYCBx2UfpiVZNDDUq5cvss/s1600/squashStretch_5.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
7. Last part is really simple. If you have not done step 5 already, all you need to do now is simply Blendshape the Yellow mesh (as target) for the Blue mesh.&lt;br /&gt;
&lt;br /&gt;
You now should have the Squash and Stretch effect on the Blue mesh.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTrR4mefpHMrWB17kYOYZgP4ZK6jYPCbyT9ssKrrjEwABVynEfuy3rvw-pTH71iCOfSOlqBtOPAq8UVdVyD3ULlWc0bdE7WU4aqNarmNRwWlZH78dW3wjbFwq_rQJLQ8MyOpD3fH1yIqZB/s1600/squashStretch_6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTrR4mefpHMrWB17kYOYZgP4ZK6jYPCbyT9ssKrrjEwABVynEfuy3rvw-pTH71iCOfSOlqBtOPAq8UVdVyD3ULlWc0bdE7WU4aqNarmNRwWlZH78dW3wjbFwq_rQJLQ8MyOpD3fH1yIqZB/s320/squashStretch_6.png&quot; width=&quot;127&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_APADUkZou9QnYc0MXWEK5VCLhuyI93toCIalwurnnSkb9arzw5bLf9CbQrjfkFh3bNyuH14YUvkBlC-xVauXqhv1dn80O2hm0uRHhjiqU8EPPSHTAVrDHoZgAu0LZVvUjhpVqORGU6dP/s1600/squashStretch_7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_APADUkZou9QnYc0MXWEK5VCLhuyI93toCIalwurnnSkb9arzw5bLf9CbQrjfkFh3bNyuH14YUvkBlC-xVauXqhv1dn80O2hm0uRHhjiqU8EPPSHTAVrDHoZgAu0LZVvUjhpVqORGU6dP/s320/squashStretch_7.png&quot; width=&quot;170&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
NOTE: You can use Smooth SOuP node to smoothen the effect.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;FURTHER ON&lt;/b&gt;&lt;br /&gt;
If you watch the Tension Map carefully, you actually have 2 different Modes:&lt;br /&gt;
DISTANCE and IN-BETWEEN ANGLE.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyw9mwuSablcMu_qy6z4hNRwsnKPjzevRQ54_d9ELrgjbFR8HhnaGyrSHPQ3f2RSOPWpS2rUaszUKOToefYHbKB0qmFdIxX-TNXO8hqRVa7kL-jAyt9ddtE7OsJP8TkgyiKjcJ1SPF7tsg/s1600/squashStretch_8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyw9mwuSablcMu_qy6z4hNRwsnKPjzevRQ54_d9ELrgjbFR8HhnaGyrSHPQ3f2RSOPWpS2rUaszUKOToefYHbKB0qmFdIxX-TNXO8hqRVa7kL-jAyt9ddtE7OsJP8TkgyiKjcJ1SPF7tsg/s1600/squashStretch_8.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
They both are actually useful.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;DISTANCE allow you to monitor the tension when stretched or compressed.&lt;/li&gt;
&lt;li&gt;IN-BETWEEN ANGLE allows you to monitor the bending.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
If you like, you can combine both 2 x TensionMap MODE to drive the 2 x Peak node.&lt;br /&gt;
&lt;br /&gt;
You will then have an automatic Squash and Stretch setup that understand the Tension between Points.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWE_4mPz5OBCOFMyQFbUDfECxD5QW6iIldMYo9quHaRZMEjBoLiuiLoTIPQWgSw_2dMfLfJn3Do0W1GBccSbD5cHasIeC89XPJmGh_yqlv3HpmKS5IA6oxhtStTpLdzkKaAPiTXAHe4HYR/s1600/squashStretch_9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWE_4mPz5OBCOFMyQFbUDfECxD5QW6iIldMYo9quHaRZMEjBoLiuiLoTIPQWgSw_2dMfLfJn3Do0W1GBccSbD5cHasIeC89XPJmGh_yqlv3HpmKS5IA6oxhtStTpLdzkKaAPiTXAHe4HYR/s1600/squashStretch_9.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This could be used to rig a tentacle or a tail or a fat maggot, so that it feels like the tentacle has muscle that squash and stretch automatically when tension happens.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;UPDATE:&lt;/b&gt;&lt;br /&gt;
Further investigation, I found that Tension PP array values do not always represent the weighting as shown and it is pretty linear. If you like more correct control, you actually want to pipe in the actual &quot;Point Color&quot; weight and be really specific to filter out the R, G, B value to affect Peak deformer. You use something like Split RGBA.&lt;br /&gt;
&lt;br /&gt;
You will get a much better Squash and Stretch effect if you understand this concept:&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAzmMGOyGnIgXNZaUZ04g_8a_IFqoA9iS4t183z3jWhjEU4wA826-AdWLYExrdvJSfdwPeUR6Khhd30RGxsdo30nizhbxWTgUpZvbkn6GucEyR3fbgmntdlU4Q6ufEhE1Q4FYOVhKrxTfa/s1600/squashStretch_10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAzmMGOyGnIgXNZaUZ04g_8a_IFqoA9iS4t183z3jWhjEU4wA826-AdWLYExrdvJSfdwPeUR6Khhd30RGxsdo30nizhbxWTgUpZvbkn6GucEyR3fbgmntdlU4Q6ufEhE1Q4FYOVhKrxTfa/s1600/squashStretch_10.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSU9fLQNGkd_pi_3I17MmFdHGKmTTui68vi9BrQcEox4zDKKWkcUUEdZoxZBT6xnaDQeRX_j7_IVBE8_mbSczzTQKhVjcj1rtZE_O3khzG7LKg4KfNDK3Ercg571558L7gqVEl1yJcPuGt/s1600/squashStretch_12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSU9fLQNGkd_pi_3I17MmFdHGKmTTui68vi9BrQcEox4zDKKWkcUUEdZoxZBT6xnaDQeRX_j7_IVBE8_mbSczzTQKhVjcj1rtZE_O3khzG7LKg4KfNDK3Ercg571558L7gqVEl1yJcPuGt/s1600/squashStretch_12.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
So this is probably something that you need to understand yourself by experimenting and trying to understand what is really going on.&lt;br /&gt;
&lt;br /&gt;
But the idea is simple. Separate each RGB color, Compression value and Stretch value (as shown in RGB color of Tension Map) to drive Squash and Stretch (Peak Positive or Peak Negative).&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPeoG6DOjbPurp-UnuD10BTV2f-dbw2GmJlZ1VgIEhZuXgTiiGSV3Eqf1ioB3mobNYjLrVlhOX9Qo72lEciChnR0GBEj4B7HBFnVLrjl_bjSqlV5ymhxICa79o-D8PktWckmMNbk2P1LTi/s1600/squashStretch_13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;489&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPeoG6DOjbPurp-UnuD10BTV2f-dbw2GmJlZ1VgIEhZuXgTiiGSV3Eqf1ioB3mobNYjLrVlhOX9Qo72lEciChnR0GBEj4B7HBFnVLrjl_bjSqlV5ymhxICa79o-D8PktWckmMNbk2P1LTi/s640/squashStretch_13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
All works and you have procedural Squash and Stretch using SOuP and it is more &quot;correct&quot; because it is driven by Tension Weight Map.&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/0dIbiKg-rJM&quot; width=&quot;640&quot;&gt;&lt;/iframe&gt;

&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
I think this is really still the basic of what Tension Map can really do. Maybe instead of bulging mesh using Peak, we can &quot;relax&quot; or &quot;smooth&quot; on the fly.&lt;br /&gt;
&lt;br /&gt;
Perhaps this technique can be applied for &lt;b&gt;Facial Muscle Animation&lt;/b&gt;? Yes, actually this work to certain extent.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;BUT, CAN TENSION MAP DRIVE BLENDSHAPE?&lt;/b&gt;&lt;br /&gt;
In this post, we are looking at Blendshapes driving the Tension Map to trigger facial muscle. But how about the opposte?&amp;nbsp;Same question still arises:&lt;br /&gt;
&lt;i&gt;Can the weight from Tension Map actually be used to drive Blendshapes weight?&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
If we can do that, I think you can really create some cool effect.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;NOTE:&lt;/b&gt;&lt;br /&gt;
Obviously, we could actually use Maya&#39;s own static Blendshape Paint Weight Map and drive that weighting using SDK (Set Driven Key). But well, the thing that is interesting here is that the whole procedural Tension Map thing, ability to detect compression and stretching on the fly.&lt;br /&gt;
&lt;br /&gt;
Stay tuned, need to do further research :) Or maybe you found out how to do it before me.</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/3526624400527838790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-tension-map-x-peak-auto-squash-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/3526624400527838790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/3526624400527838790'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-tension-map-x-peak-auto-squash-and.html' title='SOUP / Tension Map x Peak = Auto Squash and Stretch'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaTMLOKYviFfdTVTfWsrVOVVRkYNU-XffbREomx36cjhSAizaDhKZOnTDZHMXKgQTQC11aIw_7aU3_BhogH5tUc1WAoa8guyRZ3Zws01SREd_76IS0hXBtUB-2nfCqlDMINQ47YHmDKPeX/s72-c/PrtScr+capture_12.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-3964432612997676747</id><published>2012-09-12T17:40:00.001-07:00</published><updated>2012-09-14T03:16:19.019-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cane"/><category scheme="http://www.blogger.com/atom/ns#" term="compression"/><category scheme="http://www.blogger.com/atom/ns#" term="fluid"/><category scheme="http://www.blogger.com/atom/ns#" term="map"/><category scheme="http://www.blogger.com/atom/ns#" term="ooze"/><category scheme="http://www.blogger.com/atom/ns#" term="soup"/><category scheme="http://www.blogger.com/atom/ns#" term="squash"/><category scheme="http://www.blogger.com/atom/ns#" term="squeeze"/><category scheme="http://www.blogger.com/atom/ns#" term="stretch"/><category scheme="http://www.blogger.com/atom/ns#" term="tension"/><category scheme="http://www.blogger.com/atom/ns#" term="tension map"/><category scheme="http://www.blogger.com/atom/ns#" term="toad"/><category scheme="http://www.blogger.com/atom/ns#" term="weight"/><title type='text'>SOUP / Tension Map Basic</title><content type='html'>Let&#39;s check out how to use &lt;b&gt;Tension Map SOuP&lt;/b&gt; node.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SOUP EXAMPLE&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;tensionMap.ma&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;b&gt;SOUP INGREDIENT&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;tensionMap SOuP&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;THE SOUP SETUP&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
To use &lt;b&gt;Tension Map&lt;/b&gt;, the process is actually really, really EASY.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
What you can do with the resulting &quot;weight map&quot; is beyond this simple post I am writing now. But I believe you can do a lot of amazing thing with this node.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For now, just showing you the basic setup so you can setup and see the result right away.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This Tension Map SOuP node is probably something you want to use with rigged mesh, aka Mesh that is bound to Skeleton or SkinCluster. This is usually common way you want to deform mesh. Any kind of vertex or point deformation will have effect on the Tension Weight Map.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So, let&#39;s do that.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
1. Got mesh skinned to joints. So you have SkinCluster node created.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUy8-_xHQagUsNk8o0RVtau86GrEi0yU2U0TNj6muO_8GyjbElV6fpx_5zefolCU5_OFuu5OiIEC17T6KeRoRihvWM4IilKPvNybuFgxd0TUILHhrj87vMbvI50VvKUny4MSB0TsIykFy8/s1600/tension_001.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUy8-_xHQagUsNk8o0RVtau86GrEi0yU2U0TNj6muO_8GyjbElV6fpx_5zefolCU5_OFuu5OiIEC17T6KeRoRihvWM4IilKPvNybuFgxd0TUILHhrj87vMbvI50VvKUny4MSB0TsIykFy8/s1600/tension_001.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
2. Check the network inside Hypershade:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtPX5NyOmVhq1NXQcd68me5SfGz2JZZ37hHqJ5VuLlJsVNeBFPJFLthO40K-4LgWcU2an0VLoOVrabl5lB9H1-wXRXKAkz2uS1bzgDvVQ6lyEhMZBilnJ2pLXhHgTVIOLum7ZeYW2ccRNs/s1600/tension_002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;602&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtPX5NyOmVhq1NXQcd68me5SfGz2JZZ37hHqJ5VuLlJsVNeBFPJFLthO40K-4LgWcU2an0VLoOVrabl5lB9H1-wXRXKAkz2uS1bzgDvVQ6lyEhMZBilnJ2pLXhHgTVIOLum7ZeYW2ccRNs/s640/tension_002.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Care only those highlighted.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
3. Insert the Tension Map SOuP node.&lt;/div&gt;
&lt;div&gt;
Super simple, all you need is to connect it like below:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtSEz8oE5rMObLx9E6jwZ6ruYYVgeWLAv-HZnCHigQ2prw2aTge5r8EIcY6A7yp_zB6z8kHmPVjCxgx7nNFDZIvsfyONw95PcpnvLcGpV_Mi9BrOKtadNt51B36P2aCS7ng_NkJnIRxKar/s1600/tension_003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtSEz8oE5rMObLx9E6jwZ6ruYYVgeWLAv-HZnCHigQ2prw2aTge5r8EIcY6A7yp_zB6z8kHmPVjCxgx7nNFDZIvsfyONw95PcpnvLcGpV_Mi9BrOKtadNt51B36P2aCS7ng_NkJnIRxKar/s1600/tension_003.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;[origMesh].worldMesh -&amp;gt; [tensionMap].restGeometry&lt;/li&gt;
&lt;li&gt;[skinCluster].outputGeometry -&amp;gt;&amp;nbsp;[tensionMap].inGeometry&lt;/li&gt;
&lt;li&gt;[tensionMap].outGeometry -&amp;gt; [finalMeshShape].inMesh&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
So, just remember you need 2 inputs: REST SHAPE and MODIFIED SHAPE to go into Tension Map node so that it will output result.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
4. Turn on Display Colors (of points)&lt;/div&gt;
&lt;div&gt;
Completing the connection above and you are done. All you need to do now is to preview the weight created by Tension Map. Turn on Mesh Component Color display.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsSODd31m8RZT92xWiGZAXvGRmNKxPmwaiowU365sBtRFtYVp88i3QhympXAHSBxMmCHBa99bU0YcmIbElDjOI6-o51VAXo81hPbtfjIQcS-AIs1ix2iNjHWqM-T_8Sq_x0WdLaejd7DBl/s1600/tension_005.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsSODd31m8RZT92xWiGZAXvGRmNKxPmwaiowU365sBtRFtYVp88i3QhympXAHSBxMmCHBa99bU0YcmIbElDjOI6-o51VAXo81hPbtfjIQcS-AIs1ix2iNjHWqM-T_8Sq_x0WdLaejd7DBl/s1600/tension_005.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlRp_WN6YFg7OMh27J4NxTFgWJDV4Q3r6cInni7fMQeBp-tUa4ynVz_LSASxdfR0r14Chv9LEZyTXQKG7LstO-5HZEpBDLv33Njizh6FayiEk8Cv_sa6NeaM6NsAe_K5_zYt7XgIQOveaC/s1600/tension_004.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;345&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlRp_WN6YFg7OMh27J4NxTFgWJDV4Q3r6cInni7fMQeBp-tUa4ynVz_LSASxdfR0r14Chv9LEZyTXQKG7LstO-5HZEpBDLv33Njizh6FayiEk8Cv_sa6NeaM6NsAe_K5_zYt7XgIQOveaC/s640/tension_004.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You can see now the resulting &quot;weight&quot; based on:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Compression&lt;/li&gt;
&lt;li&gt;Stretch&lt;/li&gt;
&lt;li&gt;Default&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;TEST ON RIGGED CHARACTER&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
I got another character that I rig recently to demo the Tension weight map. This character is called Tejo (also from Puppeteer Lounge Workshop also, with Suchan Raj), cool character to work with because this character is &quot;muscular&quot;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQDvsmVQgqOjb6ekFZ7bTauraWSt7xL4FwFSXBXfRUwOhRpFgubTsUAA9H8q3vv4pe7IACtf50CCodeO6feYlN1zEHY5Jpx00m-A0CZWMDrLGkHe9K9ooz29pzJdtTW985hObuvvKUKHq0/s1600/PrtScr+capture_10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;258&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQDvsmVQgqOjb6ekFZ7bTauraWSt7xL4FwFSXBXfRUwOhRpFgubTsUAA9H8q3vv4pe7IACtf50CCodeO6feYlN1zEHY5Jpx00m-A0CZWMDrLGkHe9K9ooz29pzJdtTW985hObuvvKUKHq0/s400/PrtScr+capture_10.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-a9d2pDnn4uK-tkilf12eVQRoVAmFQyr1HO3cZrLGF7qynPuwmhlkaX0X47-yYaX7stU3uNYksZFEqlC6kI7RNtk6t6A8SFiCGlM4EaWfvw22HyieLNDrx2K824EVgeOPdmMaWoDozUSh/s1600/PrtScr+capture_11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;255&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-a9d2pDnn4uK-tkilf12eVQRoVAmFQyr1HO3cZrLGF7qynPuwmhlkaX0X47-yYaX7stU3uNYksZFEqlC6kI7RNtk6t6A8SFiCGlM4EaWfvw22HyieLNDrx2K824EVgeOPdmMaWoDozUSh/s400/PrtScr+capture_11.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl-qgijadEcmsjMChfgMuzBJRPWati8IzMRtGhWWy4xf53DYA4Rg9cYn8vW9SbdK4noCGYU8aGLJFK_fIqwlvu6PymNB0DSqw6rVr2GBEqoumulydBEAGNRUn9hIq0LvvS1AlwsQ7AJfkt/s1600/PrtScr+capture_9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl-qgijadEcmsjMChfgMuzBJRPWati8IzMRtGhWWy4xf53DYA4Rg9cYn8vW9SbdK4noCGYU8aGLJFK_fIqwlvu6PymNB0DSqw6rVr2GBEqoumulydBEAGNRUn9hIq0LvvS1AlwsQ7AJfkt/s400/PrtScr+capture_9.png&quot; width=&quot;303&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is a bit like those medical documentary or ads that show you &quot;tension&quot; on area of body!&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/i1IYrAHhaKY&quot; width=&quot;640&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
With Tension Weight Map, I supposed &quot;in theory&quot; you can tell Maya to trigger something else. I want to do some work using the Tejo character to trigger blendshape using Tension Weight Map. I am still researching this idea.&lt;br /&gt;
&lt;br /&gt;
You all know how SkinCluster aka Joint is pretty straight forward just vertex group being driven by weight of joints. Maya has Muscle, etc to help keeping the volume, but usually things like Corrective Blend Shape is more efficient.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
See if you can figure out how to apply those Tension Weight to keep volume of shapes.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;WHAT CAN YOU DO WITH TENSION WEIGHT MAP?&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Now, this is the tricky one to answer.&amp;nbsp;I have not yet studied all the related examples for Tension Map, but I believe this is really powerful. If you can have weight map created, you can probably pipe that weight data and information to the next node that takes weight&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
A quick guess:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;nParticles emission&lt;/li&gt;
&lt;li&gt;Particles emission&lt;/li&gt;
&lt;li&gt;nCloth wrinkles, etc&lt;/li&gt;
&lt;li&gt;Fluid emission&lt;/li&gt;
&lt;li&gt;Fur&lt;/li&gt;
&lt;li&gt;Blendshapes(!)&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
We could probably create an effect like when we squeeze a wet fabric and have water dripping or maybe effect like Australian Cane Toad got squeezed and green oozed coming out. Yucky, but cool in CG (!).&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;fSTRETCH LIKE SETUP USING SOUP?&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Ever heard this plugin called &lt;b&gt;fStretch for Maya&lt;/b&gt;?&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.cgaddict.com/product-overview.html&quot;&gt;http://www.cgaddict.com/product-overview.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Very cool plugin, I have not purchased a license yet, but considering.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Just few days ago, I was wondering if the same effect of fStretch, can be created using SOuP Tension Map node. A simpler version of fStretch/&lt;br /&gt;
&lt;br /&gt;
There are posts at SOuP forum that actually talk about this. But the post seems to be incomplete. Or it is sort of answered, but I don&#39;t think it is very clear to me.&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://soup-dev.websitetoolbox.com/post/fstretch-5381988&quot;&gt;http://soup-dev.websitetoolbox.com/post/fstretch-5381988&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Anyhow, I will study and explore further. Perhaps you already find the usage of Tension Map faster than me. If you do, please let me know, share your knowledge.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;EXPORTING TENSION MAP&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;http://soup-dev.websitetoolbox.com/post/Export-Wetmap-5947888?pid=1274972776#post1274972776&quot;&gt;http://soup-dev.websitetoolbox.com/post/Export-Wetmap-5947888?pid=1274972776#post1274972776&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
That unfortunately did not work for me too, I need to check another way to export out the weight map. I think there is a very straight forward way to do it. Or I missed an options?&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;UPDATE 2012.09.14&lt;/b&gt;: Apparently all the exported images are working! But only FCheck can open those exported image sequences (Maya bug). Anyways, you can definitely use the provided SOuP tools, and in our case to export out Tension Map Weight, simply use &quot;Vertex Colors To Texture&quot;.&lt;br /&gt;
&lt;br /&gt;
Check those additional tools listed, amazingly useful:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT61z9w_DyiR9Ewl0yfhy_z-bXKgGvQewHVcSCd4EgiW6871qMw5iRM2fEmIqfj00yyS1Y9fU0Xg2zdZUqW0hTbKSRdj6Qno9UdWU8S6JcOoyqBLZFxIpq65ehArqyPiHFk2BHiLtlA5p9/s1600/Autodesk+Maya+2012+x64+-+Student+Version+CUsersJimmyDocumentsmayaprojectssoup_tensionMapscenescylinderTension5.mb+++---+++realCyli.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT61z9w_DyiR9Ewl0yfhy_z-bXKgGvQewHVcSCd4EgiW6871qMw5iRM2fEmIqfj00yyS1Y9fU0Xg2zdZUqW0hTbKSRdj6Qno9UdWU8S6JcOoyqBLZFxIpq65ehArqyPiHFk2BHiLtlA5p9/s1600/Autodesk+Maya+2012+x64+-+Student+Version+CUsersJimmyDocumentsmayaprojectssoup_tensionMapscenescylinderTension5.mb+++---+++realCyli.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBx1Bt4hz8VxUL7Rej9boNoKmPTFOxujACPB856fEaCL9C5S3uotBAg3j4ILs721SgaDvEuFv12dinAw7bayVvGS7zwGQfC_ooebxVCGXxToGYGHem7vuSL1TGPxr4WHLjyxMsxC_XIxsA/s1600/PrtScr+capture.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBx1Bt4hz8VxUL7Rej9boNoKmPTFOxujACPB856fEaCL9C5S3uotBAg3j4ILs721SgaDvEuFv12dinAw7bayVvGS7zwGQfC_ooebxVCGXxToGYGHem7vuSL1TGPxr4WHLjyxMsxC_XIxsA/s1600/PrtScr+capture.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/3964432612997676747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-tension-map-basic.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/3964432612997676747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/3964432612997676747'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-tension-map-basic.html' title='SOUP / Tension Map Basic'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUy8-_xHQagUsNk8o0RVtau86GrEi0yU2U0TNj6muO_8GyjbElV6fpx_5zefolCU5_OFuu5OiIEC17T6KeRoRihvWM4IilKPvNybuFgxd0TUILHhrj87vMbvI50VvKUny4MSB0TsIykFy8/s72-c/tension_001.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-6827838591381370774</id><published>2012-09-12T16:06:00.001-07:00</published><updated>2012-09-12T16:17:58.841-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="blendshape"/><category scheme="http://www.blogger.com/atom/ns#" term="blendshapes"/><category scheme="http://www.blogger.com/atom/ns#" term="deformer"/><category scheme="http://www.blogger.com/atom/ns#" term="dynamic"/><category scheme="http://www.blogger.com/atom/ns#" term="maya"/><category scheme="http://www.blogger.com/atom/ns#" term="multiAttributeTransfer"/><category scheme="http://www.blogger.com/atom/ns#" term="soup"/><title type='text'>SOUP / Multi Attribute Transfer x Blendshape</title><content type='html'>A quick look on how to setup Dynamic Blendshapes in Maya using &lt;b&gt;Multi Attribute Transfer SOuP&lt;/b&gt; node. I did write about Multi Attribute Transfer SOuP node previously, especially how you can use it with Cluster or Peak SOuP Deformer.&lt;br /&gt;
&lt;br /&gt;
Here, I will just focus on its usage on Blendshapes.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SOUP EXAMPLE&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;multiAttributeTransfer_blendShapeTargets.ma&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;SOUP INGREDIENT&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Multi Attribute Transfer SOuP&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Point SOuP&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;b&gt;THE SOUP SETUP&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
As we know already Maya Blendshapes is quite decent as it is. User can do Paint Weight Map per Blendshape or globally.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I am curious with how SOuP network can incept Maya default Blendshape network and expand it, especially in purpose of character rigging.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;JOSE FACIAL RIG&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
I will be using this &quot;Jose&quot; character facial rig that I did recently.&amp;nbsp;The model was from&amp;nbsp;&lt;b&gt;Puppeteer&amp;nbsp;Lounge (PL)&lt;/b&gt; Advance Rigging Workshop that I did, the teacher is Suchan Raj. I will mention a credit to PL and Suchan for its awesome one-on-one online rigging workshop:&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://puppeteerlounge.com/&quot;&gt;http://puppeteerlounge.com/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Let&#39; see how we can incept SOUP into the Blendshapes.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLG-B1mdpB7wmXX3YcVqntYZ3fWHlHx7W3-3U9tq5drUF5khmlljrfJvSB2yfPQz1mUDYAs-joDXIXZQGLBlMYS_Xfl3TlqAdDQFvQGZ1AqRdziGjPjiRMxhPgonq2togCmzADYgccTo7V/s1600/soup_multiAttributeTransfer_001.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLG-B1mdpB7wmXX3YcVqntYZ3fWHlHx7W3-3U9tq5drUF5khmlljrfJvSB2yfPQz1mUDYAs-joDXIXZQGLBlMYS_Xfl3TlqAdDQFvQGZ1AqRdziGjPjiRMxhPgonq2togCmzADYgccTo7V/s1600/soup_multiAttributeTransfer_001.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;SINGLE DYNAMIC BLENDSHAPE USING SOUP&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
I will do this on a single blendshape first to make things simple because the network looks really complex otherwise. I promise this will be a simple step by step to follow.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I will apply the &quot;smile puff&quot; facial shape as single Blendshape into Jose&#39;s default face.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Jump into Hypershade and check the network created by Maya in regards to Blendshape so far:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwuqJwxds96OBUG6ULWfu0QZq8398Oj6rbMjfA3dhbwR8YD_Lt_-lNDQxexcqDkJsRQyTxiDAa20POUI_B0EqCwPica-m6zam1WfiMvwN_KGmbvLyeSI18XCHZSWh3Y2oMceR4O85myKHh/s1600/soup_multiAttributeTransfer_002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;497&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwuqJwxds96OBUG6ULWfu0QZq8398Oj6rbMjfA3dhbwR8YD_Lt_-lNDQxexcqDkJsRQyTxiDAa20POUI_B0EqCwPica-m6zam1WfiMvwN_KGmbvLyeSI18XCHZSWh3Y2oMceR4O85myKHh/s640/soup_multiAttributeTransfer_002.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Messy one. Typical Maya &quot;deformer&quot; network.&amp;nbsp;But don&#39;t be scared that is not how we work. Just simplify the network first. Care only those network that is connected by magenta colored noodle.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Simplified version below, and yellow highlighted node is the important nodes to care:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA33trBTnLlMDcda-z3khMABa-MeprR3Uxf3hSWw4kHZ7BEDzmZCtmolyX2KWmyRU6J6czl7PZjZy91k41AlDAqI0gxbYQTU6d0rWU6crjBGJ-ClT2e0N9_NwkoNlay8D8dHOvmHpmv1qE/s1600/soup_multiAttributeTransfer_003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA33trBTnLlMDcda-z3khMABa-MeprR3Uxf3hSWw4kHZ7BEDzmZCtmolyX2KWmyRU6J6czl7PZjZy91k41AlDAqI0gxbYQTU6d0rWU6crjBGJ-ClT2e0N9_NwkoNlay8D8dHOvmHpmv1qE/s640/soup_multiAttributeTransfer_003.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Every nodes still matter, but we only worry about those Maya nodes:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Original Mesh Shape&lt;/li&gt;
&lt;li&gt;Last Shape node, which is the final shape result.&lt;/li&gt;
&lt;li&gt;The Blendshape node&lt;/li&gt;
&lt;li&gt;All the Blendshape Shapes which goes into Blendshape node.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
1.&lt;/div&gt;
&lt;div&gt;
Let&#39;s bring in Multi Attribute Transfer SOuP node and insert it into Maya Blendshape network.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
With MultiTransferAttribute SOuP node, just like AttributeTranfer SOuP node, you will want to create New &lt;b&gt;Bounding Object&lt;/b&gt; right away.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0O1EP2Q4f9j2KyVWaiabV01DUoPinJ_qUlvqGNi-AUnQ3vvtk_WmmZfRN9FfC0U_bTyFOSF7NwA7YSUYWRKw_W6KTGVyzrF02HTSukeX9aSzv1l339El91XAilY6FULDOzxDef_D34tm4/s1600/soup_multiAttributeTransfer_004.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;434&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0O1EP2Q4f9j2KyVWaiabV01DUoPinJ_qUlvqGNi-AUnQ3vvtk_WmmZfRN9FfC0U_bTyFOSF7NwA7YSUYWRKw_W6KTGVyzrF02HTSukeX9aSzv1l339El91XAilY6FULDOzxDef_D34tm4/s640/soup_multiAttributeTransfer_004.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Start by connecting the original mesh shape data into Multi Attribute Transfer.&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[shapeOrig].worldMesh -&amp;gt; [groups]-&amp;gt; [multiAttributeTransfer].inGeometry&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
NOTE: Connect the node right after all those &quot;group&quot; networks.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
2.&lt;/div&gt;
&lt;div&gt;
Next, you want to connect and pipe that output of Multi Attribute Transfer back into the original Blendshape network. This is VERY important.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9ebpOJ8QN3tpQTIYFKA7_pXf9N4AH-gp0Dhf1vDDLHMkde3eAS1CvNqyaTwUX1eqt1hY81LYZPRDpWWdrZ6xbNgJeGDYUw4RxPVBIVOQ-aXhxbE1fIijC673o7V2d69Ho7fpsQKu-sQXq/s1600/soup_multiAttributeTransfer_005.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;446&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9ebpOJ8QN3tpQTIYFKA7_pXf9N4AH-gp0Dhf1vDDLHMkde3eAS1CvNqyaTwUX1eqt1hY81LYZPRDpWWdrZ6xbNgJeGDYUw4RxPVBIVOQ-aXhxbE1fIijC673o7V2d69Ho7fpsQKu-sQXq/s640/soup_multiAttributeTransfer_005.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
3.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
Next is the tricky part. You need MEL script to force connect this one. I do not think there is any other way. I thought that I can use Connection Editor for this, but apparently... not.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You want multiAttributeTransfer to pipe some data into Blendshapes. I will zoom in into the connection:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVrd9ZH7CI0Q8dTyrHh5N93-Zdg6hj4PBSiR6kNtaxWM4R9Y4yEnJCy-jOcHZu-9cFY7aR9T938MqUozX3RUSEsD4EuVCM6BOjfLCdKZW1tKfFHGpus8vcrvcfGNk8DouEsRP7rgRYHoIS/s1600/soup_multiAttributeTransfer_006.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVrd9ZH7CI0Q8dTyrHh5N93-Zdg6hj4PBSiR6kNtaxWM4R9Y4yEnJCy-jOcHZu-9cFY7aR9T938MqUozX3RUSEsD4EuVCM6BOjfLCdKZW1tKfFHGpus8vcrvcfGNk8DouEsRP7rgRYHoIS/s640/soup_multiAttributeTransfer_006.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The MEL script is actually really simple, just using &lt;b&gt;connectAttr&lt;/b&gt; to connect the weightList of multiAttributeTransfer -&amp;gt; to the targetWeight of blendshape node.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So, for a single Blendshape, with only 1 target shape and default naming of blendshape1 node, you can use this MEL:&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;connectAttr multiAttributeTransfer1.outWeightList[0].weights blendShape1.inputTarget[0].inputTargetGroup[0].targetWeights&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
4. Point SOuP will make it happen.&lt;/div&gt;
&lt;div&gt;
At this stage, you will not see anything happening yet.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You need Point SOuP node to actually force Maya to update the dirty data inside Blendshape node. It does not update itself by default.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTl4DYunjmatWRMJPVtfJsGlohBn7cBvvOb9FzX1y0uJg6IHGo84Jt7pCxQQ2rvAFYbIZ_UHZbXbVB4XMoT6FTj8DnZ6A_VFidenwVHM0JQV0noSaYaVapFpXqzBGupU3EpP95crXNEE8-/s1600/soup_multiAttributeTransfer_007.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTl4DYunjmatWRMJPVtfJsGlohBn7cBvvOb9FzX1y0uJg6IHGo84Jt7pCxQQ2rvAFYbIZ_UHZbXbVB4XMoT6FTj8DnZ6A_VFidenwVHM0JQV0noSaYaVapFpXqzBGupU3EpP95crXNEE8-/s1600/soup_multiAttributeTransfer_007.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[blendShape].outputGeometry -&amp;gt; [point].inGeometry&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[point].outGeometry -&amp;gt; [finalShapeMesh].inMesh&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
5. Attach snippet of code inside Point SOuP that does the job.&lt;/div&gt;
&lt;div&gt;
You need to attached MEL expression below in order for everything to work:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;getAttr blendShape1.inputTarget[0].inputTargetGroup[0].targetWeights;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgInmsjJivA7KL3wivOyiUOwGuNbBJbyYu0InUk4KkDO1BiVuTUH7dYFwp6cgYMXy5CL0ZrirZ8927paI4tc_oP_vldxc43jV53XRh3wZ0W0eVMoMwGTL76qic24jFOAM2qgzzOuKX0gHfl/s1600/soup_multiAttributeTransfer_008.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgInmsjJivA7KL3wivOyiUOwGuNbBJbyYu0InUk4KkDO1BiVuTUH7dYFwp6cgYMXy5CL0ZrirZ8927paI4tc_oP_vldxc43jV53XRh3wZ0W0eVMoMwGTL76qic24jFOAM2qgzzOuKX0gHfl/s1600/soup_multiAttributeTransfer_008.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Alternativly, I was informed by Peter Shipkov that I could use &lt;b&gt;dgeval()&lt;/b&gt; MEL to force update the DG, but I am still unclear about it. Not sure the benefit, perhaps faster and simpler.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
So, I might add an update on that.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;THE RESULT:&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUJezbt0NFErMzvi915q32sDoALSEbm3ytE8P3V-8ObEEGFDr8NmHlr6uOHmZOMaHdYKp9z08NWAlADOOkfE5A12xMhKtgaZ_xHjGNXaOWX4akIfjMfcGfpe3cVoKq5LOAkDx_K2CozS-l/s1600/soup_multiAttributeTransfer_009.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUJezbt0NFErMzvi915q32sDoALSEbm3ytE8P3V-8ObEEGFDr8NmHlr6uOHmZOMaHdYKp9z08NWAlADOOkfE5A12xMhKtgaZ_xHjGNXaOWX4akIfjMfcGfpe3cVoKq5LOAkDx_K2CozS-l/s1600/soup_multiAttributeTransfer_009.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJGaI9ktm1wTom8aUS2TbZiTwdoYnA7mav4PbULDztgeTlhB6nfsYScdIgUQHynUT3dGeZq_Dm_UeedX2SltjIhKqsB7Sx_2uBPrO2vbgDuZMedgFRvV6jTXKUJ8WUrRCzB2DjA1EWX0GZ/s1600/soup_multiAttributeTransfer_010.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJGaI9ktm1wTom8aUS2TbZiTwdoYnA7mav4PbULDztgeTlhB6nfsYScdIgUQHynUT3dGeZq_Dm_UeedX2SltjIhKqsB7Sx_2uBPrO2vbgDuZMedgFRvV6jTXKUJ8WUrRCzB2DjA1EWX0GZ/s1600/soup_multiAttributeTransfer_010.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
Real time and Dynamically Driven Blendshapes using Bounding Object ala SOuP. Easy way to separate Blendshapes if you don&#39;t want to do Paint Weight. Or... perhaps can be used for animation and rigging too.&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;MULTIPLE BLENDSHAPES DRIVEN BY MULTIPLE ATTRIBUTE TRANSFER&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The process is the same, you just need to piggy-back every single Multiple Attribute and you do the same as above.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7GBFDG3LhS_MLfaBrbrGBYAQvG09dOq1qKh7RwPnk9571SpemGihKZ2YhPXIPVPMrN-uSftMY3GuBJtPk6eGiLQapEYRy1DLgfcewSI7Jl7ecP20azCewTuYKT9GKHSyIn-pVUn_zc8AW/s1600/soup_multiAttributeTransfer_011.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7GBFDG3LhS_MLfaBrbrGBYAQvG09dOq1qKh7RwPnk9571SpemGihKZ2YhPXIPVPMrN-uSftMY3GuBJtPk6eGiLQapEYRy1DLgfcewSI7Jl7ecP20azCewTuYKT9GKHSyIn-pVUn_zc8AW/s1600/soup_multiAttributeTransfer_011.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Below, I have 2 Blendshapes, driven by 2 MultiAttributeTransfer SOuP weight:&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghy38W6068ODBUoomSvyPd01dLP7ptQYDFfabqOrC9OklCJRdfxxzjOiomsXWBGc4NfYkI-JvRxJ-bVP7cD_OXjkWvvkvaX_aCfW7oid3CoVPcAZlJH6GjHkHvMp2ujxdoHtokLvhgXI7M/s1600/soup_multiAttributeTransfer_012.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghy38W6068ODBUoomSvyPd01dLP7ptQYDFfabqOrC9OklCJRdfxxzjOiomsXWBGc4NfYkI-JvRxJ-bVP7cD_OXjkWvvkvaX_aCfW7oid3CoVPcAZlJH6GjHkHvMp2ujxdoHtokLvhgXI7M/s640/soup_multiAttributeTransfer_012.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Just Piggy Back it!&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
NOTE: If you have &quot;difficulty&quot; in Adding more Blendshapes Targets, you just simply disconnect the Point SOuP temporarily and reattach after you add more Blendshape Targets. Remember, we want to think that Maya network is &quot;that flexible&quot;. Well, not as cool as Houdini, but with SOuP and up to certain level, you can certainly do it.&lt;br /&gt;
&lt;br /&gt;
Make sure that you do all connections and required codes:&lt;/div&gt;
&lt;div&gt;
1. Remember how we use 1 MEL to connect MultiAttributeTransfer weight into Blendshape node? We just need to do the same for every additional one.&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;connectAttr multiAttributeTransfer1.outWeightList[0].weights blendShape1.inputTarget[0].inputTargetGroup[0].targetWeights&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;connectAttr multiAttributeTransfer2.outWeightList[0].weights blendShape1.inputTarget[0].inputTargetGroup[1].targetWeights&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;connectAttr multiAttributeTransfer3.outWeightList[0].weights blendShape1.inputTarget[0].inputTargetGroup[2].targetWeights&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;connectAttr multiAttributeTransfer4.outWeightList[0].weights blendShape1.inputTarget[0].inputTargetGroup[3].targetWeights&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: xx-small;&quot;&gt;... AND SO ON!&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
2. Add also the snippet of code required to update the DG.&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;getAttr blendShape1.inputTarget[0].inputTargetGroup[0].targetWeights;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;getAttr blendShape1.inputTarget[0].inputTargetGroup[1].targetWeights;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;getAttr blendShape1.inputTarget[0].inputTargetGroup[2].targetWeights;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;getAttr blendShape1.inputTarget[0].inputTargetGroup[3].targetWeights;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;... AND SO ON!&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;NEXT RECIPE COMING SOON:&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih-ZleptLd5K3OLd2CEvs1dKWqUZeCbDTNU6NqM3N8v-DkqoxSWszTA8ammkgx1vhmr1rDjTjVUBixbJZUcDVkrkOf2fL_nUplnM-n0QtLX8eckjOAir3ehrRlmyfiPyUKGFYwUr7sQ0i2/s1600/soup_multiAttributeTransfer_013.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih-ZleptLd5K3OLd2CEvs1dKWqUZeCbDTNU6NqM3N8v-DkqoxSWszTA8ammkgx1vhmr1rDjTjVUBixbJZUcDVkrkOf2fL_nUplnM-n0QtLX8eckjOAir3ehrRlmyfiPyUKGFYwUr7sQ0i2/s1600/soup_multiAttributeTransfer_013.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Blendshapes Driven by Tension Map ... ala fStretch. &lt;i&gt;Is this even possible?!&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/6827838591381370774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-multi-attribute-transfer-x.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/6827838591381370774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/6827838591381370774'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2012/09/soup-multi-attribute-transfer-x.html' title='SOUP / Multi Attribute Transfer x Blendshape'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLG-B1mdpB7wmXX3YcVqntYZ3fWHlHx7W3-3U9tq5drUF5khmlljrfJvSB2yfPQz1mUDYAs-joDXIXZQGLBlMYS_Xfl3TlqAdDQFvQGZ1AqRdziGjPjiRMxhPgonq2togCmzADYgccTo7V/s72-c/soup_multiAttributeTransfer_001.png" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-7661435920850168396</id><published>2012-08-18T03:02:00.002-07:00</published><updated>2012-08-20T16:39:33.858-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MEL"/><category scheme="http://www.blogger.com/atom/ns#" term="point"/><category scheme="http://www.blogger.com/atom/ns#" term="procedural"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="script"/><category scheme="http://www.blogger.com/atom/ns#" term="soup"/><category scheme="http://www.blogger.com/atom/ns#" term="spiral"/><category scheme="http://www.blogger.com/atom/ns#" term="stair"/><category scheme="http://www.blogger.com/atom/ns#" term="stairway"/><title type='text'>MEL SOUP/ Spiral Stair Basic</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6V_MQHtacUS7mSOrMaM642Nw8h746ng8-vhsfuNHtj1c23DJn4jsGU7zb6Q8R9na9AvhH8EuwEjj3c9_vTcnTZLPmjFOsXD6vKBSauGlHrFLk0F4qiIB6ZYQ1VDtf8iJY5Q4eRNE1ef9T/s1600/PrtScr+capture_10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;448&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6V_MQHtacUS7mSOrMaM642Nw8h746ng8-vhsfuNHtj1c23DJn4jsGU7zb6Q8R9na9AvhH8EuwEjj3c9_vTcnTZLPmjFOsXD6vKBSauGlHrFLk0F4qiIB6ZYQ1VDtf8iJY5Q4eRNE1ef9T/s640/PrtScr+capture_10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I was reading this page:&lt;br /&gt;
&lt;a href=&quot;http://accad.osu.edu/~jeisenma/teaching/PythonForArtists/mayaPython.html&quot;&gt;http://accad.osu.edu/~jeisenma/teaching/PythonForArtists/mayaPython.html&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
So that page is talking about &lt;b&gt;Maya Python scripting&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
One of the examples is showing how to create Spiral Stair using Python script wrapper in Maya.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SPIRAL STAIR BY MEL&lt;/b&gt;&lt;br /&gt;
I tried to do the same in MEL.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;// create simple spiral stairs 20 steps.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;int $i;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;for ($i=0; $i&amp;lt;20; $i++)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;polyCube -ch on -o on -w 2 -h 0.5 -d 3 -cuv 4 ;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;move -r 0 $i -4 ;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;xform -ws -rotatePivot 0 0 0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;rotate -r -os 0 ($i*15) 0 ;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This is, again, super basic :) But learn bit by bit.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SPIRAL STAIR BY HAND&lt;/b&gt;&lt;br /&gt;
If you are doing it by hand:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Create a poly cube.&lt;/li&gt;
&lt;li&gt;Change the setting so the cube looks like a stair.&lt;/li&gt;
&lt;li&gt;Drag it to the side.&lt;/li&gt;
&lt;li&gt;Move pivot to world center axis (0,0,0).&lt;/li&gt;
&lt;li&gt;Duplicate (Ctrl+D) and rotate&lt;/li&gt;
&lt;li&gt;Repeat the Duplicate With Transform (Shift+D)&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
I am really curious on how Python usages differs --- yet similar --- from one 3D package to another.&lt;br /&gt;
&lt;br /&gt;
Like for example, this blog on Blender and Python scripting, has plenty of interestingness:&lt;br /&gt;
&lt;a href=&quot;http://blenderscripting.blogspot.com.au/&quot;&gt;http://blenderscripting.blogspot.com.au/&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
Python scripting is native programming language in Blender and Blender is open source, plenty of Python scripts examples.&amp;nbsp;Maybe one can learn this way.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;SPIRAL STAIR BY SOUP&lt;/b&gt;&lt;br /&gt;
If you are doing it procedurally using SOuP, you can certainly do that using &lt;b&gt;Point SOuP&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
You use expression like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;// POINT POSITION FOR PLACING THE INSTANCE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$X=$TX + sin($ID) * 1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$Y=$TY + $ID * 1 ;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$Z=$TZ + cos($ID) * 1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;// POINT NORMAL (PARTICLE VELOCITY) FOR ROTATION&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$X=$NX;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$Y=15 * $ID;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$Z=$NZ;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The tricky part is Maya Curve itself, which is basically a NURBS and it does not create spiral nicely even with Rebuild Curve applied, it has strangeness happening.&lt;br /&gt;
&lt;br /&gt;
And next tricky bit is getting the Normal of the Instance correct. It seems to work alright with expression above, but not really perfect.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7xAu7WBPvFoyXanoWEPR-pA4ppbpvBGucE-ziC17eJV75rCaTmaiRajWUz1vyBD-EQal_ySz_T5NeJnJUlWmisEuxrsGiQTBhER3YLQkNRoULCxGo1gmNJTKT-HODvzCHkZ28YEPhrxHf/s1600/PrtScr+capture_7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7xAu7WBPvFoyXanoWEPR-pA4ppbpvBGucE-ziC17eJV75rCaTmaiRajWUz1vyBD-EQal_ySz_T5NeJnJUlWmisEuxrsGiQTBhER3YLQkNRoULCxGo1gmNJTKT-HODvzCHkZ28YEPhrxHf/s1600/PrtScr+capture_7.png&quot; /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWcGHdDoqFCmFXd9HSWj-xRAyXgyqqAadOieQQrGxeBP4ns3KE6S6XQICmd43doOKUNlM7IJdS8BpA-_YjsmxXpU49RMgxQ5vr2CXUL18c_v1CvDLhZV7NvJs9V4P8prY6MsSd9HQHxhL5/s1600/PrtScr+capture_6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;552&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWcGHdDoqFCmFXd9HSWj-xRAyXgyqqAadOieQQrGxeBP4ns3KE6S6XQICmd43doOKUNlM7IJdS8BpA-_YjsmxXpU49RMgxQ5vr2CXUL18c_v1CvDLhZV7NvJs9V4P8prY6MsSd9HQHxhL5/s640/PrtScr+capture_6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Anyhow, you might as well using &lt;b&gt;Maya Poly Helix&lt;/b&gt; to instance the stairs.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
UPDATE:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Further investigation, of course with Point SOuP, we don&#39;t need to worry about the original Point Position and we can simply replace it with our own expressions:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;// POINT POSITION FOR PLACING THE INSTANCE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$X=sin($ID) * 1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$Y=$ID * 1 ;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$Z=cos($ID) * 1;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEOGCqpJigmSkvltyQv_J_BelBhdWkSqZvARm-zyA4vTMtFFVfK1MTv8tdGhKFLyrFBg39bkR_aRNfQTR05-77EUHcKYH4zwPtkoqigcy9tHM2bzCKhQgHwMvc7pBVq44flf9BoWK0iBMY/s1600/PrtScr+capture_9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEOGCqpJigmSkvltyQv_J_BelBhdWkSqZvARm-zyA4vTMtFFVfK1MTv8tdGhKFLyrFBg39bkR_aRNfQTR05-77EUHcKYH4zwPtkoqigcy9tHM2bzCKhQgHwMvc7pBVq44flf9BoWK0iBMY/s1600/PrtScr+capture_9.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;UPDATE 2012.08.19&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This is the more correct expression for SPIRAL CURVE:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;// POINT POSITION&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$X=cos($ID * 5) * $ID/500;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$Y=$ID /200 +5 + $ID;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$Z=sin($ID * 5) * $ID/500;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;NOTE: There are many kinds of spirals, each with different formula.&lt;br /&gt;
&lt;br /&gt;

For this particular example, I cheated by checking Houdini Cookbook.&lt;br /&gt;
&lt;a href=&quot;http://www.sidefx.com/docs/houdini9.5/ref/expression_cookbook&quot;&gt;http://www.sidefx.com/docs/houdini9.5/ref/expression_cookbook&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
(Play around with the numbers and see how you can adjust the spiral radius, etc.)&lt;br /&gt;
&lt;br /&gt;
So there you go, Procedural Stair in Maya, using SOuP, based on Houdini cookbook. Just need to find the right formula for it. Don&#39;t you just love Math?&lt;br /&gt;
&lt;a href=&quot;http://www.mathematische-basteleien.de/spiral.htm&quot;&gt;http://www.mathematische-basteleien.de/spiral.htm&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhocrfE8yQqFr6RH5uRAg8mXdg0MaxAbYL0MwSIjKK8G0JVCmdvuniQUeLUZtxya-CNv8pZI506gO5j40MO3ryzcz2oBVpgous4We0vyQAGQf5G6Xk5SKfxzKnBHx45Lr6bNcIpw2QDRdvo/s1600/PrtScr+capture_4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhocrfE8yQqFr6RH5uRAg8mXdg0MaxAbYL0MwSIjKK8G0JVCmdvuniQUeLUZtxya-CNv8pZI506gO5j40MO3ryzcz2oBVpgous4We0vyQAGQf5G6Xk5SKfxzKnBHx45Lr6bNcIpw2QDRdvo/s1600/PrtScr+capture_4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgYD5B5OEcr_L2T5eb_F_8nGym9qhwvPZ9pZUMVUkH_YWKwnsBD79E6eiyJJGNS43fXhrKJKHn5pGKP2m3gstakmv707kUk1nGwQnDMO_Ctr6gcL-w1jzv1rZ1PPEDaWD18HD4t6LstFqR/s1600/PrtScr+capture_5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;305&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgYD5B5OEcr_L2T5eb_F_8nGym9qhwvPZ9pZUMVUkH_YWKwnsBD79E6eiyJJGNS43fXhrKJKHn5pGKP2m3gstakmv707kUk1nGwQnDMO_Ctr6gcL-w1jzv1rZ1PPEDaWD18HD4t6LstFqR/s400/PrtScr+capture_5.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCPLIY3IDBnvs3w-O6sADC6vB7PWuR1MUJLBjwaixBBhCiR02rLdHmHQr5x4iOvwgzmc0a4p6jBudwb0DTwK0zZhNA-gKXUv7UEnd7ifBTII8iJ3B0YAnd_2BES2kSrtb5mTIoQFPtoVvT/s1600/PrtScr+capture_6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCPLIY3IDBnvs3w-O6sADC6vB7PWuR1MUJLBjwaixBBhCiR02rLdHmHQr5x4iOvwgzmc0a4p6jBudwb0DTwK0zZhNA-gKXUv7UEnd7ifBTII8iJ3B0YAnd_2BES2kSrtb5mTIoQFPtoVvT/s400/PrtScr+capture_6.png&quot; width=&quot;392&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I believe the most correct way to procedurally create this spiral is using Particles. This is because in Maya, a single point in space is not regarded as anything:&lt;br /&gt;
- For Curve (NURBS), you need at least 4 points (unless Linear NURBS, you can have 2 points to create Linear Curve).&lt;br /&gt;
- For Polygon, Maya requires a minimum of 3 points to create a polygon face. You cannot really have a single point or 2 points to create an edge.&lt;br /&gt;
&lt;br /&gt;
So, Particles is the only way you can start building from a single point only. If you are using Particles to create Dots forming a Spiral and then you use &lt;b&gt;Point Cloud To Curve SOuP&lt;/b&gt; to connect the dots (points PP or position PP of Particles) then you have a more &quot;correct&quot; procedural creation of Spiraling thing.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;VIDEO DEMO:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; height=&quot;360&quot; src=&quot;http://www.youtube.com/embed/3gVKQuYRW6k&quot; width=&quot;640&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/7661435920850168396/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2012/08/mel-spiral-stair-basic.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/7661435920850168396'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/7661435920850168396'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2012/08/mel-spiral-stair-basic.html' title='MEL SOUP/ Spiral Stair Basic'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6V_MQHtacUS7mSOrMaM642Nw8h746ng8-vhsfuNHtj1c23DJn4jsGU7zb6Q8R9na9AvhH8EuwEjj3c9_vTcnTZLPmjFOsXD6vKBSauGlHrFLk0F4qiIB6ZYQ1VDtf8iJY5Q4eRNE1ef9T/s72-c/PrtScr+capture_10.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7948081444576729669.post-5838363398617705832</id><published>2012-08-17T05:20:00.002-07:00</published><updated>2012-08-19T01:51:29.399-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MEL"/><category scheme="http://www.blogger.com/atom/ns#" term="particles"/><category scheme="http://www.blogger.com/atom/ns#" term="randomize"/><category scheme="http://www.blogger.com/atom/ns#" term="turbulance"/><category scheme="http://www.blogger.com/atom/ns#" term="vertex"/><title type='text'>SCRIPT / Randomize Vertex Position</title><content type='html'>To continue my study of MEL scripting, I started to look into commands and see what they do.&amp;nbsp;This one was found by accident.&lt;br /&gt;
&lt;br /&gt;
Snippet of MEL code to randomize vertices position.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIsAfWsdYSexUiv678cbfG3ct9icF63Bf1p51k1R-uRwkf0S0kIzx1fK9FB1byIAlkIkb6J7ydB6cp7I-smv_VwXFnILYpsMqKBuLJ-WgNpYCJ0AYiAkc7jdKTFOOjQu5qlzz9fSNdxPK8/s1600/PrtScr+capture_4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIsAfWsdYSexUiv678cbfG3ct9icF63Bf1p51k1R-uRwkf0S0kIzx1fK9FB1byIAlkIkb6J7ydB6cp7I-smv_VwXFnILYpsMqKBuLJ-WgNpYCJ0AYiAkc7jdKTFOOjQu5qlzz9fSNdxPK8/s400/PrtScr+capture_4.png&quot; width=&quot;321&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This is probably NOT the most efficient way to do it. It is slooow on heavy mesh.&lt;br /&gt;
&lt;br /&gt;
But for a quick job, it seems to work and work on many objects.&lt;br /&gt;
&lt;br /&gt;
It really randomize the mesh, so maybe this is a useless piece of script!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;USING MEL TO RANDOMIZE POSITION OF VERTICES OF SELECTED OBJECT(S)&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$mySelection = `ls- sl`;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$myVerts = `getVerts`; // this command grabs all the vertices of selected objects and put into a string array&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;for ($vert in $myVerts)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;{&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; float $min = -0.5;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; float&amp;nbsp;$max&amp;nbsp;&amp;nbsp;= 0.5;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; float $randNumX = rand(
$min&amp;nbsp;,
$max&amp;nbsp;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; float $randNumY = rand(
$min&amp;nbsp;,
$max&amp;nbsp;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; float $randNumZ = rand(
$min&amp;nbsp;,
$max&amp;nbsp;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; select -r $vert ;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; move -r $randNumX $randNumY $randNumZ ;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;select -r $mySelection; // return to previously selected objects&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;USING PYTHON TO RANDOMIZE POSITION OF VERTICES&lt;/b&gt;&lt;br /&gt;
I have not learned Python yet. You know how? Please tell me.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;THINK DIFFERENT&lt;/b&gt;&lt;br /&gt;
Using scripts make you feel like doing &quot;advanced&quot; things, but you know the truth is that you can do a lot of things without coding. This is what I called the outside of the box solution.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;USING SOFT BODY TO RANDOMIZE POSITION OF VERTICES&lt;/b&gt;&lt;br /&gt;
I recall how to do same thing in the past:&lt;br /&gt;
1. Select an object.&lt;br /&gt;
2. Turn it into Soft Body&lt;br /&gt;
Soft/Rigid Bodies - Create Soft Body&lt;br /&gt;
3. We know that Soft Body is simply Particles driving every vertex of the mesh. So, just apply Turbulance Field, increase the Magnitude.&lt;br /&gt;
4. Voila, you got the vertices position randomized. Once you are happy, delete its History and delete Particles.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;USING SOUP PLUGIN BY PETER SHIPKOV&lt;/b&gt;&lt;br /&gt;
Simply use Point SOuP. It&#39;s very cool and the effect is LIVE.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;USING OTHER METHODS&lt;/b&gt;&lt;br /&gt;
There is a Maya plugin called &lt;b&gt;DisplaceD by Hajime Nakamura&lt;/b&gt;, it displaces polygon mesh using Textures (similar to &amp;nbsp;if you use Peak SOuP and TextureToArray SOuP), it can randomize vertices really easily.&lt;br /&gt;
&lt;br /&gt;
Don&#39;t forget also Maya&#39;s own &lt;b&gt;PolyMoveVertex&lt;/b&gt; node which can transform vertex randomly. This node is created when you use Transform Component on Mesh Vertex.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE3PfRmNN8X-Mvh830IWX94oFGG2ULcYoTgc6RGR52XvXp0PN320_EVNV4LGyO-6FHKfZqrqfbfCm7iEbMJvFEB0ZWkbNaoSYmnDg__6k5-he2jYMNQ732rOo1Fn7RvjCKcT005m5FajHM/s1600/PrtScr+capture_5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE3PfRmNN8X-Mvh830IWX94oFGG2ULcYoTgc6RGR52XvXp0PN320_EVNV4LGyO-6FHKfZqrqfbfCm7iEbMJvFEB0ZWkbNaoSYmnDg__6k5-he2jYMNQ732rOo1Fn7RvjCKcT005m5FajHM/s640/PrtScr+capture_5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;UPDATE 2012.08.19:&lt;/b&gt;&lt;br /&gt;
There is an example script to &quot;randomize points at component level&quot; here from PolyExtrude:&lt;br /&gt;
&lt;a href=&quot;http://www.polyextrude.com/tutorials/MelScripting/download.html&quot;&gt;http://www.polyextrude.com/tutorials/MelScripting/download.html&lt;/a&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mayaspiral.blogspot.com/feeds/5838363398617705832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mayaspiral.blogspot.com/2012/08/script-randomize-vertex-position.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/5838363398617705832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7948081444576729669/posts/default/5838363398617705832'/><link rel='alternate' type='text/html' href='http://mayaspiral.blogspot.com/2012/08/script-randomize-vertex-position.html' title='SCRIPT / Randomize Vertex Position'/><author><name>Blender Sushi</name><uri>http://www.blogger.com/profile/03857534411233632553</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIsAfWsdYSexUiv678cbfG3ct9icF63Bf1p51k1R-uRwkf0S0kIzx1fK9FB1byIAlkIkb6J7ydB6cp7I-smv_VwXFnILYpsMqKBuLJ-WgNpYCJ0AYiAkc7jdKTFOOjQu5qlzz9fSNdxPK8/s72-c/PrtScr+capture_4.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>