Substance Painter
In this start to finish texturing project within Substance Painter we cover all the techniques you need to texture the robot character.
# 1 05-10-2011 , 10:48 AM
Senior Animator - Sumo Digital
Join Date: Sep 2011
Location: UK
Posts: 59

The best way?

Am I right in thinking the best way to select a node via a script would be to select it via a unique attribute name? As opposed to using an explicit name? Thereby avoiding the issue of the node being renamed and the script being broken?

Is this the best code to do that?

Code:
select -r `ls -o "*.insertAttrNameHere"`;

# 2 06-10-2011 , 11:54 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
It all depends. In what context?


Imagination is more important than knowledge.
# 3 07-10-2011 , 08:26 AM
Senior Animator - Sumo Digital
Join Date: Sep 2011
Location: UK
Posts: 59
hmm ... ok.
I'm writing/written some scripts that do my ik fk matching. Potentially the names of the controllers might change. For example, an animator on my team, for reasons unknown, might decide to change the name of the controller, which would mean if I used the explicit name of the controller in my script, the script would fail to work, as it would no longer be able to find the exact object I had specified. Or, they might import the rig into a new file, which would also change the name.

So, given that, I have added a unique attribute name to each of the controllers, and used the above code to select them. This *seems* to work fine, I was just wondering if it's the best way to do the job?

# 4 07-10-2011 , 01:03 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
It is a way.

Usually if you're working with a team, you'd want to use referencing. This will help get rid of animators blowing stuff away, I also believe it won't let you change the names of objects. The best practice though is to tell your animators not to change the names user added image


Imagination is more important than knowledge.
# 5 07-10-2011 , 03:05 PM
Senior Animator - Sumo Digital
Join Date: Sep 2011
Location: UK
Posts: 59
Yes. Fine advice. Although having been involved in teams of people for many years now, I've learnt that people, generally do things you don't want them to. So, I'm trying to allow for as many possible scenarios as I can. Far better than having to work out what's gone wrong when an individual does something they shouldn't. It happens, I've seen it many, many times.
Without having a MEL expert on the team I'm attempting to solve these issues myself.

Well ... thanks for your time.

# 6 07-10-2011 , 06:40 PM
mastone's Avatar
Maniacal boy king of Babylon
Join Date: Aug 2005
Location: the netherlands
Posts: 1,605

The best practice though is to tell your animators not to change the names user added image

As long this doesn't give the same effect as when you say: "don't look down" user added image

# 7 07-10-2011 , 08:21 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
Just have a big message that says "Changing control names may or may not invert all keyframe tangents." Should do it. user added image

# 8 07-10-2011 , 08:34 PM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287
Actually the best practice is to actually communicate with the animator and ask what they want in the rig and give them it- then hide everything else they dont need until they ask -usually the case....

J

# 9 08-10-2011 , 08:56 PM
Senior Animator - Sumo Digital
Join Date: Sep 2011
Location: UK
Posts: 59
Team management suggestions aside, I'm sure they're all well founded, is there anyone who can offer any advice about the MEL I'm using?

# 10 08-10-2011 , 09:45 PM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287
I'll be straight, I had similar issues when I set up a modelling pipeline recently for my guys, you wanna get shit streamlined so everyone is on the same page, anything 'illegal' should be deemed as screwing the pipeline up. You are the Lead animator after all so its really for you to decide what is best, remember the tail doesnt wag the dog.

Anyway lecture aside, if I understand you correctly, if something is specific in its name for example: your controls may all have a name like Curve_01, Curve_02 etc your animator may have renamed it Curve_Arm. The Name to look for is Curve and the most simple way to select the attribute is with the 'select by name' in the status line input field at the top of the screen (long black bar after the render icons) just type 'Curve*' this will select the names of those objects With Curve in the name. I could be barking up the wrong tree for you but its a way. It may be worth echoing your commands to see how it looks in Mel - might be of use

If you had a character for example called Nextdesign for example and you wanted to select his nodes you could just type:

select $Nextdesign_nodes;

This is of course referring to the entire array of nodes in that character. Is this what you are after??

Also you can change names on a reference file but it will only apply to that particular scene it wont have a knock on effect down the line.

ta
Jay

# 11 09-10-2011 , 09:57 PM
Senior Animator - Sumo Digital
Join Date: Sep 2011
Location: UK
Posts: 59
Hey Jay. I really appreciate you having taken the time to respond, as I do everyone who has posted on here. I know how precious your time is and any one taking the time to offer help and advice is to be commended and encouraged, without people like yourselves forums like these would just dwindle and die.
However, I'm not sure you completely understand what I'm trying to achieve, and I've no doubt that it is entirely my own fault for not explaining the issue correctly.

At the centre of this issue is a script I've written that does conditional tests on the selected object, it tests to see if either the left or right shoulder control is selected, given that one of them is, it then tests to see if it set to IK or FK, given it it is set to one of these, it then executes other scripts I've written to match FK to IK and IK to FK.

During the tests it needs to check the name of the selected object. Currently I'm doing that by checking the name of an unique attribute I added to each of the controllers. All I was wanting to find out was ... Given that the selected object could be called anything, is testing for a unique attribute name, the best way. user added image

To be honest I think I've dragged this thread out far to long, and I should really just let my team field test the rig until something goes POP!

Once again, thank you for the time you spent reading my ramblings, and apologies to anyone whose time they may feel has been wasted.

# 12 09-10-2011 , 10:39 PM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287
No time wasted so dont worry. If anyone knows anything on here they will answer you or point you in the right direction - Nextdesign is pretty good with his mel, and David who runs Simply Maya certainly knows his stuff.

Right now I see, it is clearer. Then my answer is yes to check for the unique name, providing they are named individually, which assuming they are.

My mel skills only go so far, but I understand what you want to do.

cheers
Jay

# 13 10-10-2011 , 12:49 AM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988

If you had a character for example called Nextdesign for example and you wanted to select his nodes you could just type:

select $Nextdesign_nodes;

I would appreciate if you'd keep your hands off my nodes mate user added image

I think I remember seeing something in a presentation from Bungie on the subject. It's an interesting solution to the rigging problem, through something called "Semantic Traversal."

See here: https://downloads.bungie.net/presenta...ralRigging.zip

EDIT: Alright, just came up with an idea. One thing you could do, is create a tagging system. For example, create an enum attribute on each control, and add all the tags to it. For example (lArm, rArm, hips, head, neck, etc) Then, all you need to do is go through each character rig, and check for the given tag. This also means if you change any part of the rig, you can easily change the tag. Nothing is set in stone. You can even create a UI to map the labels into a graphical control selector. Many things can be done with it. The unique identifier that you mentioned could cause problems as it means that you'll need to have documentation on the expected names. Working with multiple riggers, the errors involved will inevitably increase.

Let me know what you think.


Imagination is more important than knowledge.

Last edited by NextDesign; 10-10-2011 at 01:06 AM.
# 14 10-10-2011 , 09:02 AM
Jay's Avatar
Lead Modeler - Framestore
Join Date: Feb 2003
Location: UK
Posts: 6,287
Referee!!!

Tagging sounds like a great way to do it. I think we did something similar for our car rigs....

_J

# 15 10-10-2011 , 09:33 AM
Senior Animator - Sumo Digital
Join Date: Sep 2011
Location: UK
Posts: 59
Yeah that sounds sweet. I will have to do some more digging to see how to achieve that, but thanks for the lead ... sounds like a great idea.

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off