Tuesday, 29 October 2019

Maya Sine Node

Ever wanted a sine node, but realised maya doesn't have one, so you have to use an expression?
Well.. turns out Maya does have one after all!

Karolis Galkus posts this great tip on using the eulerToQuat node to drive sin and cos here:


Thanks to Chris Lesage @ https://rigmarolestudio.com/rigging-spherical-eyes/ for making me aware of this.


And while we're on the topic of sine, I always refer to this page (and have done for years) when trying to visualise sine and am in need of reminder of the algorithm:
https://www.asc.ohio-state.edu/price.566/courses/694/Sin_fun.htm

But all you really need to know is: sin(time * frequencyMultiplier) * amplitude) + offset;

Tuesday, 10 September 2019

Convert MEL to Python

Still converting MEL to python the oldschool way by deleting semi-colon here, adding a bracket there?

Pffffttt just use this!



import pymel.tools.mel2py as mel2py

print mel2py.mel2pyStr("""spaceLocator -p 0 0 0;""")


Output:


spaceLocator(p=(0, 0, 0))



Remember to add a cmds. to the start, because for some reason it doesn't add it on for you!

Now you can just replace 'spaceLocator -p 0 0 0;'  with any other MEL code that the script editor may spit out whilst you're Maya'ing and BAM insta-python!

Sure, it doesn't work for all cases but for other cases where you just want to copy & paste a handy addAttr line and can't be bothered to google it, it can come in handy and help speed things along.

Wednesday, 7 August 2019

Free Soft IK plugin - ToolChefs

A handy new plugin that handles all of the math of the main functions you'd want on an IK limb.

The best thing about this, is that it can be easily swapped out with the conventional IK-solvers on any old rig, as it appears as a drop-down in the IK handle node. Not only that, but the source code is available on github. Sweet.

Some of the in-built attributes are:

  • Soft Distance: Distance to translate the IK before the 'softness' kicks in.
  • Activate Stretch: Activates the stretch! (Makes things stretchy)
  • Mid Joint Slide: Slides the mid joint between the start and end joints.
  • Mid Joint Lock: Allows the user to translate all joints.



Read all about it, and download it here:
https://www.toolchefs.com/?portfolio=soft-ik-solver

Thanks Tool Chefs!



Wednesday, 31 July 2019

Bifrost for Maya

Bifrost for Maya has finally arrived! Complete with an arsenal of nodes, Bifrost will allow you to create a visual programming (nodal-based) approach at building deformers, FX, rig functionality and much much more. Whilst this isn't a completely new methodology to the 3d scene - it is for Maya. It will certainly be interesting to see how it compares to the likes of Houdini.



Check out the announcement video here: https://youtu.be/qZKoDrw_EBA

My gut says that whilst this will provide a powerful new approach for creating FX with Maya, it will not be enough to rival the brute force that Houdini allows the user with its point-based approach, but i'll reserve judgement until I give it a go.

Highlights:

  • Ready-to-Use Graphs—Artists can quickly create state-of-the-art effects that meet today’s quality demands.
  • One Graph—In a single visual programming graph, users can combine nodes ranging from math operations to simulations.
  • Realistic Previews—Artists can see exactly how effects will look after lighting and rendering right in the Arnold Viewport in Maya.
  • Detailed Smoke, Fire and Explosions—New physically-based solvers for aerodynamics and combustion make it easy to create natural-looking fire effects.
  • The Material Point Method—The new MPM solver helps artists tackle realistic granular, cloth and fiber simulations.
  • High-Performance Particle System—A new particle system crafted entirely using visual programming adds power and scalability to particle workflows in Maya.
  • Artistic Effects with Volumes—Bifrost comes loaded with nodes that help artists convert between meshes, points and volumes to create artistic effects. 
  • Flexible Instancing—High-performance, rendering-friendly instancing empowers users to create enormous complexity in their scenes.
  • Detailed Hair, Fur and Fuzz—Artists can now model things consisting of multiple fibers (or strands) procedurally.

 Any version 2018 onwards will be compatible with this new plugin.

Here are some tutorials to get you started:
Bifrost Basics: Part 1
Bifrost Basics: Part 2
Bifrost Basics: Part 3
Make Custom Peak/Push Deformer

All kinds of shennanigans!


Tuesday, 30 July 2019

Casadeur - Physics Based Animation Software

I have been following this swanky new piece of physics-based animation software over the past few months called 'Cadadeur'. Not sure if any of y'all have seen it yet, but it seems to have some really impressive looking tools within the software itself.

Check out this machine learning pose helper:
https://www.youtube.com/watch?time_continue=64&v=Hu88WW7JzqI&ab_channel=Cascadeur

Or this auto-velocity/center of mass tool:
https://www.youtube.com/watch?v=hl1-J45vOJw

Neat!

But how much is it?
Nothing! At least not at the moment, you can download beta test it here: https://cascadeur.com/

Monday, 24 June 2019

Better Boolean Topology in Maya!

Aah booleans.. if only they were actually useful and didn't create horrendous topology that you can't really work with. I mean, there's always zRemesh in Zbrush but.. that's a whole lotta exporting and importing and opening another software and yadda yadda yadda.

So in Maya 2019, Autodesk have implemented two brand new shiny MEL commands!

polyRemesh;  - Takes disgusting topology and converts it slightly less disgusting triangles!
polyRetopo; - Takes slightly less disgusting triangulated topology, and turns it into beautiful quads!

Downsides:
Only works in Maya 2019 onwards
Only works in Windows (needs confirmation)...  (sorry VFX industry)

For more info, take a look at this video:
https://www.youtube.com/watch?v=sRkNIUBmLS4&ab_channel=PlayCreative


Happy booleaning!

Monday, 20 May 2019

Maya's new combinationShape node

Check out this great post explaining how to use Maya's new combinationShape node. This node is useful for an array of things, including driving blendShape targets in a facial rig & creating a min/max function.

https://rigmarolestudio.com/min-and-max-nodes-in-maya/amp/?__twitter_impression=true

Tuesday, 19 March 2019

Love letter to Python Classes

So, after about 5 years into python I started to understand and use classes a lot at DNEG. There were a few things that I never understood about classes,and subsequentially went through the 9 stages of coding class-denial:
  • Shock: In what situation/context would I use them?!
  • Denial: Why not just have a lovely file full of lovely methods/functions instead? I don't need them!
  • Anger: Guh! Another class! Why do I need this complicated nonsense that I don't understand!
  • Bargaining: Maybe if I use enough well-written efficient methods, i'll never need classes!
  • Depression: Urgh.. guess i'll have to learn to use classes someday...
  • Testing: This didn't work.. this didn't work.. hmm intriguing..
  • Acceptance: Everything is an object. Everything is a class. They're beautiful.
 On-queue nerd out.



Yes, believe it or not, after years of trying to avoid them, I finally love classes.
The thing about a class is that I've never understood all of its true values that it brings to a piece of code.
The perspective it brings helps you to think about your code truly as an object.




The first thing people tell you with such confidence is that a class is an 'object', and in your head you're sitting there thinking "okaay..."

"Think of it like a T-rex" they say, "where it has variables like 'tail' and arm_length'."


Aaand you'll still be none-the-wiser, because whilst you now know that variables can belong to a 'class', you don't know how to apply this abstract word called 'class' to your code, how they help you or when/where/how to use them.

Someone else may mention "They help you to organise your code." Which - in parts - is very true, but it still does not help you to understand when to actually implement them in your code.

The thing about coding is that it needs to be clear to read and easy to understand. The vast majority of your code that you write will either be read by someone else, or future you who has completely forgotten what it was that you wrote. So, it needs to be: Clear, Fast & Easy to read.

If you have never used dictionaries - you should. I would highly recommend to learn them before learning classes, because they'll only take you 5 mins to learn and will help you understand classes quicker and easier.

In python, a dictionary's syntax is this:

my_dict = {key : value}

The key can be anything, from a string called 'pinapple', to the float 725.23
The value can be anything, from the integer 3 to the string 'delicious'.


my_dict = {"shangrila": 17}
Anything, really.

The important concept here though, is that one value is linked with another, 'soul-bonded' if you will.



cheese_shop = { "cheddar_in_stock": 7, "wenslydale_in_stock":3}
print cheese_shop["cheddar_in_stock"]
returns: 7

This is similar to using zip( ) with two lists, except that it's much nicer to read it by using a dictionary in lots of cases like this. Damn ain't that swell?

Now, wouldn't it be nice if we didn't have to write our variable:

cheese_shop["cheddar_in_stock"]
with square brackets and quotation marks? I mean we are lazy after all and want to write less for more.. right?

Wouldn't it be nice if we could instead write:

cheese_shop.cheddar_in_stock

"Aah, no brackets! No nasty quotation marks" I heard you cry! Yes, that's right ladies and gentlemen, a whole 4 characters of you typing less thanks to classes.

It's kind of like a dictionary, in that it links two variables together. But it's like a beautiful swiss-army knife dictionary, because instead of the 'variable' you want to refer to being a string in square-brackets:

cheese_shop["cheddar_in_stock"]
it's actually a variable:

cheese_shop.cheddar_in_stock


 A.) Isn't it waay nicer to read:
       cheese_shop.cheddar_in_stock    than    cheese_shop["cheddar_in_stock"]
B.) ITS A VARIABLE!
C.) INHERITANCE!
D.) I'M GOING TO BED NOW AND WILL CONTINUE SOON!