PDA

View Full Version : is there tutorials about how to make autorig using python or mel?


drawone
05-11-2010, 08:56 PM
Hello,
i am not really good at rigging and scripting but just trying make an autorig for a project that i am working on and learn more about them. I have been watching some tutorials about rigging and scripting, and i was wondering if there is any tutorial that can give me some ideas or concepts of how to make an autorig. Is there any dvd or books about it?


thanks

Darksuit
05-11-2010, 09:32 PM
first thing I would honestly tell you is learn to do at least the basics for Rigging. You will need to understand that much to begin to write an auto rig script.

There are some auto rig scripts already out there. But if you are wanting to just write a script so that you don't have to deal with it, you might want to go take a look at the stuff that is already out there.

For instance if you go to Highend 3D you can look up Advanced Skeleton, which seems to be one of the forum favorites at the moment. There are others, I'd just encourage you to play around with some and see what you like and don't like.

In the end learning the process and knowing it will only help you out in the long run.

blackseraphim
05-12-2010, 04:11 AM
learn first how to rig to know the steps/procedures you needed in your program. Your auto rig will depend on the rig you are trying to achieve. without the knowledge of rigging, it will be hard to know which comes first.

tonytouch
05-12-2010, 09:59 AM
2 Book_Tips:
"cgToolkit Volume 1"
"MEL Scripting A Character Rig In Maya"

2 DVD_Tip:
3DBuzz - Mastering Maya: Developing Modular Rigging Systems with Python
Quadruped Animation Friendly Rigging: Procedural Rigging ( part3 of the quadruped-series )
--------
for the 3dbuzz-DVD , in order to follow ... i think you will need some basic/intermediate python and rigging knowledge .

Polimeno
05-12-2010, 03:50 PM
what about 3Dbuzz :

http://www.3dbuzz.com/xcart/product.php?productid=83
http://www.3dbuzz.com/vbforum/content.php?154

those seems pretty usefull.
Iīm going to buy them next month.

tonytouch
05-12-2010, 04:03 PM
hi polimeno,

the 3D-Buzz-DVD is indeed very interesting . i bought mine , about 3 weeks ago .... right now , i finished about 50% of the course - and i am getting more and more used to python .

the modular-approach is very good inspiration ! and any rigger / scripter who is not familiar with python yet , can learn a lot from it !

cheers

Polimeno
05-12-2010, 04:22 PM
hi polimeno,

the 3D-Buzz-DVD is indeed very interesting . i bought mine , about 3 weeks ago .... right now , i finished about 50% of the course - and i am getting more and more used to python .

the modular-approach is very good inspiration ! and any rigger / scripter who is not familiar with python yet , can learn a lot from it !

cheers

nice to hear that Simon !
i was looking for this course and saw the 'sneak-peak' while ago in the site, but didnīt find any plausible thoughts/reviews about it until yours.

thanks again

drawone
05-12-2010, 07:38 PM
awesome!
i am an character animator and i know how to rig a character, but not like character TD does.
Now i know where or how to start this process.

thank you so much :)

Dustin
05-14-2010, 04:25 AM
It's also a good idea to keep an eye on your script editor. Once you learn how to rig, you can do something in Maya's UI and then see what sorts of things the script editor spits out. Even at this point, becoming familiar with what Maya is doing under the hood can be a great help.

woadiestyol
05-14-2010, 06:49 AM
I started tackling an autorigger about 6 months ago...it was the first time I'd done a full-blow scripted rig, so I can probably share a couple tidbits I picked up.

First, as others have mentioned, you need to know exactly what you're trying to accomplish in a script before you start writing code. That being said, you don't necessarily need to know how you're going to rig the fingers to start scripting out a rig for the spine. Don't think of an autorig as one big script - but rather, a lot of independent pieces. If you can make the pieces work independently of each other, you'll end up with a more robust 'complete' autorig in the end.

Rigging in general is like that - you start thinking of things in terms of individual components and layers, and you blackbox those components so that you just hook them into other components via constraints, parenting, etc. That being said, you really need to know exactly what you're trying to accomplish with a component before trying to script the setup.

I would recommend starting by building the actual skeleton of a character by hand, then trying to write a function to, say, rig the arm. This is how I started with my rig - I never actually planned to develop a fully procedural rig, I just got sick of rigging an IK/FK switching arm, so I scripted the whole arm. I first rigged the arm by hand, and while I was doing it I wrote some pseudocode in a text editor and wrote down thoughts I had about it while I was proceeding. So I'd start by doing this:

def rigArm(shoulderJoint, elbowJoint, wristJoint):
"""Rig a character's arm."
#okay, I think I need the script to know what the actual bound joints are,
#so I'll make them arguments for the script

#duplicate the shoulder-to-wrist chain twice - once for the IK arm, once for the FK arm
#create 3 nurbs curves that will be controls for the FK arm
#rename the curves

At this point I realize that to rename stuff, I probably want to know the name of the character and the side of the arm I'm rigging. I could maybe try to query them from the joints I'm passing as arguments, but that might not work if I haven't been super-careful to name the joints in a precise way from the get-go. Okay, so maybe I should include those things as arguments too...

def rigArm(shoulderJoint, elbowJoint, wristJoint, side, characterName):
...

So that was sort of the process I went through at first. When I first read other people's rigging scripts I was super intimidated because I thought "Wow, look at all that stuff that they anticipated! How will I ever write something that elegant?" The truth is, it starts off pretty ugly. As you get more experience coding, you start to understand some of the things to look out for and you recognize patterns more quickly - and you need to revise things a lot less. But expect to go back and make lots of revisions. Make it quick and dirty at first, and clean it up later.

At some point (hopefully very quickly) you'll realize there are procedures you repeat a lot. So it's time to make a new MEL or Python script that's just full of 'utility' modules. Snapping one object to another, duplicating a chain of joints, creating a certain type of nurbs curve, etc. My "utils.py" script is the longest one out of all my modules.

That first rig component script can take a while...but you'll end up developing a ton of those utilities that you can re-use later in other scripts, so they'll go faster.

My biggest mistake I made was trying to 'do it all' in one long procedure. That becomes a nightmare to debug. So let me step back and make sure I'm clear when I say to write a function that 'rigs the arm' - that function will end up calling lots of other functions that take care of the details. Maybe it's even best to start by writing a script that takes three duplicate joint chains and a control and sets up the blending between them, since you'll use that in a bunch of places.

Whew, sorry for the long-winded post. I've gotten a lot of help from folks around here, so I hope this is more helpful than confusing! Just remember - at first, it can be pretty difficult and frustrating, but you will get better if you stick with it. Good luck!

drawone
05-21-2010, 04:00 PM
hey guys,
thank you so much about the tip
all the comments you gave me are truly inspirational

thanks again
:)

woadiestyol
05-26-2010, 08:20 AM
Hey Simon - have you finished watching the 3D buzz videos? Did you find them useful?

I'm looking to get better at utilizing an object-oriented design in my scripts. Just wondering how you found those videos to be in that regard. I'm looking for more theory on how to utilize classes more intelligently in something like an autorigger, so I'm curious to what extent that sort of info was covered.

Cheers,

JP

tonytouch
05-26-2010, 12:41 PM
hi woadiestyol,

creating classes , scriptdirectories , and how to call on the different functions from within any of the subModules - is explained during the entire_course .

---------------
i got about 50 % of the course finished by now , and it already opened up my eyes in some areas.
---------------

When it comes to "creating a modular rigging_tool" - this DVD is really inspiring , as Steve ( the main-author of the course ) is working a lot with containers and namespaces during the DVD . For me , this is quite new , as i never used containers up to now - and during the entire DVD you can see this great example - "how to code your own autorigger" .

each module has ( in most cases ) "just" basic-functionality ( e.g. simple stretchy-arms ) , but this can be improved by yourself lateron , if you like to and if you want more than that . If you worked through all the lessons and understood them , it will be quite easy , to create your own modules .the entire outline of the tool , is "very impressive" .

you should not expect any "new rigging techniques" !!!

it is focused on "programming Tools and (dynamic) interfaces" in order to put together flexible rigs ( combining several modules into one character ) but also shows , about creating (dynamic) animation_interfaces for characters .

- i think it is BEST for people who already have scripting-experience
- it is even GREAT for professionals , who want to catch the spirit of "new generation rigging" as all this python-stuff , using namespaces , containers , scriptJobs , dynamicInterfaces - is ( in my eyes ) very up-to-date
- but it is also SUPER for beginners ( those should "concentrate" and follow each step very precisely , in order to re-produce ( programm ) every single step )

------------------------
finally , I want to say , that it is "very important" , to "really take the time" and go through all the 50 hours of lessons , if you really want to scripts to be working in the end ( which btw. might take you between 80 - 150 hours of work to get everything working as it is supposed to be , as Steve is explaining everything very fast . so you need to pause the videos every one or two or three minutes in order to complete and compare the code you wrote , with the source-code in the video-lessons )

it sounds a little bit stupid ,

but in order to complete the course you need to start at lesson 1 and work through until the end . and try to prevent any sort of spelling-mistakes , you certainly are going to make , when typing in all the code . this DVD really takes a lot of attention from a student - but it is really worth every penny .





----------
just my personal opinion :)

woadiestyol
05-26-2010, 03:43 PM
That sounds great! Thanks for the detailed description - It sounds right up my alley, since I've already written a complete auto-rigger but I want to improve the implementation. Looks like that will be my next purchase :D

tonytouch
05-26-2010, 05:37 PM
for me , it was the reason , why i purchased a copy .

i coded my first autorigger about 5 yrs ago . and then 3 yrs ago improved it - but since then , nothing happened and i always wanted to start on something new - thinking about using python - as there are so many reasons , to use python , and not mel . i already learned a bit of python , during the past 2 yrs , and right now - i am not really scripting in Mel anymore . and building up something modular was also in my mind .

so the dvd came just out right in time for me ( right after finishing a 15minutes animated-short )

the DVD is for me a very good practise , to get into the python-gear once again - but i personally will do some things slightly different in my own rigging-scripts , but there are so many small "tips" ( python-related ) and also it is great to be using "dynamic_UIs" in the future .

one thing about the DVD :
you should use maya2009 or maya2010 !!! there are some problems , that occur in maya2011 ( which can be troubleshooted ... but while you are working through the lessons , i guess , someone might be confused , if something would not work as expected ( e.g. there are some XPM_icon_problems in maya2011 ) ) so better stick with 2009 or 2010 - in order to "dig" through the lessons :)

gauranga108
06-04-2010, 02:02 AM
I watched the 3dbuzz demo video and got quite excited about building my own autorig.

I wish it was for 2011 because there are some super great tools in 2011 for rigging.

How hard do you think it would be for unexperienced scripter to work around the 2011 differences?

I've been rigging for 3 years now.

tonytouch
06-04-2010, 11:33 AM
i just started to continue the lessons yesterday ( as i had a bunch of work to do in the meanwhile ) . i am about at "half-time" right now

and in the meanwhile i got it running in maya2011 without any problems - it is just some tiny changes , one needs to do in the scripts in order to get it behave well in maya2011 .

just check out the 3dbuzz-forum , to find out , which lines of code to change - i think it is just about 2 or 3 mini-changes one needs to do

--- if you know rigging and scripting for 3 yrs , you wont have any problems with it - i guess

gauranga108
06-04-2010, 08:16 PM
That's great to hear!

I think I'll buy it.

Thanks

gauranga108
06-04-2010, 08:44 PM
I bought it.

Can I watch it now via streaming?

tonytouch
06-04-2010, 09:50 PM
lol , that was fast ... when i purchased the lessons myself about 6 weeks ago ... it took until the next business-day , until i could see the streaming videos ( maybe you have bad luck , starting this weekend - because today is/was a friday ) - i guess it usually takes one to 4 days , or so - to be able to see the streaming-lessons .

@edit:
as i remember , you might need to have 2 accounts on the 3dbuzz-site , because i think they have different logins , for the shop and the forum --- once you are registered in the forum , you can watch the lessons - as soon , as any of the 3dbuzz-admins give you the rights to access them . ( i guess this might be monday or tuesday )

gauranga108
06-04-2010, 11:44 PM
haha yeah. These lessons are just what I needed at this point. I'm looking for a more efficient solution to rigging and this seems to be a well thought out system.

I'm going to be starting these lessons as soon as possible.

You have an suggestion of pre-lesson work I can do to prepared for these lessons? I've done very little coding in maya and no coding anywhere else.

thanks a lot mate!

woadiestyol
06-05-2010, 12:44 AM
Do you know Python? The intro video I watched made it very clear that it was NOT an intro to Python. If you don't know it already (or want to learn it better), I highly recommend Dive Into Python. It's free and online at http://www.diveintopython.org

gauranga108
06-05-2010, 05:22 AM
Don't think of an autorig as one big script - but rather, a lot of independent pieces. If you can make the pieces work independently of each other, you'll end up with a more robust 'complete' autorig in the end.

I appreciate your post about your experience getting started with building your autorig.

I'm reading dive into python now.

The most coding I'm done is in the expression editor. I think they go through the scripting line for line in the videos. So it's a bit of paint by numbers lesson plan which is great. I like learning this way with a goal to do something like build a auto rig app in maya and having some guidance step by step. Then I think I'll be able to start branching off and making my own modules for skin weights and face set up . . . I hope . . .

gauranga108
06-05-2010, 05:25 AM
lol , that was fast ... when i purchased the lessons myself about 6 weeks ago ... it took until the next business-day , until i could see the streaming videos ( maybe you have bad luck , starting this weekend - because today is/was a friday ) - i guess it usually takes one to 4 days , or so - to be able to see the streaming-lessons .

@edit:
as i remember , you might need to have 2 accounts on the 3dbuzz-site , because i think they have different logins , for the shop and the forum --- once you are registered in the forum , you can watch the lessons - as soon , as any of the 3dbuzz-admins give you the rights to access them . ( i guess this might be monday or tuesday )

Do they send you an email letting you know you can access the streaming version?

Or do you just have to keep trying?

tonytouch
06-05-2010, 08:21 AM
i cant remember ... i think , they did not send me a mail . i would say , within the next one or two business days ...

woadiestyol
06-05-2010, 09:17 AM
Cool...definitely let me know how it goes for you. I think if you can understand just the first chapter or two of Dive Into Python, it sounds like you can probably pick the rest up by watching the videos I know I learn best by example too, so it seems like a solid plan. Good luck!

CGTalk Moderation
06-05-2010, 09:17 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.