How to create a parented null on each object selected

Issues concerning rigging & Face Robot...
User avatar
probiner
Posts: 127
Joined: 17 Apr 2013, 11:52

Re: How to create a parented null on each object selected

Post by probiner » 27 Dec 2013, 02:36

This was by request of the animator. He was tired of being too dependent on shapes. So he asked for skin controls and lattices on top of everything. I think/hope he won't be confused but happy. I'm following AnimSchool's Malcom Softimage Rig. He has a particularity I couldn't replicate a shape on the final head that copies the base, had a CopyOp applied to it... For now I'll do it with ICE or Clone, but found it interesting.

Just to sum up my findings for anyone that might be come across this:

1 - Apply to the face duplicate this ICE compound on the Shape construction to follow the base face rig.
2 - Create Nulls Constrained to Clusters with this script. Then use EtRenamer, put them somewhere on the hierarchy and Group for organization.
3 - Create OffsetNulls with this script and Group.
4 - OffsetNulls' Parents' KineGlobal to OffsetNulls' Static_KineState. Several Options: A) Select the Constrained Nulls with branch selection, "Select Child Nodes" and use this script. B) Modified version of the script where you just have to select the OffsetNulls. C) Use this script to apply apply this ICE Compound. Or

Stephen's script to open a file dialog and apply a compound is great even for single use. It applies it in the determined construction mode and uses pick sessions. Going to make a shortcut for it :)

Now I can focus more on results and less on setup. Thanks again missingkey.

Cheers
Last edited by probiner on 29 Dec 2013, 07:07, edited 3 times in total.

User avatar
probiner
Posts: 127
Joined: 17 Apr 2013, 11:52

Re: How to create a parented null on each object selected

Post by probiner » 27 Dec 2013, 16:49

I see what you mean now about being distracting, so I'm making them really small and hidden on playback. Pity wireframe opacity doesn't work on wireframe item..
Also seems to take a performance hit. Need to know the specifics of control needed before going kawabanga on extra controls :D (64 by now, not hard to go "null-happy"). Don't know if having ICE to animate the KineState instead of an expression helps too (keep having this error for Steve's script)
Hidden content: [ Show ]
# ERROR : Traceback (most recent call last):
# File "<Script Block >", line 28, in <module>
# setupStaticState()
# File "<Script Block >", line 14, in setupStaticState
# defKineState = a.Properties("Static_KineState")
# AttributeError: 'NoneType' object has no attribute 'Properties'
# - [line 14]
Cheers

missingkey
Posts: 91
Joined: 19 Dec 2012, 18:16

Re: How to create a parented null on each object selected

Post by missingkey » 27 Dec 2013, 18:30

lol, 64 detailers seems a bit much for just the face. I would try to look at where/why they setup face mocap markers where they do, and go from there. You need to allow your animator to simulate the muscular contractions, stretching, and subtle nuances in the face as easy as possible. Having to animate 20 extra controls to get a cheek shaped the way you want, is not usually ideal or preferred IMO.

The idea is to use less shapes, and less joint defomers symbiotically, to make for a really good, really simple, articulate face rig. The joints alleviate the need for dozens and dozens of extra shapes for all those nuances. But the shapes give you the art directable look for posing, and ease of use rigging.

btw, in your error. "a" is not being set correctly. That's why it can't find "Properties".

User avatar
probiner
Posts: 127
Joined: 17 Apr 2013, 11:52

Re: How to create a parented null on each object selected

Post by probiner » 29 Dec 2013, 07:16

Thanks for the guidelines. I'm sure when he gets back from holidays vacations he'll rant his feedback at me :D And then I'll have a better notion on where these are needed.

As for the script error, it was my fault for not selecting the constrained and then the offset nulls before running it. Updated the recipe post with that info.
Makes more sense to me to select the Offset nulls (child) since the hierarchy can change in between. I looked here in the sdk and wasn't that helpfull, since apparently I can't use those commands straight up. But when I pressed Shift+Alt+Up I was able to get the construct from the console to select the parents:

Code: Select all

