Categories
softimage tutorials

Tip: Dynamic jaw pivot trick

Here’s a trick of meddling with the StaticKineState property to allow deforming and adjusting the position of a deformer at the same time:


I worked this out myself but I’m told Bradley Gabe thought of it first, so kudos to him. 😉

Categories
softimage

Softimage: Align center using faces, without scripting …LIKE A BOSS.

Did you know you can do this? 😉
How to orient an object's center without scripting

BREAKDOWN:
1. Set an OK center position with "Move Center to Bounding Box" / "Move Center to Vertices".
2. Enter "Center" mode. (top right)
3. Right-click on "Ref" button (below Local) and choose "Pick Polygon/Edge/Point Reference".
Click an object to select it and highlight the desired components.
4. While still in both "Center" and "Ref" modes, reset rotation to 0,0,0 then go back to "Object" mode (top right), go "Local" mode and reset rotation to 0,0,0 again. — That’s it!
ps: The faces need not be in the same object. (It could be another’s!)

Categories
softimage

Beveling vertices of an icosahedron

Beveling and/or extruding vertices of an Icosahedron primitive can get you some pretty cool patterns:

Categories
scripting softimage

XSI SDK: Picking forever with Python YIELD

What’s the smart way to pick any arbitrary number of items with XSI’s PickElement or PickObject commands? Read below… 😀

si = Application

def pickForever(**kwargs):
    '''
    Pick forever, and ever, and ever, and ever...
    until you rightclick.
    '''

    # Default options
    leftMessage = kwargs.setdefault('leftMsg', 'Pick something')
    middleMessage = kwargs.setdefault('middleMsg', leftMessage)
    selFilter = kwargs.setdefault('selFilter', 'object')

    # Loop and yield forever until complete:
    while 1:
        out = si.PickElement(selFilter, leftMessage, middleMessage)
        obj = out("PickedElement")
        buttonPressed = out("ButtonPressed")
        modifier = out("ModifierPressed")

        if obj:
            yield obj, buttonPressed, modifier
        else:
            break


# _______________________________________
# USAGE EXAMPLES:

def processIndividually():
    '''
    Deal with each pick, one object at a time...
    '''
    for obj, button, modifier in pickForever(leftMsg='Pick Object', selFilter='polygonmesh'):
        button = ['left','middle'][button-1]
        # (-1 because 0 means right, but is never returned.)
        si.LogMessage( "Picked %s with your %s mouse button!" % (obj.FullName, button) )


def listExample():
    '''
    Getting a list of picked objects, only after picking is complete...
    '''
    pickedObjects = zip(*list( pickForever(leftMsg='Pick Object') ))[0]
    si.LogMessage( pickedObjects )


# Cool, eh? :)
Categories
scripting softimage

Python: Naming Objects for Numerophobes 101

You can call me a numerophobe when naming rig objects, but the reason I personally avoid numbers in my rigging naming conventions (99% of the time) is so that when I duplicate something, a number at the end won’t increase by itself because there isn’t one. (The issue can be circumvented by having numbers somewhere before the end, but I’m the kind of weirdo that prefers to go with letters altogether.)

We humans work numbers in what’s known as the “Numeral system“, also known as the “base 10” system (as we have that many fingers…) but hold on… the alphabet has 26 letters, not 10, so what do we call that system? It has a name: it’s the Hexavigesimal (or “base 26”) system.

As the ever-so-handy Wikipedia denotes,

Any number may be converted to base-26 by repeatedly dividing the number by 26.

Pretty easy stuff for Python.

This is how I’d do it:

Categories
softimage tutorials

Softimage: ICE String to Particles trick

[I shared this on the Softimage Mailing List the other day and thought it was worth posting here.]

Here’s a fun trick for parsing an ICE string attribute, identifying the letters and typing out the text with particles:
ICE string to particles
Download the sample scene here and read more about it below. (Soft 2011+ required.)

Categories
softimage tutorials

Softimage: Symmetrical Shape Splitting with ICE

I propose a way of using ICE to split symmetrical shape halves. Here it is in action:
My
(Download here and read more about it below.)

Categories
tutorials

Benchmarking your Python experiments

Which is the fastest way to do this or that? Why not try them all and benchmark! 🙂

All you need to do is lock at the time.clock()

Categories
softimage

Softimage: Undocumented TEMP Folder that cleans up after itself

Environment variables are no secret and neither is the system-set “TEMP” variable, but what is not really mentioned in the SDK Docs is that Softimage overrides the TEMP and TMP environment variables with a temporary folder made by XSI:

LogMessage( XSIUtils.Environment("TEMP") );

If I run that (JavaScript) I get something like: C:\Users\Alan\AppData\Local\Temp\XSI_Temp_15076

Categories
softimage

Softimage: RefModel Deltas’ Hygiene in Production

I used to think refmodels were buggy, annoying and out to get me. After some exploration, they exhibit a couple patterns of fixable issues. Let’s bring them to light, shall we?

Here’s some of my observations with them in the context of artists animating a referenced rig in production: