Planet Tech Art
Last update: September 20, 2014 05:00 AM
September 19, 2014

The Player's Handbook

In keeping with the other career articles I've been reposting, here's a favorite old piece from Game Developer about career arcs in games.   The illustrations are from the absolutely priceless Old School FRP Tumblr, which is a treasure trove of 1980's era RPG artwork that any gamer ought to check out. Know your history!





Congratulations!  By purchasing The Games Industry™you’ve entered a universe of fantastic adventure! Players in The Games Industry™ collaborate to create exciting new worlds, a form of collaborative story-telling that combines the ancient arts of the bards with the most up-to-date developments in rules complexity, arcane technicalities, and perverse randomness.  Hopefully, your new purchase will keep you occupied for many years – growing in power, battling monsters, and accumulating treasure. You are guaranteed many a sleepless night in the company of your fellow players. Welcome!



The first step for new players in The Games Industry™ is to create a character. In The Games Industry,™  your character represents you – he or she forms your alter ego.  Some players choose a character exactly like themselves, while others prefer to play a very different role in The Games Industry™  than they do in real life. Whichever path you choose, be aware that picking a character is of the utmost importance to your career in The Games Industry™.   Other players and the many monsters you encounter in the game will react to you based on which character you play  -- or which one they believe you are playing. Be sure to choose one that works well with your instincts and goals. It’s critical to be aware of the strengths and limitations of the different types of characters you encounter if you want to succeed in the game.

New players create a character by choosing from one of several archetypes. The choice of archetype, in turn helps drive certain career paths. For example, a player who wants specialize in Game Design might choose to begin his career as an Obsessive Nintendo Fanboy – a choice which would make it difficult to, for example, meet members of the opposite sex but which gives him great advantages in areas like the pharmacological uses of mushrooms or reminiscing endlessly about Goldeneye.   

To show you how the choice of archetype can affect your career, we’ll take a look at some of the options available to the player who wants to pursue a career in the arts. In The Games Industry,™ artistic characters  have a variety of magical powers which can be used to amaze and enchant players, monsters, and reviewers. Although an artist character can come from any race, gender, or ethnic background , they tend to conform to one of the following archetypical character design patterns:

The Perfectionist


Perfectionistsare a subclass of artists devoted, first and foremost, to the pursuit of their craft. In the game you will often find them toiling away in the wee hours on details which are all but invisible to the average passerby.  Though each pixel or polygon seems to be pure overkill, the cumulative effect is one of tremendous magical power. The creations of a true Perfectionist compel the most cynical monsters – even hardened Producers and inscrutable Marketroids -- to admiration and awe.



Bonuses 

Dedication.Perfectionists gain +5 for all rolls against artistic skill thanks to their selfless devotion to craft.  To gain this bonuses, they practice obsessively –even when not being paid. For example, you’ll find them thronging the halls of your local art school with greasy sheaves of charcoal drawings tucked under their arms, or worshipfully studying at the feet of the local Animation Mentor.  Perfectionists earn double XP for works in traditional media.

Mystic Charm.  At higher levels, the true Perfectionist can hypnotize members of other classes, such as Programmers, into stunned admiration.  This power works better when the Perfectionist cultivates an otherworldly air and acts as if every decision were an inspiration from on high instead of a deliberate choice.

When the Mystic Charm is active the Perfectionist can operate with enormous creative freedom. However if the power is negated (by a Programmer using the Graphics Budget power, for example) the Perfectionist may find themselves is tricky spot.  It’s also important to remember that other artists are partially immune to this power, and they’ll be quick to complain if it’s overused.


Weaknesses

Speed.  The heavy armor of dedication which most Perfectionists wear tends to reduce their agility.  Without careful attention, the Perfectionist can easily slide past the point of diminishing returns into an endless cycle of revisions and tweaks that are invisible to others.   Players nearing a milestone must roll a 12 or higher to break the cycle, or suffer 1D6 worth of delays.

Agility. The single minded focus which gives the Perfectionist power can also lead to tunnel-vision.  Unless carefully played, Perfectionists can endanger themselves by ignoring promising new spells , potions, and magic items later in the game.  Perfectionist players must cope with a -2 adjustment for learning  new technologies and techniques. if you’re playing as a Perfectionist, be sure to guard against this weakness with careful attention to new techniques as well as old standbys. 


Strategy:

Playing a Perfectionist is a difficult game. The dedication which defines this class can get in the way of mundane tasks like scheduling and budgeting, so Perfectionists often find it hard to learn management as leads. Perfectionists can thrive when they are recognized for their talents either as specialized craftspeople or creative visionaries. If parties where the route to power runs through spreadsheets and meetings, Perfectionists are often unhappy. Perfectionist players need to plan ahead with their colleagues to build a secure and rewarding creative niche.

The Tinkerer

Where the Perfectionist character pursues the most exalted forms of art, the Tinkerer archetype enjoys mixing the nitty-gritty of technology with the solemnities of aesthetics. What the Perfectionist hopes to achieve by sheer dedication and relentless practice, the Tinkerer strives to accomplish by mastering every trick and tool the game allows.   Tinkerers are a hybrid class, which shares some of the characteristics of both the Artist and the Programmer. This can make for a powerful combination in the hand of a skilled player – or an awkward compromise if played unwisely.



Bonuses

Inventiveness. Tinkerers refuse to accept the status quo. No underused engine feature, no obscure corner of an art package, is too esoteric for the Tinkerer to play with. Tinkerers gain extensive bonuses for any situation where a recalcitrant game engine or art tool needs to be manhandled into a job it wasn’t intended for – for example, if your party is trying to simulate cloth using only skeletal animations, you’ll need a Tinkerer on hand.

Buffing. Tinkerers are extremely valuable to the other members of their party when they learn to share the fruits of their curiosity.  They give nearby Artists a +1 to Productivity by sharing their technical knowledge.  They can also perform spells ranging from simple charms like Bobo’s Magical ScriptSpot to advanced magicks like home-brewed level editors.


Weaknesses

Hypnotism. Like monkeys and some kinds of birds, Tinkerers are easily fascinated by shiny new toys. When confronted with a new piece of technology, a Tinkerer must roll a saving through against Focus or lose 1-20 hours of productivity to fiddling around.

Split Loyalties. As Tinkerers grow in level, it becomes harder for them to maintain their dual identities. Above level 10 the benefits of specializing either on the “artistic” or “technical” sides of the archetype become much clearer. If you’re planning a Tinkerer character, you should think several steps ahead to be sure you end up playing the role your really want – otherwise you may end up as a “Jack of All Trades, Master of None.”  Above level 10 Tinkerers must make a saving roll against Charisma or risk turning into Programmers once and for all.

Strategy

Because the Tinkerer is a support class, it's important to make sure you don't get sucked in to doing only the work that other characters won't do. Getting stuck in a rut can lead to a career of virtual serfdom, grinding XP at monotonous and unrewarding tasks.

Effective tinkering requires a long term commitment to learning and experimentation: mastering new skills is what makes this class tick.  Seek out every scroll, grimoire and tome you can to learn the spells which will help you escape this hideous fate.

The Footsoldier

The stalwart Footsoldiercan’t always generate the glamour of the Perfectionist or the wizardry of the Tinkerer. Nevertheless this archetype is the backbone of almost every party.  No victories can be won without their phenomenal powers of endurance and will to win.  Don’t make the mistake of defining the Footsoldiers in your group by negatives – they may not be aesthetic or technical superstars, but it is their steadfast dedication to getting things done that turns the tide of many a dire battle. Where the other archetypes define themselves by their skills, Footsldiers regard discipline as the highest virtue: give them a mission and they’ll see it through, on time and on spec.


Bonuses:

Endurance. Footsoldiers start with a bonus of +6 to Endurance.  As hardened veterans, they excel at pacing themselves – they know when to put in that midnight effort and when to save themselves for tomorrows struggles.  Players, however, should beware of party leaders who use this bonus as an excuse for skimping on support – a Footsoldier may be willing to put in tedious hours of repetitive work to help the team, but that’s no excuse for not providing the magic items that would make handle the gruntwork and let them focus on the more artistic tasks they love.

Leadership. The experience that Footsoldiers accumulate on the front lines gives them important leadership bonuses as they rise in level.  Ruthless commitment to finishing the job means that it’s often the Footsoldiers who are tapped for commanding roles later in the game – other classes count on the Footsoldiers to keep Tinkerers and Perfectionists focused on the enemy, and train new recruits in the hard ways of discipline.  Footsoldiers gain +1 on rolls for promotions for every two levels they earn.

Weaknesses

The Footsoldier archetype is well balanced. Lacking some of the flashy powers sported by other characters, they lack many of their weaknesses as well.  Apart from a small -1 deduction from Charisma, the Footsoldier is well defended on all sides.

Strategy

The biggest risk that Footsoldier players run is that of being under-appreciated. Although they are the indispensible vanguard of any artistic clan, they are sometimes slighted when it’s time to pass out the booty. Magic items, like the +5 Killer Portfolioor Schlieffer’s Amazing Rig tend to wind up with the more attention-grabbing members of the party – the loyal Footsoldiers who do so much of the actual work are sometimes forgotten.  Footsoldier players need to be able to remind their leaders exactly how much value they bring to the party and to establish reputations as the indispensible, reliable pillars of the team if they want to compete with their flashier brerthren.

The most recent edition of the Games Industry™  ruleset introduces another important challenges for the Footsoldier. With the new Games Industry: Foreign Lands  expansion pack, many teams have tried to replace their Footsoldiers with non-player characters (NPCs) in order to keep more of the treasure and XP for themselves.  If you’re playing a Footsoldier you’ll need to find roles to play that are safe from NPCs.  You can’t always count on loyalty from your leaders in The Games Industry™ so you need to look out for yourself.  You’ll never be as cheap as an NPC, so your best defense is to concentrate on making yourself more valuable to your teammates instead.



This may seem like a lot of rules for a simple game, but this complexity simply reflects the many play styles you’ll encounter in The Games Industry™   Once you’ve entered the rich fantasy life of The Games Industry™ you’ll find it hard to go back to real life.

Particularly in the six months or so before shipping.

Disclaimer: New players should note this set does not include everything you need to play. You’ll also need the following: A copy of Photoshop, proof of citizenship or an H-1 B visa, the Employees Handbook (2d edition rules), Red Bull Energy Drink, a free Nvidia T-shirt, and internet access.  The Games Industry™ features an ever-expanding  list of accessories and expansion kits.  See your local game store for details.

by Steve Theodore (noreply@blogger.com) at September 19, 2014 05:25 AM


September 18, 2014

Keeping talented employees

I saw a tweet the other day about the eight things that keep talented employees:

I’m normally not a fan of reducing human behavior to a list like this, but it seems pretty complete, and the words resonated.

As a technical leader I am a fan of metrics and dashboards: tests passing, code coverage, static analysis and metrics, velocity, bugs, takt time, and other indicators that you wouldn’t focus on individually, but are very useful collectively.

I wonder if, as a manager, assuming trust is in place, is it worthwhile to go over these things explicitly? To make a “private dashboard” to cover in 1-on-1s, and see where the problems are?

  • If everyone is not feeling challenged, why is that? Is it because the work is boring? If so, why? Is it temporary grunt work that can be augmented with some side projects? Or is the product becoming less exciting to work on?
  • Who doesn’t feel like they’re on a mission? Is it because they are disillusioned, or is the mission bullshit. Are more people disillusioned each month?
  • Which individuals are trending up and down? Is the organization as a whole trending up or down? Which attributes are trending up and down? For all these questions, you must answer “why“!

I’m not sure this is something I will start using immediately, since I am just getting to know my team and I don’t want overly formal process to get in the way of a human connection. But it’s certainly something I would have done at CCP. It’s very convenient for bad managers to rationalize poor ratings, but perhaps some tracking on these eight points can be a start towards providing quantitative evidence of employee satisfaction.

by Rob Galanakis at September 18, 2014 09:40 AM


September 16, 2014

September 15, 2014

October Course Announcements from Rigging Dojo: Maya API C++ Plugin development

Maya API C++ Plugin development from Rigging Dojo We’ve had many requests for this, so we are buzzing with excitement over our newest course “Maya API c++ plugin development” with Marco …

The post October Course Announcements from Rigging Dojo: Maya API C++ Plugin development appeared first on Rigging Dojo.

by Rigging Dojo at September 15, 2014 07:27 PM


Two weeks is the worst sprint length

Mike Cohn over at Mountain Goat Software says this in My Primary Criticism of Scrum:

In today’s version of Scrum, many teams have become overly obsessed with being able to say they finished everything they thought they would. This leads those teams to start with the safe approach. Many teams never try any wild ideas that could lead to truly innovative solutions.

I believe a great deal of this is the result of the move to shorter sprints, with two weeks being the norm these days. Shorter sprints leave less time to recover if a promising but risky initial approach fails to pan out.

Most teams I have joined have been working in two week sprints, and it has always seemed like the wrong length. In fact, at CCP, I championed “anything but two weeks.” I saw teams unable to get features done and tested in two weeks, which caused teams to not take the “shippable increment” idea very seriously. Nearly every sprint was a failed sprint in one way or another.

My preferred solution was to move to one week sprints. I’ve written about one week sprints before. If Agile is all about feedback, then halving your sprint length gives you double the feedback and chances to improve. You can try something out for a week, find it doesn’t work, and move on without putting a release at risk. A sprint twice as long carries twice the risk. I feel this, more than longer sprints, much better addresses Mike’s goal to get back to creativity. That said, it requires an intense commitment from the team to adopt Agile and eXtreme Programming development practices, such as through automated testing, shared code ownership, and more. It also requires a team that can function and perform well, and someone to coach. Without these things, one week sprints will fail.

My backup solution, when I feel a team isn’t yet ready to go through the transformation one-week sprints bring about, is to move to longer sprints. This does not encourage the behavior I ultimately want to see, but at least it allows more experimentation. More importantly, teams can take the “shippable increment” ideal seriously.

This reasoning can be taken to absurdity, but avoid it. I once had someone seriously suggest two releases a year was too often, and we should go down to one release a year, so we could make sure it was high quality and bug free. These people just need a reminder of the history of software (and often their own company). Even stuff like printer firmware can be iterated on less than 4 weeks.

In the end, I still prefer one week sprints, which isn’t surprising as I’m an XP advocate. But if a team isn’t able or willing to move to one week sprints, don’t default to two weeks.

by Rob Galanakis at September 15, 2014 05:29 PM


September 14, 2014

Tangent Spine


Combining the best out of FK and IK spine rigs and adding even more. IK/FK spines are allow much control over the torso but are tedious to animate. A lot of layered controls on top of each other can require some counter rotating and produce gimble issues. With this setup the animator can rotate from various points on the spine. Similar to FK but FK requires the user to distribute the rotation across multiple controls if fluid shapes are required. And they always are.
On my setup most of the posing is handled with the rotation of the two main controls and can be further refined using the tangent controls and the translation of the main controls.
Advanced volume preservation controls plus the IK like behavior that can be achieved with this setup are great for stylized animations.

See it in action:


Tangent Spine Rig from Armin Halac on Vimeo.

by Armin Halac (noreply@blogger.com) at September 14, 2014 02:42 PM


September 11, 2014

MaxPlus (3dsMax Python) equivalence test issue

Two Python objects that wrap the same Max Node, should be considered equal, but not identical.

Following this “==” and “in” should successfully test for equality of two or more Python objects that wrap the same 3dsMax Node.
However “is” should fail, as this checks if two Python objects are the same, not equivalent.

In MaxPlus for 3dsMax 2014 Extension, this is unfortunately not the behavior your get (2015 and forward seems to addresses that). Something to be aware of, or you might think you have Gremlins in your code.

This means you have to find some way to check for equivalence yourself (In Max we obviously cannot rely on naming). I’ve monkey patched INode, with the following code, but a solution that handles all wrapped Max nodes would be preferable. Let me know if you have suggesting for how to do that (I’m a Max & MaxPlus noob).


import MaxPlus

def __eq__(self, other):
--try:
----if self.GetHandle() == other.GetHandle():
------return True
----return False
--except:
----return False

MaxPlus.INode.__eq__ = __eq__

Hashing is also “broken”. If you want to be able to use INodes as dictionary keys you might want to implement __hash__ as well:


def __hash__(self): return self.GetHandle()

MaxPlus.INode.__hash__ = __hash__

According to this http://stackoverflow.com/questions/327311/how-are-pythons-built-in-dictionaries-implemented dictionary key insertion and retrieval is based upon Hash; then Equivalence, so should be good.

All in all a nasty hack to a somewhat nasty Python implementation. You could of course simply do equality by comparing Object Handles and also use these as dictionary keys, but what’s the fun in that? :-)

by sune at September 11, 2014 10:53 AM


Japanese vs. Western models of decision making

I was reading a book about The Toyota Way last year (sorry, can’t remember which) and something that stuck with me was a section on Japanese versus Western decision making*. The diagram was something like this:

japanese-vs-western-decisionmaking

The crux of it is, Japanese companies like Toyota spend more time preparing for a decision, and less time executing. Western companies reach a decision earlier, and then execution has all sorts of problems. It’s also important to note that Japanese companies often reach the “end goal” sooner.

Preparation involves building consensus, but that doesn’t mean it’s all talk. Japanese companies pioneered set based design and prototyping, which allows them to try out a huge number of ideas cheaply. By the time a decision is made, they’ve “thrown out” about 90% of the work they’ve done!** However, once the decision is made the execution goes smoothly.

It is easy to see how Japanese decision making maps to businesses with a clear distinction between preparation/pre-production and execution/production, such as traditional manufacturing. It can be difficult to map to pure product development. Keep a few things in mind.

  • Consensus isn’t just discussion and design. Big-Design-Up-Front is not preparing for execution. BDUF is a woefully incomplete form of execution. Building consensus means actually implementing things in order to rapidly learn.
  • Consensus isn’t a democracy. Toyota has a very hierarchical structure and people have very clear responsibilities. The goal of consensus-based decisions is to make better decisions, not to achieve some Platonic ideal. Difficult decisions are still made, but the role of the executive is to manage the consensus-building process, rather than “just hurry up and making a decision.”
  • The Japanese model is built in to cross-functional teams. Consensus isn’t achieved by the heads of Engineering and QA signing some agreement in blood. If that agreement ends up not being a good idea- and it almost never is!- you end up with the Western execution experience. On the other hand, cross-functional teams have much more interactivity and iteration going on, and overall execution is much faster.

    People will get upset. Take responsibility for your decisions, and acknowledge some people will get upset by them. However by making sure their concerns are thoroughly heard and discussed before execution, you will make sure they don’t keep pulling things off-track.

    Anyway, there’s lots of good writing on this topic, and I highly suggest checking some of it out if it interests you. This is just my software development-centric take.


    * I’m just calling these the Western and Japanese models of decision making. They are clearly not the way all decisions are reached in the respective countries. In fact these generalizations may not even be true anymore. Whether Japanese or American companies behave this way is irrelevant. The names are just proxies for different types of decision making.

    ** Obviously the work isn’t thrown out, since they’ve learned so much from it. But if the effort were raw materials, I suspect 90% of it would end up in the trash, depending on how a set is developed and culled.

    by Rob Galanakis at September 11, 2014 09:48 AM


    September 10, 2014

    Lost Animation - part?? 3 ??





    So this stupid bloody bug is still showing up in Maya, animation reloading in T-pose, all the animCurves still in the scene but Maya failing to reconnect the data on file load.

    We've debugged this so many times in the last 10years I've lost count and yet it still pops up. So I've added more in-depth support for the fix methods in the Red9 Studio Pack.

    There's now a new UI that opens up, this has 2 base methods.

    Method 1: You're running character sets and referencing, Maya has failed to connect the data up BUT left the animCurves connected to the ReferenceNode.

    Method 2: Maya has had a full blown fuck fest and left you with no hint to what data goes where. This method uses the names of the selected objects, and their animatable channels, then looks for all animCurves that may match.

    Two flags, StripNamespaces.... does just that, removes the namespaces of the node before doing the curve match (curves are usually in root namespace). StripMergedLayerData, allows for the additional 'Merged_Layer_inputB' naming that animLayers use.

    Hopefully that'll save somebodies life, I've had so many emails over these fixes over the last few years it's ridiculous

    thanks

    Mark

    by Mark Jackson (noreply@blogger.com) at September 10, 2014 03:48 PM


    Notes on python testing

    Hi guys,

    I've been rediscovering unit testing in python lately and wanted to share some notes about this, I hope you find them useful.

    There we go!

    Why use an unit testing framework?

    One word: Convenience

    You can always run your tests manually, but the harder to run tests, the less likely you run them.

    A piece of advice: be lazy, automate all the things! or even better: pick an existing framework and stick with it.

    Nose

    Nose is a testing framework for python, it's not included in the standard library but that's ok for me (otherwise look for unittest).

    Why nose over unittest?

    • Autodiscovering: put test functions in a module called something_tests.py and nose will find and run them for you.
    • No boiler plate: write your test as a simple function and call it test_ something, there's no need of inheritance from base classes or decoration of your functions.
    • Coverage: testing without coverage == no fun, more on this later.
    • Plugins: nose provides a nice plugin architecture, as a consecuence there are many useful extensions out there (nose-watch seems specially handy, check out the project here)... and of course you might be able to extend it creating your own plugins.
    • Things to come...

    Cool, how do I install nose?

    pip install nose
    

    Once installed run nosetests in a terminal (from the root of your project) to run the tests.

    Do yourself a favor and install your dependencies in a virtualenv.

    Wait... virtual-what?

    Ok, virtualenv creates an isolated python environment for your project... think of it as a custom site-packages per project.

    You should check out the documentation, but in a nutshell:

    # Install virtualenv
    pip install virtualenv
    
    # Create a clean virtual environment at my_env/
    # there's no need of --no-site-packages as it's deprecated.
    virtualenv my_env/
    
    # Activate my_env
    source my_env/bin/activate
    
    # Deactivate current environment
    deactivate
    

    Too much typing?

    There's virtualenvwrapper to make things easier, or you can create a bunch of aliases and go with that... Just keep it simple and don't waste too much time on this.

    Here's what I'm using to activate an existing environment in my system (put this in your ~/.bashrc):

    # activate a virtualenv
    # usage: activate my_env/
    function activate() { source "$1"bin/activate ;}
    

    Back to testing: What testing looks like?

    Assuming a project structure like this:

    * my_proj
        * tests
            * __init__.py
            * rocket_science_tests.py
        * __init__.py
        * rocket_science.py
    

    ... where rocket_science.py:

    def add_integers(*arg):
        if all([isinstance(i, int) for i in arg]):
            return sum(arg)
        raise TypeError("(%s) not an integer." % ",".join(arg))
    

    then rocket_science_tests.py should look something like this:

    import my_proj.rocket_science as rs
    
    
    def test_add_integers():
        assert rs.add_integers() == 0
        assert rs.add_integers(1) == 1
        assert rs.add_integers(3, 2) == 5
        assert rs.add_integers(5, -2) == 3
        assert rs.add_integers(0, -3) == -3
    
        try:
            rs.add_integers(3.14159, 1.61803)
        except Exception as err:
            assert type(err) == TypeError  # too much awesomeness?!
    

    What about coverage?

    Coverage basically tells you how much of your code is covered by your tests, so 100% coverage means every line of code is tested at least once.

    But there's more, it not only tells you the percentage but also the lines of code not covered (per module), so you can check this information and write more tests until reach the 100%.

    How can I check my coverage?

    First...

    pip install coverage
    

    and then add a couple of flags to nosetests:

    nosetests --with-coverage
    

    ... but it's taking into acount external modules! How to fix it?

    nosetests --with-coverage --cover-package=my_proj
    

    Too much typing?

    Again, here's what I'm using at the moment (put this in your ~/.bashrc):

    # run nosetest with coverage
    # usage: testme (from the root of your project)
    function testme() { nosetests --with-coverage --cover-package="${PWD##*/}" ;}
    

    That's nice, but what about DCC code?

    DCC code usually have strong dependencies on dynamic libraries initialized by the DCC at runtime, this means we can only run our code within the DCC.

    Autodesk Maya has the ability to run in standalone mode, allowing us to execute our code without the overhead of a fully fledged app, but this is a quite unique feature compared to other DCCs.

    There are interesting projects to automate testing for Maya-like apps (dccautomation by Rob Galanakis looks promising).

    mock to the rescue!

    mock is a library for testing in Python. It allows you to replace parts of your system under test with mock objects and make assertions about how they have been used. Check out the docs here.

    How to intall mock?

    pip install mock
    

    mock is part of the standard library from python 3.3 onwards.

    ... and now what?

    Let's say you want to test a snippet like this (standard Maya code):

    from maya import cmds
    
    
    def get_bbox(obj_list):
        """
        Returns the bounding box of a list of objects. The values returned
        are in the following order: xmin ymin zmin xmax ymax zmax.
        """
        bbs = [cmds.xform(o, q=True, bb=True) for o in obj_list]
        return tuple([(min, max)[int(i >= 3)](x) for i, x in enumerate(zip(*bbs))])
    
    
    # test function intended to be executed within Maya
    def test_get_bbox():
        locs = cmds.spaceLocator(p=(0.5, 0.5, 0.5))
        locs.extend(cmds.spaceLocator(p=(-0.5, -0.5, -0.5)))
        assert get_bbox(locs) == (-1.5, -1.5, -1.5, 1.5, 1.5, 1.5)
        cmds.delete(locs)
    
    test_get_bbox()
    

    Ok, what do we really need to test here?

    In my opinion we must test the algorithm, make sure that we are considering all objects in the obj_list and making the right choices between bounding boxes... we can assume cmds.xform is working fine, there's no need to test Maya commands (they have their own testsuite, I guess).

    So, in order to run this test on system python the first thing to do is skip the ImportError and then refactor the test function patching cmds.xform through the mock library.

    The following code runs perfectly in system python. Note that, except for the test function, everything else is the same as before:

    try: from maya import cmds
    except ImportError: pass
    import mock
    
    
    def get_bbox(obj_list):
        """
        Returns the bounding box of a list of objects. The values returned
        are in the following order: xmin ymin zmin xmax ymax zmax.
        """
        bbs = [cmds.xform(o, q=True, bb=True) for o in obj_list]
        return tuple([(min, max)[int(i >= 3)](x) for i, x in enumerate(zip(*bbs))])
    
    
    @mock.patch("__main__.cmds", create=True)
    def test_get_bbox(cmds):
        return_values = {"loc1": (-0.5, -0.5, -0.5, 1.5, 1.5, 1.5),
                         "loc2": (-1.5, -1.5, -1.5, 0.5, 0.5, 0.5)}
        cmds.xform.side_effect = lambda *a, **k: return_values.get(a[0])
        assert get_bbox(["loc1", "loc2"]) == (-1.5, -1.5, -1.5, 1.5, 1.5, 1.5)
    
    test_get_bbox()
    

    Cool! but what's the point?

    Being able to test our code from system python instead of the DCC makes a HUGE difference during testing! Run a test like this takes milliseconds and we can automate the process through a testing framework like nose, so in practical terms we can run tests everytime a file is saved without think too much about it (take a look at nose-watch).

    In contrast, be forced to open the DCC to run the testsuite, restart the application to cleanup its global state and then repeat takes forever, making the process a much less enjoyable experience.

    At the end, testing is a powerful development tool, let's take advantage of it to develop amazing tools!

    Regards, Cesar.

    by Cesar Saez at September 10, 2014 03:00 AM


    September 09, 2014

    2015 Bug watch: ls()

    For people switching to Maya 2015 here's an irritating bug in the 2015 Maya python layer.

    In all Mayas before 2015 (as far as I can check, anyway), calling cmds.ls() with a string that was not a valid Maya object name was allowed. You could for example, call

    cmds.ls("@")

    and you'd get back an empty array. In 2015, however, it looks like they have changed the way maya.cmds is converting the string into a dag node reference; it you call the same thing in 2015 you'll get this instead:


    # Error: Syntax error: unexpected end @ at position 1 while parsing:
    # ; ; @
    # ; ; ^
    # : @
    # Traceback (most recent call last):
    # ; File "", line 1, in
    # RuntimeError: Syntax error: unexpected end @ at position 1 while parsing:
    # ; ; @
    # ; ; ^
    # : @ #


    This is a bit more serious than it seems at first glance, because ls is such a common command. Any ls operation which includes a string that starts with anything other than a letter or a number with raise an exception, so there are a lot of places which used to just chug along silently that are going to start raising exceptions.

    My workaround is to patch cmds.ls on startup so that it safely renames any bad string before passing them to Maya.  I do this in my bootstrap routine so I don't have to chase down every occurrence of ls anywhere in my code  (1,001 of them, or so PyCharm tells me...).

    import re
    import maya.cmds as cmds

    VALID_OBJECT = re.compile("""^[|]?([^a-zA-Z_\?\*\:\|])|([^a-zA-Z0-9_\?\*\:\|\.\[\]])""")
    as_u = lambda p: p if not hasattr(p, 'addPrefix') else unicode(p)

    def safe_ls(*args, **kwargs):
    '''
    Patches maya 2015 cmds.ls so that it does not except when passed illegal name characters.
    '''
    if not len(args):
    return _BASE_LS(**kwargs)
    if len(args) == 1 and hasattr(args[0], '__iter__'):
    args = args[0]
    test_args = [VALID_OBJECT.sub('_', as_u(i)) for i in args]
    return _BASE_LS(test_args, **kwargs)gs)

    cmds.ls = safe_ls

    This makes sure that existing code works as it did before and I don't think it will break anything, since the invalid character strings were never going to be ls'ed into anything anyway.  Ordinarily I'm not a big fan of magical behind the scenes fixes but this is a pretty serious change to the behavior of ls which doesn't seem like an intentional upgrade so much as an oversight on Autodesk's part. So, at least until the old behavior comes back I'm gonna try it.

    Update: Hat tip to +Robert White for pointing out that the original regex I posted did not handle namespaces. Code above includes the fix.  Never would have figured it out without Pythex!

    Update 2: Updated the safe_ls procedure to handle more of the allowable syntax in older mayas


    by Steve Theodore (noreply@blogger.com) at September 09, 2014 11:54 PM


    September 08, 2014

    Escaping the Windows prison

    My friend Brad Clark over at Rigging Dojo is organizing a course on Maya’s C++ API (I am assuming it is Maya but could be another program). He had a question about student access to Visual Studio, to which I responded:

    As a programmer, the experience on Windows is pretty horrific. No built-in package manager. A shell scripting language designed in hell. A command line experience that is beyond frustrating. A tradition of closed-source and GUI-heavy tools that are difficult or impossible to automate. A dependence on the registry that still confounds me.

    My eyes weren’t opened to this reality until I switched to Linux. I was on a Windows netbook that was barely working anymore. I installed Linux Mint XFCE and suddenly my machine was twice as fast. But the much more important thing that happened was exposure to modes of developing software that I didn’t even know existed (Python, Ruby, and Go made a lot more sense!). Programming in Windows felt like programming in prison. Developing on Linux made me a better programmer. Furthermore, If I didn’t end up learning the Linux tools and mindset on my own, working in the startup world would be basically impossible.

    Programming on Windows revolves around Visual Studio and GUI tools. If you need evidence at how backwards Windows development is, look no further than Nuget. This was a revolution when it was released in 2010, changing the way .NET and Windows development was done. In reality, the release of Nuget was like electricity arriving in a remote village. It took ten years for C# to get a package manager. And it is for the rich villagers only: older versions of Visual Studio don’t work with Nuget.

    The ultimate problems Windows creates are psychological. The technical differences change the way you think. It echoes the “your Python looks like Java” problem. Is the Windows mentality what we want students to take on? My last two jobs have been on Linux/OSX. I honestly cannot imagine having kept my head above water if I didn’t have a few years of self-taught Linux experience.

    Windows still dominates in desktop OS popularity. That is all the more reason to make sure we are exposing student programmers to alternative ways of developing. I want new developers to be exposed to things outside the Microsoft ecosystem. It is too easy to become trapped in the Windows prison.

    by Rob Galanakis at September 08, 2014 10:08 PM


    Variable foot rig


    The foot is one of the areas that doesn't get special attention when rigging a character. Many rigs have the standard inverse foot setup that makes the animator slide a bunch of attributes and try to get something they like.



     I like to keep everything on the character without messing too much with sliding numbers in tiny boxes. That way the animator can quickly experiment with poses and get organic shapes.

    Here is the setup I came up with:


    Variable foot from Armin Halac on Vimeo.

    As seen in the video the foot is really flexible and allows for easy posing. The bend control can moved to any point along the foot and make the foot bend in any direction. The only slider that requires the animator to take his/hers eyes of the character is used to control the falloff. Falloff control allows the foot to peel nicely from the ground or to bend at a harsh angle. The foot uses the same rig for both IK and FK modes.

    The model is owned by Irie Studios.

    by Armin Halac (noreply@blogger.com) at September 08, 2014 09:32 PM


    October Course Announcements from Rigging Dojo: Props

    Jeff is back for another round of Props fun, we filled up quick last time with some great results. Give this video a watch if you want to know more …

    The post October Course Announcements from Rigging Dojo: Props appeared first on Rigging Dojo.

    by Rigging Dojo at September 08, 2014 07:15 PM


    September 05, 2014

    The Game Artists Resume Guide (Revisited)


    I noticed that my recent repost of the old job hunting guide, Read  The Damn Ad, has quickly amassed a lot of views and links. In the interest of completeness, therefore, I thought I'd also repost the bookending article (also from Game Developer)  on the nuts and bolts of applying for a job.  

    The whole thing is after the jump...

    Note: I've left the original article as is for historical reasons, but annotations in orange are updated advice or notes on how things have changed since 2006

    Your resume is is not just a neutral transcript of your past career – it's a precious opportunity to get the full attention of the person who can hire you.  In the business world the rule of thumb is that the resume gets just under  20 seconds of the reader's undivided attention. That is your window for positioning yourself clearly in the reader's mind – and as you can imagine there's not a lot of room for subtlety. A resume bears more resemblance to tightly targeted ad campaign than it does to a biography.

    Customize!


    The real difference between successful and unsuccessful resumes isn’t the presentation: it’s the content. 

    However, as we stressed in Read The Damn Ad, most companies are looking to fill specific slots.  Most of the time and energy in resume creation, therefore, goes into fine-tuning the resume for each specific application. You resume has to tell a story that underlines your fitness for the job on offer. A level designer job, for example, could be described to emphasize its 3-d modelling aspect, game design skills, or the production pipeline management issues. Which description you choose depends on the  job you are seeking. It's unfortunately true that groping for multiple ways to describe your past achievements can become pretty tiresome. After a few applications, though, you'll build up a library of targeted resumes that can be recycled for similar jobs with very little effort.

    Of course, you shouldn’t confuse legitimate marketing with dishonesty when adapting your resume. There is a world of difference between selectively highlighting aspects of your real experience and inventing skills, responsibilities and job titles. It's easy to be cynical and believe that "everybody does it," but in fact very few people lie on their resumes – especially in a tight-knit industry like ours, where word gets around quickly and bad reputations are hard to shake. So it's not only wrong to lie, it's also stupid.

    Targeting your resume works best if you learn to read job ads very closely. They might sound formulaic, but most ad descriptions offer important clues about how the employer is going to evaluate candidates. Consider this sample ad:

    Engulfing Arts Inc., Los Diablos CA.
    Environment Artist
    We are seeking an environmental artist for a multi-platform game. The artist will use 3DStudio Max to  build and texture architectural, and natural models for a fantasy adventure game with cartoon-style art direction. 2-3 years experience in 3Ds Max and 2 years game experience required.  Ability to work well in a team environment under short deadlines a must. Preference given to candidates with strong organic modeling and texturing skills.

    The main point, of course,  is clear: the opening is for an artist with some experience doing cartoon style environments who can handle organic modeling. 

    But what other clues can you infer from the wording of the ad?

    Because the job is designated as "artist", and the ad makes no mention of game design skills, it's a good guess that the team uses a split art/design pipeline, so that the game design skills implied in a job like "level designer" aren't going to be a priority. A line like "Ability to work well in a team environment" might be pure boilerplate – but it might also mean that previous team-members have had trouble taking direction (it may also mean the company uses a top-down, centralised organization). Finally the description clearly states that the team lumps modeling and texturing together, so it's a good guess that a the job will go to someone who can both model and paint textures.

    With this information in hand, you should re-work your basic resume skeleton to  emphasize the key points the employer is looking for. Most resumes contain an "objective line," which describes the job you want,  and a  "Summary” paragraph which highlights the skills and accomplishments of yours which will interest the potential employer. These sections are obvious places for empasizing the experience and skills you want to highlight. In the case of our example ad, something like this would be appropriate:

    Objective:  Seeking a position where I can use my experience modeling and texturing with 3D Studio on a team building an expressive fantasy world.

    It's often useful to echo the key phrases of the ad itself when describing yourself, in order to emphasize that you fit the job on offer. The obvious drawback to this strategy is that it's eay to end up sounding like a marketing drone.  If you find it hard to jam all of your points into the objective line or summary paragraph, don't forget that the cover letter is a good place to make claims you can't squeeze into the straightjacket of resume convention.

    Formatting

    Knowing how much rides on your 20 seconds in the sun, it's easy to drive yourself crazy trying to come up with a format for all of your brilliantly targeted resume data. Do you use a chronological or skills-based format? Is it OK to use color paper or graphics? It’s easy to get distracted by the range of trivial choices involved in putting together your life's story – even if you’ve been around the block a few times, the business of condensing your whole career onto a single sheet of paper, a web page, or a pdf  is nerve-wracking.

    It probably goes without saying - though that never stops me - that nowadays  your info will be delivered in electronic rather than paper format. That doesn't mean, however, that you don't have to be vigilant about presentation!

    Don’t waste a lot of time searching for the “official” format – the advice books and websites don’t all agree among themselves. What you do need to shoot for is clarity and a base level of professionalism.. The overworked screener on the other end of the transaction is always looking for a good excuse to move on to the next application. This means you can't afford to look amateurish or lazy – you need to keep that reader in a receptive frame of mind in preparation for the all-important demo viewing. When you complete your resume, make sure to get some friends (preferably more than one) to help you with proofreading and copy editing before you send it out into the cold, cruel world.

    As an artist, you’re not completely bound by the draconian rules of a standard business resume (no colored paper, only standard fonts, and so on). However, if you do want to experiment with novel formatting, color, or pictures, remember that your potential reader has a thick stack of resumes to sort through before going home for dinner. Avoid any design decision which is more likely to annoy than to please that reader. Unusual fonts, artsy paper, and idiosyncratic layout  can help your resume stand out from the crowd -- but you have to be really confident in your graphic design skills if you want to travel that route. If you're not dead certain you can create a visually arresting resume without confusing or annoying the reader, err on the side of simplicity and save your artistic statements for the portfolio.

    Since this was written in 2006, LinkedIn has become an extremely important aspect of the hiring process.  It's a kind of permanent resume, available to recruiters and possible employers - and also to your coworkers.  It's a good idea to maintain your Linked-In page on a regular basis before you're actively looking for work. In the first place, you may attract attention from potential employers, recruiters or, best of all, old colleagues who are looking to fill a slot informally without a full blown job search.  If you've pondered the lessons of the companion article, you'll know that last one is by far the most important aspect of the whole thing.

    Doing your maintenance on a regular basis is also a good idea because a sudden burst of Linked-In postings is a good indication that somebody is feeling restless. If you tweak a line here or there every few months it's just part of the (semi-)social media white noise. If you do a huge update right around the time you get turned down for a promotion you may be attracting the wrong kind of attention.

    LinkedIn does pose some interesting problems as a way of describing yourself to potential employers. For one thing, it's generic: you can't cherrypick or massage things the way you can in a targeted resume. Luckily you're not bound by strict formatting requirements of a resume either, so you can be more general than you would be when applying for a formal position and you can include links to more targeted portfolios and demos.  

    The Demo


    Thus we come at last to the portion of the job application that nobody can complain about. If you are an artist, your portfolio is the core of your job application, the make-or-break opportunity that will (or won't) land you a job. Unfortunately, all the competitive forces that make drafting a resume such a painstaking task are still in play when your reviewer sits down to review your samples. For this reason you need to devote even more energy and time to crafting your portfolio than you do to the details of your resume and cover letter. Finding work is hard work!

    The first rule, most important skill you need when assembling a portfolio is ruthlessness. You need to be a pitiless critic of your own work, because any weak samples that find their way into your demo will drag down the perceived value of your better work. The demo, after all, serves a double purpose for your reviewer. It not only shows the quality of your handiwork – it also demonstrates something of your taste and judgement. Allowing weak items into your collection may cause the reviewer to wonder if you can tell the difference between your best and worst efforts, or whether your better efforts are mainly luck. So if you're faced with a choice between fewer samples and a lower average quality, have the courage to cut.

    How much?


    Of course, it's natural to worry about whether you've got enough material, especially when you're busily culling out the weaker pieces. "Enough" is whatever you need to sell a convincing picture of your professional skills to a complete stranger. For a confident, established illustrator that might be as little as three or four finished paintings. Most of us, though, will want to provide a bit more. How much depends on the medium you're delivering in.

    For motion media (animations, slideshows, turntables or in-game movies) you need to provide at least 45 seconds of material. That might not sound like much but it's longer than most television commercials, and plenty of time sell yourself. Four or five minutes is the upper limit -- if your reviewer is still wondering how good you are after five minutes, you haven't been sufficiently ruthless in your selection process. 

    For stills (screenshots, renders or drawings) you should try to provide at least a dozen images. If you’re delivering images in bulk (for example a folder full of JPEGs) you shouldn’t send more than forty. If you’re using a webpage you might incude more than that, as long as the viewer won’t be overwhelmed by facing them all at once. Multiple shots of the same subject – for example a profile and a full-face shot of the same character – are fine provided they offer the viewer more insight into your work; if they start to seem like padding. though,  the net result is probably negative. Large, complex pieces should be presented in a way which emphasizes different aspects and makes the breadth of the piece clear to the viewer. For example if you're submitting shots of a complete game level which you've modelled and textured, be sure to select shots which emphasize the variety and detail in the level – too much repetition will make the shots seem monotonous and may feel like padding to the reviewer.

    Annotation


    When you assemble your list of images and videos, it’s important that the reviewer have access to critical information about the samples. We’d like to think that our work speaks for itself – but often it doesn’t. Make sure that the reviewer can easily find out the following information for each piece:

    • What game is it from, and when?
    • If this is a game shot, what the delivery platform? You don’t want your Nintendo 64 shots to be compared to Half Life II
    • What part of the work is yours? This is particularly critical for cutscenes and in-game shots. This is the number one question the reviewer will be asking him or herself.

    It’s also a good idea to include a short, pointed discussion of the design, gameplay or technical problems that you tackled to create the image. A picture of a tank is a picture of a tank – but telling the reviewer “I designed this model around a gameplay requirement for a massive vehicle capable of smashing holes in walls to deliver a squad of space marines into a fortified bunker. The huge hydraulic rams serve to emphasize the vehicle’s breaching function and visually underline its unstoppable, bull-like character” helps the reviewer see your professional skills at work. Don’t try to cram too much into the notes, a sentence or two is sufficient -- but very useful.

    Media

    As you'll see, a lot has happened in this area since the original article was written.  And yet this was less than a decade ago. Wow.

    Distributing work is somewhat tricky, because its difficult to know what hardware and software your work will be viewed on. The only hard and fast rule is pay strict attention to any submission guidelines that come with the job ads – don’t send a CD to a company that asks for VHS tapes, or vice versa!

    VHS? What's VHS?

    It’s a good idea critical to have a well designed, responsive web page. The ability to click through from a resume email directly to the samples is a useful convenience that will endear you to the reviewer. Plus the ease of annotating allows you to include notes with your images easily and painlessly.

    As with the resume, don’t knock yourself out on the graphic design of your site unless you’re really trying to showcase your design skills – and certainly don’t take any risks with the navigation or scripts that might leave a visitor stranded and annoyed. It’s also best to keep Flash or Shockwave components to a minimum unless you’re a web specialist and can be confident that your site works well on all browsers and platforms. Vanilla HTML may not be thrilling, but it will be accessible to almost anyone with a computer. The big drawback to using a website as primary vehicle for your portfolio is that bandwidth and storage costs may make it hard to showcase animations, turntables or 3-d models. Anything that takes more than a few seconds to download is in danger of being skipped by the busy screener.

    It's pretty astonishing how old fashioned that paragraph seems in light of the last seven or eight years of web history. Nowadays it's easy to find sites to host high quality video and big images with minimal latency.  Of course, today's reviewers and screeners are also much more savvy web consumers: they've been exposed to a lot of very sophisticated and subtle web design and they will be much more critical of the nuances of your presentation than might have been the case back in the day. This puts more stress on your presentation skills - even though there's no reason to assume that every 3-D modeler is also a web designer it's a common perception among less artsy folks who may be the first to check out your work.  

    If you don't fancy yourself a web designer, shop around for a site which is image-friendly, stylish, and  doesn't compete with your artwork.  You don't even need to shell out for a custom site hosting arrangements, there are plenty of free make-your-own-site and blogging services that can be used for portfolio hosting.  Sites like Behance and CarbonMade are specifically designed for portfolio hosting and generally help to showcase your work rather than competing with it.

    If you're a 3D artist you have also got a very compelling new tool in the form of Unity.  A simple Unity demo app (either downloadable or hosted using the Unity web player) can be a far more effective sales tool than folder of stills: you can not only showcase your modelling skills but many nuances of shading and texturing are much more obvious with a turntable or a walkaround camera than they are in a static shot.

     CD-Roms are cheap to make and easy to mail. They excel distributing large files (for example game levels and 3-d model source files). You can also use them to distribute images either as individual files or a self-contained HTML website. If you use standard image formats (such as JPEG) and HTML or plain text notes, you can burn your CD as ISO-9660 format to make it work on Macs, PCs and Linux. Unfortunately animation and video files which depend on downloadable codecs or rely on system resources can easily cause trouble between different OS’s. MPEG-1 (VCD) and MPEG-2 (DVD) formats are cross platform, but not trivial to author – if you create a VCD or DVD format reel be sure to test it on both computers and consumer DVD players!

    Nowadays, If you do have to bring physical media - say, extra ammo for your interview, or a quick demo while you're hitting a job fair booth at GDC - use a flash drive (bring multiples in case somebody asks to keep it!).  Laptops are of course a great demo medium, but for hands on demos a tablet can be more effective: even though the screen is smaller the tactile nature of tablet navigation and the ease of zooming in on a detail make for a much more intimate experience.  Keep an eye out for image or portfolio hosting sites that work well and smoothly with your tablet when you're shopping for a place to host your stuff.

    For this reason you may prefer to deliver motion materials (especially animations, but also game footage and turntables) on VHS tape. Until fairly a few years ago VHS was the standard way to distribute demo material, and many companies still demand VHS as the only submission format. It’s is a reliable way to distribute motion media, but it’s a poor way to demonstrate stills, detailed textures, or model wireframes. It’s also unfortunately true that sending a VHS tape to a company without a VCR is a waste of time and postage.

    It's kind of sad that I am actually embarrassed to have written about VHS tape in 2006. I mean, it was a long time ago, right? Not my fault! I liked Betamax better anyway.

    Wrapup


    That pretty much concludes our tour through the battle-scarred wastes of the job search. It might seem like this is a lot to go through for a simple job application, but almost every rule we’ve laid out can be reduced to two simple ideas.

    1. Don’t give the reviewer and excuse to fail you and move on to the next candidate quickly. 
    2. Carefully edit every part of your application, from the cover letter to the notes accompanying your portfolio, in order to reinforce your fitness for the job on offer. 
    If you remember those two points, the rest follows logically. There’s no question it can be a lot of work – but if you buckle down to the hard work of job-hunting, you’ll be  at a real job a lot faster than the applicants who skimp on it. 



    by Steve Theodore (noreply@blogger.com) at September 05, 2014 06:00 PM


    HyperText for Unity 4.6

    If you’re already working in the open beta of Unity 4.6, you’re hopefully on your way to making a great UI with the new UI system. If you’re looking to get a little bit more out of the UI system though, I’m happy to report I have a new asset store package available today! The package, which I’ve called HyperText, adds some new functionality to the built-in Text component, including the ability to:

    • emit callbacks for different mouseover/touch states
    • create custom styles for links and your own rich text tags
    • easily reuse and manage styles throughout your project
    • display sprites inline with text as quads, and
    • automatically detect and tag keywords

    Check out the 1.0 video for more info:


    In related news, I’ve simultaneously released version 2.0 of my Property Backing Field Drawer package. It now features all kinds of new dark magic to make it even easier to use. Changes include:

    • Unity 4.5 is new minimum version.
    • Added IPropertyBackingFieldCompatible interface and PropertyBackingFieldCompatibleObject base class, which are used to support custom serializable structs and classes.
    • You can now use setter logic that only triggers on value changes! Note that custom serializable classes will always supply a clone.
    • Full support for undo/redo and reverting to prefab for all property types in any play mode state!
    • PropertyBackingFieldDrawer.DisplayArrayPropertyField() and PropertyBackingFieldDrawer.DisplayReorderableListPropertyField() were removed and are no longer necessary!
    • No naming assumptions are made for IList backing fields and their respective properties anymore!
    • Properties and their respective backing fields need not match type, as long as the backing field type is assignable from the property type.
    • Fixed bug that could cause some enum properties to not be set properly.
    • Fixed bug calculating property drawer height when property was followed by another whose name was prefixed with the preceding property’s name.
    • Changed some access modifiers and method signatures of utility methods which should generally not be needed anyway.

    by Adam at September 05, 2014 02:56 PM