TechArt

Python Workshop

Anyone with an interest in CG who wants to develop their technical skills further!? 

Well we have recently launched our latest workshop focusing primarily on Python Programing.

Head over to Puppeteer Lounge website for more info!

Procedures in General

What exactly is a procedure? How to declare a procedure? What does a local and global procedure means? How can we return values from a procedure and use it some where else!

Below are the links to useful links dealing on these subject matter. Check it out!

Source :  procedures in MEL!

procedures in MEL:

declaring a procedure – use the “proc” keyword

     proc myProc( ) {
          statements_to_execute;
     }

If you execute this in the script editor, it will look like nothing happens.
However, the procedure “myProc” will have been declared and ready for execution
whenever you call the procedure:

     myProc( );
or
     myProc;

Passing values to a procedure:

     proc myProc( int $count, float $size ) {
          for ($i = 1; $i <= $count; $i++ )
               sphere -r $size;
          }
     }

In the above example, you now need to give the procedure the necessary inputs:

    myProc( 5, 3.5 );
or
    myProc 5 3.5;

Procedures that return a value (the MSMA book calls this a function):

Put a data type for the returned value after the “proc” keyword.
You must then include the “return” command somewhere in the procedure.

     proc float myProc( float $input ) {
          float $squared = $input * $input;
          return $squared;
     }

If you call this procedure, you can get back the result:

float $squaredResult = myProc( 6 );

LOCAL vs GLOBAL:

Declaring a global procedure – just use the “global” keyword:

     global proc myProc( ) {
          statements_to_execute;
     }

By default, a procedure is “local”.
A local procedure can only be called from within the script in which it exists.

A global procedure can be called using the command line or by any other script, expression,
or script node during the maya session.

Often, a script will have one global procedure (perhaps the one that sets up a GUI or
takes input from the command line). The remaining procedures in the script handle tasks
after the global procedure has been called, for purpose of organization and structured
programming.

Sometimes a set of scripts are  incorporated to create a sophisticated “tool set” (perhaps
after creating a new shelf tab with a number of custom shelf buttons, etc.). In cases like
this, there may be global procedures that are shared by multiple scripts, avoiding repetition
and ensuring continuity.

External Script Files:

A procedure needs to be global for maya to find it in the external script paths, without
the need to first use the “source” command or menu option.

If you create a new script file and save it in your script path(s), use the command “rehash”
for maya to re-scan the files so that it can find the new procedures.

Link : How to return multiple values in procedure?

Naga game animation

Check out this interesting serpentine setup and animation. Cool stuff!

The animator could have animated the upper half of the body hand keyed and the lower half procedurally driven.

One of my student, Mr. Jimmy Gunawan shared this video to me. He stated Often if character have costume or accessories or other props, the rig gets more interesting.” which is true =)


Maya custom node : sin calculation by Marco

Marco’s first attempt on creating a successful Maya plugin “node” using c++ and maya API. I have a feeling that this guy is going to pump out some really cool tools sooner or later ๐Ÿ˜‰

“Hi everyone i have just created  this maya custom node through c++ and maya API ,
A good developper might say it s not so hard to do and it s totally true but โ€ฆ. that s the first step for starting getting better and better as technical rigger . With this node i m starting gatting n understand of maya API . No need to say first attempt months ago was a fail , but now the first step is done!
Feel free to ask any question!”

 Check it out!

SRB ~ pupPetEEr ToOls

Hello folks,

Here is a little technical demo of my custom rigging tools aka SRB ~ pupPetEEr ToOls!

Enjoy ๐Ÿ˜€

Understanding Animatable Pivot

Really useful and informative post by Maulik about understanding and creating an animated pivot system. He guides you through the logic and maths behind creating this system.

Basically if you ever tried creating an animated pivot control, you will notice that once the object has been rotated and it’s rotatePivot point has been shifted and repositioned; once the  object get translated we see some weird transformation. These unwanted transformation can be fixed by calculating the offset values in the rotatePivotTranslate matrix.

To give you a better idea on this please take a look at this little tutorial post ๐Ÿ™‚

Also, Maulik has been working on this offset solution to create a real time animated pivot which you can find in his blog. Below is the link … and a big thanks to Maulik ๐Ÿ™‚


Making Animatable Pivot