app = Application
app.SelectNeighborObj(app.Selection, 0, "NODE", True)
Makes the scripts more stack-able in a One-click version. Only thing missing is setting the group and apply the display options. But I'm probably investing too much time by now on automation side, which is fine enough, and not on the results side :P

Cheers

missingkey
Posts: 91
Joined: 19 Dec 2012, 18:16

Re: How to create a parented null on each object selected

Post by missingkey » 29 Dec 2013, 21:26

investing a little time in automation is always good.

I'm still a little unclear on what your trying to achieve now. But nonetheless, Here's a slightly modified version of what I wrote to show how to set parameters on the offset nulls.

Code: Select all


si = Application
sel = si.Selection
log = si.LogMessage

zeroTfm = XSIMath.CreateTransform()
curModel = si.SIGetModel( sel[0] )
priIcon = 4
offSetCol = ( 0.25, 0.50, 0.75 )

selList = []
for each in sel:

    offNull = each.AddNull( each.Name + "_Offset" )
    offNull.Kinematics.Local.Transform = zeroTfm
    offNull.ActivePrimitive.Parameters( "primary_icon" ).Value = priIcon

    disProp = offNull.AddProperty( "Display Property" )
    disProp.Parameters( "wirecolorr" ).Value = offSetCol[0]
    disProp.Parameters( "wirecolorg" ).Value = offSetCol[1]
    disProp.Parameters( "wirecolorb" ).Value = offSetCol[2]

    selList.append( offNull )
    
si.CreateGroup( "offSetGrp", selList, curModel )
si.SelectObj( selList )

There's probably a dozen way to do it, but this was quick. It should be fairly readable.

User avatar
mattmos
Posts: 445
Joined: 02 Dec 2009, 16:59

Re: How to create a parented null on each object selected

Post by mattmos » 31 Dec 2013, 00:23

Interesting thread! Have you thought about using locations to constrain the nulls rather than the traditional methods? Its fairly re-usable once you have the compounds built - ie use a standard set of nulls to define a set of locations on the mesh, then another compound to read those and set the global kine of the parent nulls. Also you can keep it live while testing and freeze the location data once you're happy with the placement.

missingkey
Posts: 91
Joined: 19 Dec 2012, 18:16

Re: How to create a parented null on each object selected

Post by missingkey » 31 Dec 2013, 02:29

Hey Matt, are you talking about just using ICE to drive the parent nulls, offsets, and static kine?

I have a face rig that more or less does just that I think. Although, I don't think I have setup what your talking about.

Would you mind providing a sample scene? I'd love to dig through what you mentioning.

User avatar
mattmos
Posts: 445
Joined: 02 Dec 2009, 16:59

Re: How to create a parented null on each object selected

Post by mattmos » 31 Dec 2013, 03:43

I've been trying to automate as much as I can just building re-usable compounds (my python sucks!) so this is more of an import model/apply compound workflow. But using ice to to the deforms, instead of an envelope/kinestate thing. You can sometimes get some overlapping deformation, but I've found it works ok generally and means I don't have to paint too much (just some weightmaps to mask influence).

I've got a cut down test I can show, should give you an idea of the setup. I keep meaning to bash out a full face rig to share but finding the time atm is a struggle...

Under the icetree null the setup_icetree should be frozen before animating. Rest of it should be ok. And apologies for the messy shapes icetrees, trying out different approaches!

https://app.box.com/s/dxpe8tij42yk6ojc3h2d

User avatar
probiner
Posts: 127
Joined: 17 Apr 2013, 11:52

Re: How to create a parented null on each object selected

Post by probiner » 07 Jan 2014, 01:23

I had this thread subscribed, but unfortunately lavabit.com was brought down and I haven't updated my si-comm account settings.

@missingkey
Thanks again, not only the script is set to go, it's also quite clear so I was able to pick up bits of commands and procedures. :)

@mattmos
Great! I had thought of this at some point too since my python is not that great either. But I didn't understanding how was I going to constrain the nulls to the mesh at a particular frame 0.
There's a lot of small things on that model of yours to explore, learn and re-use. Thanks

Cheers

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests