tag:blogger.com,1999:blog-29490783495971153612024-03-13T06:05:12.287-04:00Parzival Röthlein - Character TDA blog about character rigging and things connected.Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.comBlogger36125tag:blogger.com,1999:blog-2949078349597115361.post-6948829973155899072023-11-11T18:47:00.009-05:002023-11-14T01:31:38.802-05:00prSelectionUi 2023.0 update with Python 3.0 support<iframe allowfullscreen="allowfullscreen" frameborder="0" height="281" mozallowfullscreen="mozallowfullscreen" src="https://player.vimeo.com/video/37670989?badge=0" webkitallowfullscreen="webkitallowfullscreen" width="500"></iframe> <br />
<p>A few months ago I released an update (2023.0) for prSelectionUi that supports Python 3 (Maya >2022.x). It also still works with older Maya versions (Python 2.0).</p><p>You can get it here: <a href="https://pazrot.gumroad.com/l/prselectionui" target="_blank">https://pazrot.gumroad.com/l/prselectionui</a></p><p>It still requires PyMEL to be installed, which sadly has become more difficult with the PyMEL installation switching to pip. I think that installation change was a bad call and I regret using PyMEL. The time I saved was not worth the time lost for the users, and I might now have to rewrite the script with maya.cmds anyways.</p>Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-20981216731672742542023-07-21T19:05:00.002-04:002023-11-14T01:30:36.698-05:002019 - Scoob! rigging reel<iframe allowfullscreen="" frameborder="0" height="270" src="https://player.vimeo.com/video/843372852?h=61cd7c683e" title="vimeo-player" width="480"></iframe>
<ul style="text-align: left;"><li>Content from 2019, for the animated feature film "Scoob!". It was my first show after moving to Canada and starting as Senior Rigging Artist at Reel FX.</li><li>Was done for my 2020-2021 demo reel that got me to Vancouver / VFX</li><li>I used a blinn/highlight shader to be more honest and show the surface curvature. With lambert/flat shaders you can get away with a lot more. Even wireframe is pretty forgiving. </li><li>Velma body rig (0:01 - 0:32):</li><ul><li>I could not actually find good body deformation shots in the movie, because she does not move much in general and wears a thick sweater. </li><li>0:08 Deformation issue when metacarpals are offset. This area was always a struggle, because of the topology. It was the standard hand topology at the time and not supposed to be changed. That's why I didn't show the hands in the breakdown.</li><li>0:11 clavicle up chest corrective blending issue. It stops suddenly, when it should fade out or extend instead.</li></ul><li>Cpt. Caveman face rig (0:32 - 0:59)</li><ul><li>His face has a high range of motion with close ups in the movie, so I was happy with the shots that I could select for this demo.</li><li>0:48 Eyelid, mouth corner topology distortions: I did major retopology, maybe full retopology for his face, but afterwards there was a design change, which created these topology distortions in this somewhat neutral pose (The design/model change was great though)</li><li>0:57 shape and blend issues between eyebrows.</li></ul></ul><br /><p></p>Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-26604075903441803462020-07-18T19:47:00.012-04:002023-10-22T02:23:56.687-04:00prPanelCtx - making of<iframe allow="autoplay; fullscreen" allowfullscreen="" frameborder="0" height="360" src="https://player.vimeo.com/video/391911932" width="550"></iframe>
<br />
<div>
<b>Source</b></div>
<div><a href="https://pazrot.gumroad.com/l/prpanelctx">https://pazrot.gumroad.com/l/prpanelctx</a></div>
<div>
<br /></div>
<div>
<b>Description</b></div>
<div>
This script allows the user to have temporary panel settings during manipulator dragging and timeline changes (dragging, playback). The idea was to hide control shapes during this time, to allow animators to evaluate the deformation.</div>
<div>
When using this script together with Mayas controller autohide on proximity, it can get pretty close to "Pixar style controls"</div>
<div>
<br /></div>
<div>
<div>
<b>Related</b></div>
<div>
The purpose is similar to "Pixar style controls". I'm not aware of a publicly available version of them. I have only seen around a dozen videos of prototypes from independent users.</div>
</div>
<div>
<br /></div>
<div>
<b>Origin</b></div>
I randomly stumbled upon the -preDragCommand and -postDragCommand flags of the manip*Context commands (manipMoveContex, ...). Before that I was not aware that the user can access these events. So when I saw them I thought they can be used for the purpose of this script.<br />
<div>
<br /></div>
<div>
<div>
<b>
Evolution</b><br />
At first I thought about setting an attribute in the rig (global control visibility switch). But then I realized that it makes more sense to use it like a Maya setting and change the panel settings ("Panel > Show > .."), because:<br />
<ul>
<li>It works for any rig and does not introduce any per asset requirements (visibility attribute has to exist and has to be hard coded in the script)</li>
<li>It can hide shot objects that are not part of the rig, like locators used for constraint setups</li>
<li>It makes the animator completely independent and gives them full control over what to hide</li>
<li>Can be used to hide the manipulator itself and other panel settings (wireFrameOnShaded, ...)</li>
</ul>
After that was done I added the timeline dragging / playback context. This is partially already possible in Maya:</div>
<div>
- Custom Playblast settings "panel > show"</div>
<div>
- Display layer playback setting</div>
<div>
<br />
<div>
<b>Comparison</b></div>
<div>
Compared to "Pixar style controls" it is not as intuitive, but there are some advantages:</div>
<div>
- It has <b>less complexity</b> than writing a Locator plugin that works in all Maya Viewports (legacy, 2.0) and on different OSs.</div>
<div>
- It <b>does not introduce dependency</b>. The animator does not rely on an RnD department to develop the plugin and a rigging department to create these custom controls for each asset.</div>
<div>
- It <b>does not slow down the rig</b>. In my limited speed testing it actually did speed up all the rigs a little bit.</div>
<br />
<b>Limitations</b><br />
I could not find a way to access camera and channelBox dragging.<br />
I could not find a way to make it work with component selection for modeling. Because the command flags I'm using require there to be a specific node type in the selection.</div>
<div>
<br /></div>
<div>
<b>Personal usage</b><br />
I don't think its that useful when rigging. I usually auto-hide the manipulators and only sometimes do I hide the controls in the timeline context when I'm working on the deformation. </div>
</div>
<div><br /></div><div><ul style="text-align: left;">
</ul>
</div>
Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com2tag:blogger.com,1999:blog-2949078349597115361.post-71630125185516269252020-03-31T15:08:00.000-04:002020-04-04T14:04:48.717-04:00Tips when working remotely in Maya with VNC<h3>
<span style="font-size: small; font-weight: 400;">I spent a few hours optimizing my VNC homeoffice setup and this is what I learned. (I only tried the free editions of realVNC and tightVNC.)</span></h3>
<h3>
TL;DR</h3>
<ul>
<li>realVNC supports dual monitor full screen</li>
<li>tightVNC has more control for compression/encoding</li>
<ul>
</ul>
<li>While moving the viewport camera, let go of ALT, but keep holding the mouse button to get rid of lag</li>
<li>Maya settings to improve framerate</li>
<ul>
<li>Set background to solid color (don't use gradient)</li>
<li>Disable "Display > Grid"</li>
<ul>
</ul>
<li>Hide as many objects as possible for the moment</li>
<ul>
</ul>
</ul>
<ul>
<li>Get rid of color transitions on surfaces</li>
<ul>
<li>Use solid shader colors<i> </i></li>
<li>Viewport panel "Shading > Wireframe" </li>
</ul>
<li>Use small viewport panel</li>
<ul>
</ul>
</ul>
</ul>
<h3>
Explanation</h3>
<div>
</div>
<ol>
<li><b>realVNC supports <b>dual monitor</b> full screen.</b> <i>tightVNC does not (in the free edition).</i></li>
<li><b>tightVNC has more control for compression/encoding</b><i>, but it does never seem to get faster than realVNC, even with low quality and fast encoding.</i></li>
<ol>
</ol>
<li><b>While moving the viewport camera, let go of ALT, but keep holding the mouse button to get rid of lag</b><b>. </b><i>I<i>t seems like a random bug to me: </i>While holding a mouse button at the same time as either ALT, CTRL, SHIFT there is an artificial lag with both VNC clients. The workaround can get annoying when quickly switching camera movement types</i><i>, so I thought about changing the ALT hotkey. It would also be a good idea to look at more VNC clients, to see if one does not have this issue.</i></li>
<li><b>Maya settings to improve </b><b>framerate </b><i>By reducing image complexity and changes between each frame you can increase the framerate a lot, because the compressing and encoding of images will be faster (...something like that)</i></li>
<ul>
<li><b>Set background to solid color (don't use gradient) </b><i>ALT+b hotkey</i></li>
<li><b>Disable "Display > Grid"</b></li>
<ul>
</ul>
<li><b>Hide as many objects as possible for the moment </b><i>this includes creating temp mesh duplicates with all polyFaces deleted that are not needed for the current task.</i></li>
</ul>
<ul>
<li><b>Get rid of <b>color transitions on </b>surfaces </b><i>because this is often responsible for most of the pixel changes between frames</i></li>
<ul>
<li><b>Use solid shader colors</b><i> for this I got rid of the color falloff on the d<i>efault material (diffuse 0.0, set incandescence), so I can switch to </i>"use default material" + "wireframe on shaded" most of the time.</i></li>
<li><b>Viewport panel "Shading > Wireframe" </b></li>
</ul>
<li><b>Use small viewport panel </b><i>to have a smaller moving object. It's the same benefit as when zooming out </i><i>(==fewer changing pixels over time)</i></li>
<ul>
</ul>
</ul>
</ol>
<div>
</div>
Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-1470848009630290702020-02-09T00:41:00.004-05:002020-06-01T02:01:30.402-04:00The One Tool ChallengeBecause there are so few useful and production ready Maya tools online. I was thinking how nice it would be, if every technical Maya user in the world would share (+support) even just one such tool in their lifetime. Putting it that way, should make it sound trivial. And if it were the case we would all be better off.<br />
For myself I would consider <b>prSelectionUi </b>(<a href="https://vimeo.com/pazrot/prselectionui" target="_blank">https://vimeo.com/pazrot/prselectionui</a>) to be a success in that regard. It is mostly for animators and after publishing it on highend3d and making a Vimeo video in 2012 it self distributed and to this day I find it installed at every company I go to and a lot of animators are using it.<div><br /></div><div>
In general I would recommend to consider:<br />
<ul></ul>
<div>
<ul>
<li>Is the tool actually useful? (doing something difficult != doing something useful)</li>
<li>Can it already be done in Maya? Or has someone else already made a publicly available version?</li>
<li>Is it useful enough for other people to be worth the time and effort to learn it, install it and keep it updated?</li>
<li>Test it a while in production with a small group of people before sharing it publicly.</li>
<li>Are you willing to support it?</li>
</ul>
</div>
If someone is looking for useful tool ideas. The most fundamental Maya UIs have a lot of room for improvement, so pretty much ever Maya user would benefit from those:<br />
<ul>
<li><b>Connection editor </b>with name search/filter field to reduce the time and focus required to find the right attribute. Even with alphabetic ordering is it pretty tedious and that also does not work well together with child attributes, because it orders them together with the root attributes. In addition, it would also be nice to make it scalable, like the option to connect one output into multiple nodes input attributes at the same time.</li>
<li><b>Add and Edit Attribute Editor </b>for the 21st century. They have probably not been changed since 1999 and could benefit a lot from a major overhaul. I would also merge them into one.</li>
<li>A non-destructive <b>Node editor / Hypergraph</b>: One that does not move the editor-view and nodes around on it's own when working with it. The node editor version would be a lot more work, so I would probably start with something closer to the Hypergraph.</li>
<li><b>Attribute editor </b>for multiple nodes at once (setting values applies to all nodes, not just one). I don't know how the aeTemplate reading works, so it might be really hard to do. In that case an improved <b>Attribute Spread Sheet</b> could be a better goal.</li>
</ul>
I'm not much of a UI guy, so that's probably why those have been on my mind for a while and I haven't done any of them. They also don't have the biggest impact, but a huge target audience.<br />
<div>
<div>
<ul>
</ul>
</div>
</div>
</div>Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-5757992124348532392019-12-31T14:14:00.002-05:002023-02-26T03:48:50.503-05:00prKeepOut.py making-ofA custom Maya node that can be found here:<br />
<a href="https://github.com/parzival-roethlein/prmaya" target="_blank">https://github.com/parzival-roethlein/prmaya</a><br />
<br />
A few months ago I started making improved array versions of Maya nodes for smaller, scalable, procedural graphs.<br />
The prKeepOut node specifically had some relevance for production: I had an asset with around a hundred armor pieces and I thought about using keepOut nodes, but ended up deciding against them because it would have been overkill: Each armor piece would have required multiple keepOut nodes, which would have slowed down the rig a lot, take a long time to setup and probably never really work that well, because of multiple armor pieces overlapping in areas with multiple deformation axes. In the end I copied the skinCluster and blendShapes from the body and tweaked them to make the armor deform more rigid and add some offset controls for a few of the armor pieces.<br />
<br />
It took me a few evenings after work to write prKeepOut, so in hindsight I wondered why I hadn't done it sooner. The "algorithm" is less than 100 lines and the rest is just the verbose Maya API way of creating/querying/setting attributes.<br />
I thought about writing more about the making-of and reasoning. But it's open source and just basic Maya API, linear algebra usage. And I imagine the changes make sense to anyone who has used the 10 year old Maya keepOut node.<br />
Initially I had shape inputs specific for each ray to support multi layer collision, but removed it again, because it would make the node usage too complex and risk evaluation cycles.<br />
With the recent input matrix announcement for transforms in Maya 2020+ I'm thinking about switching to matrix outputs.<br />
<br />
A few weeks later Autodesk announced bifrost graph, which looks amazing and will hopefully make these kind of custom nodes obsolete.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIsHVwKi_ZGiPF62KSaemUgJGpv6TAVw_1osT-19b6Ebjy-b2x9cwngYzcQH4Ibckf2WcBo67Pgn2mUK9NS0HsiMBvn0hisLSSnunQ-HoTzqEdN92UNjrmCnFaIl2_gcScFRe4ekjLTVrJ/s1600/prKeepOut_viewport.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="611" data-original-width="671" height="363" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIsHVwKi_ZGiPF62KSaemUgJGpv6TAVw_1osT-19b6Ebjy-b2x9cwngYzcQH4Ibckf2WcBo67Pgn2mUK9NS0HsiMBvn0hisLSSnunQ-HoTzqEdN92UNjrmCnFaIl2_gcScFRe4ekjLTVrJ/s400/prKeepOut_viewport.PNG" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBbQhlpvr-aE4U8nn48H20VhCfebPUEjinuXiwr1kfp-LvzOXl__NkWzOgO_FT_tIo0HNQAHf6nrSHXCnO9RLBVGxOVbUZm7817zQaGVMWDMYtTTBo2Cce_2Xvwgo_EWpmGpcjtIAorNk6/s1600/prKeepOut_nodeEditor.PNG" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="932" data-original-width="801" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBbQhlpvr-aE4U8nn48H20VhCfebPUEjinuXiwr1kfp-LvzOXl__NkWzOgO_FT_tIo0HNQAHf6nrSHXCnO9RLBVGxOVbUZm7817zQaGVMWDMYtTTBo2Cce_2Xvwgo_EWpmGpcjtIAorNk6/s400/prKeepOut_nodeEditor.PNG" width="342" /></a></div>
Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-19512937036597513832018-12-05T21:50:00.001-05:002023-11-12T02:00:15.389-05:00New job at Reel FXThis week I started at Reel FX Montreal as Senior Rigging Artist and I'm really looking forward to working on their animated features.<div><br />
When looking for a new job my main goal was to find the most interesting work. After five years in Germany where I had a lot of control on the whole rigging pipeline (I often was the only rigger on the project) and I completed some of my main goals:</div><div><ul style="text-align: left;"><li>Create a non-destructive rigging pipeline in production: Almost complete freedom in the template and rig-built stage while always being able to undo/redo the rig build</li><li>Improve modeling / topology skills by creating complete characters and topologies based on "The Art of Moving Points"</li></ul></div>Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com1tag:blogger.com,1999:blog-2949078349597115361.post-52138391205858925592018-10-11T22:28:00.000-04:002020-04-29T15:55:21.162-04:00Maya API ramp attribute bug?<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: center;">
1. When saving:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXI5dN-7PDuYzI7k_BhqXTGbxWTuN30PBl_42EsEeo6Mqy4R9l2nczYH5RRPt8HeDxcP7E9fVYBpx_-bPYkKGyDMST3ZmQcksFybor5eYQfbhz4uMez6lt_RewZSsXXbJ4N5AGqrBWt7eO/s1600/rampAttribute.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="224" data-original-width="541" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXI5dN-7PDuYzI7k_BhqXTGbxWTuN30PBl_42EsEeo6Mqy4R9l2nczYH5RRPt8HeDxcP7E9fVYBpx_-bPYkKGyDMST3ZmQcksFybor5eYQfbhz4uMez6lt_RewZSsXXbJ4N5AGqrBWt7eO/s320/rampAttribute.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
2. What gets stored in the ascii file: </div>
<div style="text-align: center;">
<b>setAttr -s 2 ".falloff[1]" 1 1 1;</b></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
3. After opening the scene again:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNQLo7-IcqZ07KgGyzUcUuqOjjLfC5bKuuOHMmYcNDSQTjQSowxL7cMLsJ0YMXg0uCOM2ZGSDLs7SIM72euCBmi9fjq02bSkU6f7jKx0SgV767yPU168b2EIa8_vjz6bKlxwnwzuzfVLew/s1600/rampAttribute_after.png" imageanchor="1"><img border="0" data-original-height="224" data-original-width="541" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNQLo7-IcqZ07KgGyzUcUuqOjjLfC5bKuuOHMmYcNDSQTjQSowxL7cMLsJ0YMXg0uCOM2ZGSDLs7SIM72euCBmi9fjq02bSkU6f7jKx0SgV767yPU168b2EIa8_vjz6bKlxwnwzuzfVLew/s320/rampAttribute_after.png" width="320" /></a></div>
<br />
I recently noticed in Maya 2018 that custom Python API 1.0 node ramp attribute elements with position/value/interpolation : 0.0/0.0/linear do not get saved with the Maya scene (if their index is the lowest). I guess this is a bug. Some debug infos I gathered:<br />
<div>
<ul>
<li>Probably bug source: By default Maya does not save attribute default values</li>
<li>Does not happen with default Maya nodes like remapValue</li>
<li>MPxNode.shouldSave documentation explains why this should not happen (but it is not true): "This method is not called for ramp attributes since they should always be written."</li>
<li>Since shouldSave gets wrongfully called it has to be overwritten to fix the problem</li>
<li>Only returning 'unknown' will not save the attribute. OpenMayaMPx.MPxNode.shouldSave(...) does exactly that.</li>
<li>The Python devkit example of shouldSave pyApiMeshShape.py is a bit misleading: From what I have tested all these return values seem to force save: True, False, None </li>
</ul>
<script src="https://gist-it.appspot.com/github/parzival-roethlein/prmaya/blob/master/post/blog/rampAttrBugShouldSave.py"></script>
<br />
<div>
Implementations of this workaround can be found in prClosestPoint:</div>
</div>
<div>
<a href="https://github.com/parzival-roethlein/prmaya" target="_blank">https://github.com/parzival-roethlein/prmaya</a><br />
<br />
<i>Update 2020-03-31:</i><br />
<i>Another situation with the same problem was with a float array attribute in Python API 2.0. The fix is in my /plugins/prUpCurveSpline.py</i><i>: </i><br />
<a href="https://github.com/parzival-roethlein/prmaya" target="_blank">https://github.com/parzival-roethlein/prmaya</a></div>
Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com1tag:blogger.com,1999:blog-2949078349597115361.post-80961554594484301482018-10-09T17:25:00.000-04:002018-10-16T01:47:17.990-04:00prPyMath.py making-ofA custom Maya node that can be found here:<br />
<a href="https://github.com/parzival-roethlein/prmaya" target="_blank">https://github.com/parzival-roethlein/prmaya</a><br />
Direct file link:<br />
<a href="https://github.com/parzival-roethlein/prmaya/blob/master/prmaya/plugins/prPyMath.py" target="_blank">https://github.com/parzival-roethlein/prmaya/blob/master/prmaya/plugins/prPyMath.py</a><br />
<br />
<b>Origin</b><br />
I wanted to create a node for some trigonometry functions, so I don't have to pollute the node graph with expressions. But after noticing that the functions I needed are all part of the Python math module I decided to just wrap the whole module, to make the node more useful.<br />
There are only a few repeating argument in the whole module and all functions return one or two numbers. Which means there are also few Maya attributes needed to cover all cases.<br />
<br />
<b>Usability</b><br />
A math node with that many operations is not typical for Maya.<br />
When comparing such general purpose math nodes it might be better to just use a Python expression node like this one: <a href="http://around-the-corner.typepad.com/adn/2012/08/a-mathematical-dg-node.html" target="_blank">http://around-the-corner.typepad.com/adn/2012/08/a-mathematical-dg-node.html</a><br />
<br />
<b>Code</b><br />
It was the first time I used the Maya Python API 2.0 for an MPxNode. But in this simple case it did not make a big difference. For the Attribute Editor buttons "Create element", "Delete element" I had to look into querying the node in the Attribute Editor context for the first time. Currently it is a workaround with a hidden textfield. I guess a global MEL variable might be the proper way to handle that?!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL4ft__S9-73Ck7NDRj4IkImZJd0z0wa-jAKZV3xFKXkIwIrC2_WSsQjLXvnenZuYOd4BieC7Ie3VsQVdI8gHqkvFzVAQOasWCUbs4UcBmPcaAs5xLYooeXiM_YWLSeQ03MKIDQkn5ZtZi/s1600/prPyMath_AttributeEditor.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="810" data-original-width="483" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiL4ft__S9-73Ck7NDRj4IkImZJd0z0wa-jAKZV3xFKXkIwIrC2_WSsQjLXvnenZuYOd4BieC7Ie3VsQVdI8gHqkvFzVAQOasWCUbs4UcBmPcaAs5xLYooeXiM_YWLSeQ03MKIDQkn5ZtZi/s640/prPyMath_AttributeEditor.png" width="382" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2_yUP92CF_NAryknFEtQpP43eykTSMYrJRQvcICG5_dLNcsJ59sNnASYlbwrAtIOkf3I5P-omMv3HExBmA9XnZ_q6x6JxB0OEe98ycndMbBGeKAlN-SPy0taRuFRGS6OHmwN5u3bAvuSm/s1600/prPyMath_ChannelBox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="106" data-original-width="261" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2_yUP92CF_NAryknFEtQpP43eykTSMYrJRQvcICG5_dLNcsJ59sNnASYlbwrAtIOkf3I5P-omMv3HExBmA9XnZ_q6x6JxB0OEe98ycndMbBGeKAlN-SPy0taRuFRGS6OHmwN5u3bAvuSm/s1600/prPyMath_ChannelBox.png" /></a></div>
Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-22359812664565721042018-10-09T16:13:00.000-04:002019-12-31T14:20:17.258-05:00prClosestPoint.py making-ofA "new" Maya deformer that can be found here:<br />
<div>
<a href="https://github.com/parzival-roethlein/prmaya" target="_blank">https://github.com/parzival-roethlein/prmaya</a></div>
<div>
Direct file link:</div>
<div>
<a href="https://github.com/parzival-roethlein/prmaya/blob/master/prmaya/plugins/prClosestPoint.py" target="_blank">https://github.com/parzival-roethlein/prmaya/blob/master/prmaya/plugins/prClosestPoint.py</a></div>
<b><br /></b>
<b>Origin</b><br />
Initially I just wanted to update my old prAttractNode from 2011 to work in Maya 2016+, for which I only had to update the envelope, inputGeom, outputGeom attributes (MPxGeometryFilter instead of MPxDeformerNode). But then I also added new attributes and changed the existing ones to make it more user-friendly, scalable, functional:
<br />
<ul>
<li>Added positions as target option </li>
<li>Set all target type attributes to arrays </li>
<li>Made all targets work simultaneously</li>
<li>Added on/off switch attributes</li>
</ul>
So almost every attribute changed and was not backwards compatible. Which is why I ended up giving the node a new name, that is also more suitable for the algorithm.<br />
<div>
<br /></div>
<div>
<b>Usability</b></div>
<div>
In production I mostly used prAttractNode when modeling. For sticky lips only once or twice. But that might be because of the kind of stylized projects I usually work on. It could be much more useful for visual programming, but many nodes are still missing for that in Maya. Python is also too slow for that, unless the affected vertex count is small enough. </div>
<br />
<div>
<b>Code</b></div>
<div>
I would have liked to switch to the Python API 2.0, but the deformer proxy class has not been ported yet.</div>
<div>
For the mesh input I switched from MMeshIntersector to MFnMesh, which is slower. I was having issues getting the matrix for MMeshIntersector to work. I used it in the past (see prAttractNode) so it might be a new bug, or I just made a mistake. On the upside it is more user friendly to not require the matrix input for mesh shapes.<br />
<br />
<b>Thoughts</b><br />
The past ~5 years I haven't written any deformers with the Maya API. I mostly used it in Python scripts to improve performance and to use API exclusive features.<br />
I find it strange that basic classes like MPxDeformerNode are still missing in the Maya Python API 2.0 after having tried it for the first time in early 2013.<br />
A visual programming / procedural node option like Softimage ICE, Fabric Engine, Houdini would be a much better fit for most of my deformer needs. I was anticipating something similar for Maya in 2011, but after so many years and seeing what happend with Softimage and Fabric I have no idea if / when it will ever happen.<br />
The verbose low level nature of C++ Maya deformers only seemed to have increased with the new MPxGPUDeformer class. I haven't really looked into it yet, but the devkit example MPxoffsetNode.cpp has ~600 lines of code for a simple one line vector offset algorithm. That seems quite far away from production problem solving and applied math that I would like to focus on when creating a deformer.<br />
<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://raw.githubusercontent.com/parzival-roethlein/prmaya/master/docs/prClosestPoint_viewport.png" imageanchor="1" style="clear: left; display: inline; margin-bottom: 1em;"><img border="0" data-original-height="524" data-original-width="612" height="341" src="https://raw.githubusercontent.com/parzival-roethlein/prmaya/master/docs/prClosestPoint_viewport.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://raw.githubusercontent.com/parzival-roethlein/prmaya/master/docs/prClosestPoint_AttributeEditor.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: left;"><img border="0" data-original-height="800" data-original-width="408" height="640" src="https://raw.githubusercontent.com/parzival-roethlein/prmaya/master/docs/prClosestPoint_AttributeEditor.png" width="326" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://raw.githubusercontent.com/parzival-roethlein/prmaya/master/docs/prClosestPoint_channelBox.png" imageanchor="1" style="clear: left; margin-bottom: 1em; text-align: left;"><img border="0" data-original-height="310" data-original-width="282" src="https://raw.githubusercontent.com/parzival-roethlein/prmaya/master/docs/prClosestPoint_channelBox.png" /></a></div>
Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com2tag:blogger.com,1999:blog-2949078349597115361.post-49330658344028967692018-10-09T15:02:00.000-04:002018-10-12T21:32:12.621-04:00New github accountI recently started putting repositories on github:<br />
<a href="https://github.com/parzival-roethlein" target="_blank">https://github.com/parzival-roethlein</a><br />
The link is also in the sidebar<br />
<br />
Purpose
<br />
<ul>
<li>One central spot for all my public tools. Easier access, support (opposed to creativecrash / highend3d where I used to upload them)</li>
<li>Code samples when applying for jobs</li>
<li>Get feedback from / collaborate with community</li>
</ul>
Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-41896318384060249192017-08-08T18:48:00.000-04:002018-10-12T19:29:56.398-04:00Python in Maya #3: Context Manager<script src="https://gist-it.appspot.com/github/parzival-roethlein/prmaya/blob/master/post/blog/python_in_maya/p3_context_manager_example_evolution.py"></script>
<script src="https://gist-it.appspot.com/github/parzival-roethlein/prmaya/blob/master/post/blog/python_in_maya/p3_context_manager.py"></script>Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-31165439123615017872017-03-03T08:42:00.001-05:002018-10-12T16:36:18.083-04:00Python in Maya #2: functional programming<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuxFh71vBEy7NiFjfWqglqWqDSfhOnFjslOm8bXtlchzYB0WBtXVN9Jtg2sV2zE789rs5U4RIukUHyrVjP91S1V6b-v6NglxpPvmeYs5yOeN5bFp997PvFMhnX76o4VmTCdkoMAKndJEWU/s1600/joint_chain.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuxFh71vBEy7NiFjfWqglqWqDSfhOnFjslOm8bXtlchzYB0WBtXVN9Jtg2sV2zE789rs5U4RIukUHyrVjP91S1V6b-v6NglxpPvmeYs5yOeN5bFp997PvFMhnX76o4VmTCdkoMAKndJEWU/s1600/joint_chain.jpg" title="Maya scene for first example" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">1. Basic example</td></tr>
</tbody></table>
<script src="https://gist-it.appspot.com/github/parzival-roethlein/prmaya/blob/master/post/blog/python_in_maya/p2_functional_programming.py"></script>Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com2tag:blogger.com,1999:blog-2949078349597115361.post-68108326822674144132016-11-08T19:39:00.000-05:002018-10-12T15:32:29.764-04:00Python in Maya #1: Decorators<script src="https://gist-it.appspot.com/github/parzival-roethlein/prmaya/blob/master/post/blog/python_in_maya/p1_decorator.py"></script>Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com1tag:blogger.com,1999:blog-2949078349597115361.post-55482248247780054722014-10-01T13:17:00.000-04:002014-11-19T06:51:07.409-05:00 Harald rig breakdown<iframe allowfullscreen="" frameborder="0" height="281" mozallowfullscreen="" src="//player.vimeo.com/video/107719930" webkitallowfullscreen="" width="500"></iframe> <br />
<a href="http://vimeo.com/107719930">Harald rig breakdown</a> from <a href="http://vimeo.com/pazrot">Parzival Roethlein</a> on <a href="https://vimeo.com/">Vimeo</a>.<br />
<br />
In 2011 I worked on my last student short at Filmakademie called Harald: <a href="https://www.facebook.com/haraldfilm">https://www.facebook.com/haraldfilm</a><br />
<br />
I was responsible for the main character rigs (including blendshape and some meshflow modeling), animation scripts/support and animated one shot.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigQzUMxZPkMvKxwKLBPWj92qJ0nPqWsSShv4ecK2vdta7ddxK8KL-P4DhCc768GOETt0nlQ_wagz2D4p_bMnbPbuJNEhEeQKoZm4Q1mZrJiRUTepHbmBK1xYFNgP4aDrPMozjcBeW2sPJu/s1600/harald_meshflow.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigQzUMxZPkMvKxwKLBPWj92qJ0nPqWsSShv4ecK2vdta7ddxK8KL-P4DhCc768GOETt0nlQ_wagz2D4p_bMnbPbuJNEhEeQKoZm4Q1mZrJiRUTepHbmBK1xYFNgP4aDrPMozjcBeW2sPJu/s1600/harald_meshflow.png" height="124" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Final meshflow </td></tr>
</tbody></table>
<br />
At first I updated my PyMEL autorigger from 2010 and rigged the bodies with it. Both spine and the bendy limbs are modified ribbon setups (see older post: <a href="http://pazrot3d.blogspot.de/2012/11/joint-chain-rigging-techniques.html" target="_blank">Joint chain rigging techniques</a>). There are no (corrective-) blendshapes for the body, only skinning. <br />
The faces use a standard blendshape + joint combination to match the expression sheet and allow for customization. Reverse wrap deformer for eye bulge in eyelid. Eyelid joints sliding on geometry. Rig performance had some priority and the finished rig showing the final deformation (one subdivision level) ran at over 20 fps.<br />
<br />
I created some animation scripts for the project Maya shelf including a UI (first time using Qt) requested by the animators, which was supposed to be similar to the one they used in a previous Filmakademie short: <a href="https://vimeo.com/23826701">Der Besuch</a><br />
<br />
And finally I animated one shot because I always wanted to do that, even thou I am not an animator. My previous experience was very limited, so I had to learn most animation principles for the first time and it certainly was a fun exercise to use my own rigs. <br />
<span id="goog_67095956"></span> Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-65312804454161375292014-09-22T19:06:00.004-04:002017-09-10T14:03:43.222-04:00BabyDragon walkcycle rig breakdown<iframe allowfullscreen="" frameborder="0" height="281" mozallowfullscreen="" src="//player.vimeo.com/video/106869646" webkitallowfullscreen="" width="500"></iframe> <br />
<a href="https://vimeo.com/106869646">Baby Dragon walkcycle rig breakdown</a> from <a href="https://vimeo.com/pazrot">Parzival Roethlein</a> on <a href="https://vimeo.com/">Vimeo</a>.<br />
<br />
This is a personal project from early 2013.<br />
When I saw a turntable of the dragon on Vimeo (<a href="https://vimeo.com/52581835">https://vimeo.com/52581835</a>), I contacted the modeler. And after I was done with the rig a co-worker / fellow student did the animation.<br />
<br />
For the neck / spine / tail I used the curve/up-curve setup, described in an older post of mine, with one joint for each spike:<br />
<a href="https://pazrot3d.blogspot.de/2012/11/joint-chain-rigging-techniques.html" target="_blank">Joint chain rigging techniques</a><br />
<br />
Credits:<br />
Modeller/Surfacing: Angel Navarro <a href="https://www.angelnavarroart.com/" rel="nofollow" target="_blank">angelnavarroart.com/</a><br />
Character TD: Parzival Roethlein<br />
Animator: Alexander Dietrich <a href="https://www.cargocollective.com/alexanderdietrich" rel="nofollow" target="_blank">cargocollective.com/alexanderdietrich</a><br />
<br />
<br />
<br />
Unrelated to this post, I recently updated an older post:<br />
<a href="https://pazrot3d.blogspot.de/2013/03/maya-naming-conventions.html" target="_blank">Maya naming conventions</a>Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-59457070425311219762013-07-07T21:32:00.000-04:002017-09-10T13:31:21.513-04:00Demoreel 2013Password on request<br />
<i>Edit in 2015: No more password</i><br />
<br />
<iframe allowfullscreen="" frameborder="0" height="281" mozallowfullscreen="" src="https://player.vimeo.com/video/69215861" webkitallowfullscreen="" width="500"></iframe> <br />
<a href="https://vimeo.com/69215861">Parzival Roethlein - Character TD Reel 2013</a> from <a href="https://vimeo.com/pazrot">Parzival Roethlein</a> on <a href="https://vimeo.com/">Vimeo</a>.<br />
<br />
<br />Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-2871642264851998832013-06-12T18:18:00.002-04:002017-08-12T13:54:46.224-04:00Harald TrailerHere is the trailer for the last student short I worked on at Filmakademie. I was the Character/Animation TD and animated one shot.<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="270" src="//www.youtube.com/embed/QKTRO1FFgdQ" width="480"></iframe><br />
<br />
Facebook page for the short:<br />
<a href="https://www.facebook.com/haraldfilm">https://www.facebook.com/haraldfilm</a><br />
<br />
It recently got the SIGGRAPH 2013 Best Student Runners-Up award, yay!<br />
<a href="https://siggraphmediablog.blogspot.de/2013/06/european-directors-win-majority-of.html">https://siggraphmediablog.blogspot.de/2013/06/european-directors-win-majority-of.html</a> <br />
The Best Student award also went to a Filmakademie project called Rollin' Safari, all clips are online at: <a href="https://www.youtube.com/user/rollinsafari/videos">https://www.youtube.com/user/rollinsafari/videos</a>Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-39296853041014469732013-05-02T14:41:00.000-04:002014-01-10T08:57:51.791-05:00Maya wrap deformer tips<br />
<span style="font-size: large;">Attributes:</span><br />
<ul>
<li>After creating a wrap deformer the driver surface gets a dropoff and <b>smoothness</b> attribute. Usually the user can expect these attributes to be in the deformer ChannelBox/AttributeEditor. This has been changed for the wrap deformer for a case were there is one driver on multiple shapes, so the smoothness attribute gets connected to each wrap deformer. The smoothness only works with <b>Falloff Mode: Volume </b>and <b>Exclusive Bind: off</b>. As the name says it can help create smooth deformations. On the downside it moves unaffected neighbors of deformed vertices in the opposite direction, so that may be a reason not to use smoothness for some cases. </li>
<li>When enabled <b>Exclusive Bind</b> improves performance a lot, but may lead to bad deformation. Works especially well when driver and driven have a similar resolution. I used this setting a lot in the past.</li>
<li>I usually use <b>Falloff Mode: Surface </b>for smooth results, probably because my driver and driven object usually have a similar shape. The <b>smoothness </b>attribute requires Volume mode thou.</li>
<li><b>maxDistance</b> 0.0 disables maxDistance</li>
</ul>
<div>
<span style="font-size: large;">Use cases:</span></div>
<div>
<ul>
<li>Deform highres geometry with easier to rig/cloth-simulate low-res geometry.<b> For this case my tip is to output the lowres mesh into a separate mesh node and smooth/subdivide that and then use this highres version of the lowres mesh as wrap deformer driver on the actual highres mesh. </b>The result is surprisingly fast when using exclusive bind etc and allows for much better deformation than using the wrap deformer the normal way and trying to adjust the wrap deformer attributes, which can never work properly (it's a non-barycentric binding) and gets really slow. As with many deformers in Maya, they are not very functional, but they are fast, so when making these procedural deformations you can compensate for the lack of features.</li>
<li>When the driving mesh just has a skinCluster I prefer to copy the skinCluster and weights to the highres, because it calculates faster than a wrap deformer and you also have the option of tweaking the weights further.</li>
<li>Use as partial blendshape, to be able to work on local area and with those patches drive the final one-piece mesh. Edit membership has to be used to avoid double transformation. Not a user friendly workflow. Exclusive Bind can be used to greatly improve speed (if meshflow is similar).</li>
</ul>
</div>
<div>
<span style="font-size: large;">Example:</span></div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHDvBNbQjmZkzQWZGNxQpRgGM0xjV04vXNcUqkDGu59r7XF0bvdDG2nI8YYawKWTyRrWK8rR3EY4xZmCUdMyoo6VyTS3smXNhAgf3ObG6UE8vBpfgfn8l36URD26ucUnpW-VU5i9KRAHpI/s1600/wrap_smoothness.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHDvBNbQjmZkzQWZGNxQpRgGM0xjV04vXNcUqkDGu59r7XF0bvdDG2nI8YYawKWTyRrWK8rR3EY4xZmCUdMyoo6VyTS3smXNhAgf3ObG6UE8vBpfgfn8l36URD26ucUnpW-VU5i9KRAHpI/s1600/wrap_smoothness.jpg" /></a></div>
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHDvBNbQjmZkzQWZGNxQpRgGM0xjV04vXNcUqkDGu59r7XF0bvdDG2nI8YYawKWTyRrWK8rR3EY4xZmCUdMyoo6VyTS3smXNhAgf3ObG6UE8vBpfgfn8l36URD26ucUnpW-VU5i9KRAHpI/s1600/wrap_smoothness.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a></div>
Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-11943729531204648482013-04-23T17:37:00.000-04:002017-09-10T13:33:13.322-04:00Kool-Aid commercial: Rig breakdown<iframe allowfullscreen="" frameborder="0" height="281" mozallowfullscreen="" src="https://player.vimeo.com/video/64673387" webkitallowfullscreen="" width="500"></iframe><br />
<a href="https://vimeo.com/64673387">Kool-Aid commercial: Rig breakdown</a> from <a href="https://vimeo.com/pazrot">Parzival Roethlein</a> on <a href="https://vimeo.com/">Vimeo</a>.<br />
<br />
The complete spots:<br />
<a href="https://vimeo.com/64086798" target="_blank">https://vimeo.com/64086798</a><br />
<a href="https://vimeo.com/64086797" target="_blank">https://vimeo.com/64086797</a><br />
<br />
The node order of the face, starting with the low resolution geometry:<br />
-> blendShape<br />
-> skinCluster (for the mouth I put the joints on a curve with motion paths, to tweak the curve cvs without getting intersecting loops, see old post: <a href="https://pazrot3d.blogspot.com/2012/11/joint-chain-rigging-techniques.html" target="_blank">Joint chain rigging techniques</a>)<br />
-> bend deformer (To roughly match the body shape. Works for this range of motion, for more range I would recommend using a surface constraint / rivet on the nurbs surface and connect translation to UV values)<br />
[lowres for animators]<br />
-> smooth (subdivide)<br />
-> sculpt deformer (project on nurbs surface with the same shape as the glass)<br />
[highres, final shape]<br />
<br />
And the highres geometry was used as a mask in compositing.Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-2632666172699323572013-04-03T18:32:00.000-04:002013-06-12T18:23:46.601-04:00Adventure Time - A Glitch is a GlitchYesterday aired the Adventure Time episode "A Glitch is a Glitch" (AT S5E15 AGIAG).<br />
It was a special 3D episode (usually the show is 2D) and directed by David OReilly.<br />
The rigging was done by Mark Feller and me at Studio Soi in July 2012. My main responsibility were the faces and spines. The faces were made by hand, some parts I could import and adjust after the first one was done. The mouth joints were sliding on a nurbs surface, that had the shape of the face polygons. For the spines I wrote a script (ribbon based. See older post: <a href="http://pazrot3d.blogspot.com/2012/11/joint-chain-rigging-techniques.html">Joint chain rigging techniques</a>). <br />
<br />
This is a clip from the episode: <br />
<iframe allowfullscreen="" frameborder="0" height="270" src="//www.youtube.com/embed/3Uf0M9zgwuY" width="480"></iframe>Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-19716014525157729882013-03-01T18:08:00.000-05:002017-06-14T07:33:18.055-04:00Maya Naming Conventions<i>(updated on 2014-09-10)</i><b><br /></b><br />
<h2>
<b>Summary</b></h2>
<ul>
<li><b>L_arm_1_upper_joint > L_arm_2_lower_joint</b></li>
<li><b>Prefix = Region</b>: Side ("L_..." / "R_..." / none for center) + region ("...arm_", "spine_", ...)</li>
<li><b>Middle = Hierarchy</b> numbering starting at 1 (not 0) followed by descriptive string ("...1_upper...", "...2_lower...")</li>
<li><b>Suffix = Nodetype</b>: Default Maya nodenames ("..._blendColors", "..._multiplyDivide", ...) </li>
</ul>
<br />
<h2>
<b>Motivation</b></h2>
This is a simple naming convention that currently seems the most logical to me, after having used different ones of myself and coworkers in the past. The main goals are:<br />
<ol>
<li>Readability (from the name know what it is and where it is used. But not too long)</li>
<li>Simplicity (easy to learn, avoid confusion, hard to make mistakes, few exceptions)</li>
<li>Functionality (easy to work with: string search / filter)<b><br /></b></li>
</ol>
<br />
<h2>
<b>Prefix = Region ("L_arm_...", "spine_...")</b></h2>
If a region is in the center and/or only appears once start with it <b>"spine_...", "head_..."</b>. Else insert side shortcut before region <b>"L_...", "R_..."</b> ("<b>L_arm_</b>...", "<b>R_leg_</b>..."). Reasons:<br />
<ul>
<li>For regions that appear multiple times (L_arm, R_arm, ...) all related nodes will have unique names, just by adding the side prefix</li>
<li>Abbrevation to save reading time and space. If a name is too long for a Maya UI element (ChannelBox, graph editor, ...)
the name usually (always?) gets cut of at the right side. So having a
short prefix delays that. Opposed to using the more descriptive, but longer versions
"Left_"/"Right_" or "Lf_"/"Rt_".</li>
<li>This is a "special rule" (anti readability and simplicity), but it is such a simple one and used so frequently that is hard to use wrong or forget.</li>
</ul>
<br />
<h2>
<b>Middle = Hierarchy ("...1_upper...", "...2_lower...")</b></h2>
<ul>
<li>Start with number, counting in the cranial (spine) / distal (limbs, fingers) / lateral (clavicle) direction, to allow for alphabetic ordering, which can be useful in the paint skin weights tool for example. For most people it is more intuitive to start counting at 1. Opposed to
loop variables usually starting at 0 (Python: for x in range(..)).</li>
<li>Followed by a string description to understand where the element actually is (readability). This string could be standardized, but this post is about a simple naming convention. </li>
<li>Going <b>from general to detail</b> is easy to read and helps with isolating regions for string search / filter ("L_hand_2_index*"). </li>
<li>All this also helps to have unique transform node names. Which can have the same
name, if they are not in the same hierarchy level. Opposed to "pure" DG
(dependency graph) nodes (multiplyDivide, skinCluster,...).</li>
</ul>
Examples:<br />
L_arm_1_upper_... > L_arm_2_lower_... > L_arm_3_wrist_...<br />
L_hand_1_thumb_1_metacarpal_... > ...<br />
L_hand_2_index_1_metacarpal_... > L_hand_2_index_2_phalanxProximal_... > L_hand_2_index_3_phalanxIntermediate_... > L_hand_2_index_4_phalanxDistal_...<br />
<br />
<br />
<h2>
<b>Suffix = Nodetype ("..._multiplyDivide", "..._locator")</b></h2>
The nodetype is usually the suffix. Theoretical that should not be necessary, since command searching allows for a type filter (<i>pm.ls('L_arm*', type='joint')</i>). But when manually working in a scene it helps to read graphs / history and it also helps at having unique names.<br />
<br />
Usually it is also shortened to 2-3 letters, which I used to do as well (joint = jn/jnt, blendColors = bc, multiplyDivide = md). But after changing my "rules" over the years and using different ones at companies I suddenly wondered what the purpose of these abbrevations even is. Since they always introduce special rules, exceptions and may not even be readable from an outsider.<br />
<br />
So my conclusion was to just use the <b>full default Maya node names / types as suffix</b>:<br />
"..._blendColors", "..._multiplyDivide".<br />
In the beginning, when more nodes were created manually, it might have been more convenient to only type a few letters as suffix. But by now most are generated with scripts anyway. And even when working manually and following this rule the default Maya behavior will generate the suffix by default (minus the 1 at the end). <br />
But more importantly this rule creates unique, easy to learn, obvious suffixes for almost all nodes. There are a few exceptions, but even their solution are partly given from Maya. So they always make sense to Maya users.<br />
<br />
<b>Exceptions - from Maya:</b>
<br />
<ul>
<li><b>Default transforms </b>will get different names in Maya, depending on how they got created: null1 (empty group), group1 (group for transforms), transform1 (actual node name). Most people call default transforms (no shape / special function) groups, so I stick with <b>group </b>as well. To prevent hard to read suffixes when using <b>stacked groups</b> ("..._group_group_group") I like to use descriptive names ("..._null_group", "..._sdk_group", "..._space_group"). </li>
<li><b>Transforms with shapes</b> get names from the <b>shape nodeTypes</b> (locator1, annotation1, ...). So Maya already gave an answer how to name those transforms. Shapes themselves will get the Shape suffix.</li>
<li><b>Transform Handles </b>(deformer handles) get named: "nodetypeXHandle" in Maya. So I also use this convention, except for the number in between, so it's only "<b>deformertypeHandle</b>". Example: L_cheek_clusterHandle (cluster itself: L_cheek_cluster)</li>
<li>... (probably more)</li>
</ul>
<br />
<b>Exceptions - from user:</b><br />
<ul>
<li><b>Animation transforms</b>: Usually transforms are the only nodes animators are exposed to. That's why they often get named differently. For this convention I prefer<b> "_control"</b> over "_nurbsCurve".</li>
<li>... (probably more)</li>
</ul>
<br />
<h2>
<b>Code</b></h2>
<pre class="brush:js; class-name:'height_10px_class'" style="height: 400px; overflow: hidden;"># python examples
import pymel.core as pm
my_module = 'L_arm_'
my_joint = pm.createNode('joint')
# manual
my_joint.rename('{0}1_upper_{1}'.format(my_module, my_joint.type()))
# if you have a function to detect the suffix:
my_auto_suffix_rename(my_joint, name='{0}1_upper'.format(my_module))
# if you are in a rig module instance that detects the module:
self.my_auto_rename(my_joint, name='1_upper')
</pre>
<div>
<br /></div>
<div>
Notes: </div>
<div>
<ul>
<li>Maybe lowered prefix letter (Pro: Consistency, closer to PEP8 Python recommended variable names [lower_case_with_underscores]. Con: Lower L looks like capital i)</li>
<li>Maybe have a prefix for all areas for consistency ("C_" = center, ...)</li>
</ul>
</div>
Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0tag:blogger.com,1999:blog-2949078349597115361.post-65631830878139617322013-02-11T22:39:00.000-05:002018-07-13T11:33:10.104-04:00prHeatDeformer<i>update: fStretch is open source since 2015-03 </i><i><a href="http://www.cgaddict.com/">http://www.cgaddict.com/</a></i><br />
<i><br /></i>
<b></b>
<b>Description</b><br />
I recently finished a heat/tension based deformer / Maya-API plug-in. Depending on the amount of stretching and compression on the surface, vertices get deformed along the normal or with blendshapes. The most common application would be to blend in wrinkles on skin and clothing.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgssX2kkpQE2RILKm9GryElqQXdXjUu3RJ6C-_QRIRp0ezn7PWGlHgqc_-4RzrFXr8VokBOTXjNFW8ye32tfP2IOAdUnq4wiiK_YVNTK1RhqTBVl_KfZY7UwG9qnSweCAtGZbJI7lq7xBmT/s1600/prHeatDeformer_attributes.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgssX2kkpQE2RILKm9GryElqQXdXjUu3RJ6C-_QRIRp0ezn7PWGlHgqc_-4RzrFXr8VokBOTXjNFW8ye32tfP2IOAdUnq4wiiK_YVNTK1RhqTBVl_KfZY7UwG9qnSweCAtGZbJI7lq7xBmT/s400/prHeatDeformer_attributes.jpg" width="400" /></a></div>
<br />
<b>Motivation</b><br />
To have an extra tool to improve deformation for many different types of rigs. I was also personally interested in the subject, and I had some downtime between projects.<br />
<br />
<b>Video</b><br />
<iframe allowfullscreen="" frameborder="0" height="281" mozallowfullscreen="" src="https://player.vimeo.com/video/59459196" webkitallowfullscreen="" width="500"></iframe> <br />
<a href="http://vimeo.com/59459196">prHeatDeformer - deformer (custom node)</a> from <a href="http://vimeo.com/pazrot">Parzival Roethlein</a> on <a href="http://vimeo.com/">Vimeo</a>.<br />
<br />
<b>Breakdown</b><br />
<ul>
<li>I had not used the Maya API for over half a year, so I was a bit rusty at first.</li>
<li>I always had to take a break when there was a project I had to work on. Which is less efficient for me than continuously working on it, because it always takes a bit to get back into it.</li>
<li>The first two weeks were spent writing a complete Python API version. I implemented all features, but with little calculation optimization. I always like writing Python versions, because you do not have to compile, so the iterations are really fast. On the downside I have to use a lot of printing and complex debugging is actually more easy in C++ / Visual Studio, because you can set breakpoints and use "attach to process" for interactive debugging, which I used the first time on this plug-in. So in retrospect it definitely would have been faster to skip the Python version. But I got more experience with the Python API.</li>
<li>After the Python version was working (and terribly slow) I wrote the C++ version in one week. This was the hardest part, because I had to implement a lot of performance increasing stuff, so that the deformer does not slow down the rig as much. There will definitely be a geometry resolution switch for the animators, but I still want them to be able to see the heatdeformed highres mesh with decent speed and also when working with it as a rigger it is always better to have the deformer as fast as possible. To make the deform fully production ready it had to work with transforms that have any number of shapes and each shapes vertices can be inside or outside of the deformer membership. Combined with the speed improvements they were the most difficult things to get done. </li>
<li>I wrote a lot of common features for the first time (tangent space, smooth, grow, some of the speed optimizations). So that slowed me down. And will improve development time on future nodes.</li>
<li>The Python version has 800 lines, the C++ version 1400 lines (including header file, comments etc) </li>
</ul>
<b>Conclusion </b><br />
In retrospect I was surprised how quickly it was done. Especially if I had skipped the Python API implementation. Because it is one of the more technical and difficult tasks in rigging, it also feels quite rewarding when you get it done. <br />
<br />
<b>Todo</b><br />
Additional features and performance improvements<br />
<br />
<b>Related</b><br />
<ul>
<li>(2007) Siggraph 2007 presentation "Realtime wrinkles, Christopher Oat": This is the oldest reference I could find for this idea. The second half has "dynamic wrinkles" that are tension based.</li>
<li>(2008 or earlier) The Maya (Comet) muscle skinDeformer has a "wrinkle" option included to the "relax" feature. It moves vertices along the normal vector when being compressed. This feature is not usable, because there is only one global attribute to control the strength and one paintable map. So there is no limit and no way to control the acceleration etc. And the biggest problem is that the algorithm does only work properly on primitive geometry (sphere,..) because it is only considering neighbor vertices that have continuous numbering (or a random one, if there is no proper neighbor id). This is a bit hard to explain, but the result on a production mesh is that it calculates the compression differently on neighbor vertices (except if you scale everything from the same pivot), so you get spikes and have no real control over the shape.</li>
<li>(2010) fStretch: I think this is the most well known version of this technique. It is a commercial plug-in by Matthieu Fiorilli. It seems very sophisticated, but it is a commercial plug-in that costs money/effort and the license model is not so good for the place I work at.</li>
<li>(2012) tenshionBlendshape: Inside of the SOuP plug-ins, it does not have tangent space, which makes it unusable and I also did miss some other features and the base algorithm also had some problems with different sized geometries. I did send them the feedback thou, so maybe some day there will be a usable free version of this technique.</li>
</ul>
Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com4tag:blogger.com,1999:blog-2949078349597115361.post-4607252671160724072013-01-30T22:26:00.000-05:002014-09-10T11:36:15.066-04:00Fish rig - Beck's Sapphire The last project I worked on at Psyop. I was responsible for the rigging.<i> </i><br />
<i>Update: HD version </i>
<br />
<iframe src="//player.vimeo.com/video/59246733" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="http://vimeo.com/59246733">Beck's Sapphire "Serenade"</a> from <a href="http://vimeo.com/psyop">Psyop</a> on <a href="https://vimeo.com">Vimeo</a>.</p>Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com1tag:blogger.com,1999:blog-2949078349597115361.post-2865155244565616572012-12-25T20:38:00.000-05:002017-08-12T13:55:02.650-04:00prAttractNodeI never made an extra blog post for my prAttractNode. So since I just uploaded an update and also made a better demo video with more useful work examples (Read Vimeo description for explanation), I think it is a good time.<br />
<br />
The plug-in is open source (download link in Vimeo description), so the following Maya API parts might be useful to others:<br />
- How/Where to properly initialize a ramp attribute<br />
- How to setup everything in a single .py/.mll file, for easy installation<br />
- (C++) OpenMP usage (Extra blogpost: <a href="https://pazrot3d.blogspot.com/2012/01/openmp-and-maya-api.html">https://pazrot3d.blogspot.com/2012/01/openmp-and-maya-api.html</a> )<br />
<iframe allowfullscreen="allowfullscreen" frameborder="0" height="281" mozallowfullscreen="mozallowfullscreen" src="https://player.vimeo.com/video/20002149" webkitallowfullscreen="webkitallowfullscreen" width="500"></iframe> <br />
<a href="https://vimeo.com/20002149">prAttractNode - deformer (custom node)</a> from <a href="https://vimeo.com/pazrot">Parzival Roethlein</a> on <a href="https://vimeo.com/">Vimeo</a>.Parzival Roethleinhttp://www.blogger.com/profile/05120581267362844966noreply@blogger.com0