Disconnecting Shaders

March 24th, 2011 by Patrick Boucher - Viewed 3837 times - Popularity: 10% [?]

I rarely talk about short lived timely issues such as this one but it was a bit too pervasive to pass up and the facility here has just been bitten by it.

I’m talking about spontaneously disconnecting shaders.

Background info (read these):

The following script partly automates the solution described by eX-SI Support so if you have many libs it almost eliminates human error. It seems to have worked for us so far as a preemptive measure before scenes break or after having spent too much time fixing a scene. Import an asset, material preset or fix a broken scene, go through the hoops. This is not fun but until there is an official fix, we’re kinda stuck.

Run Application.MatLibFixStep1() which will convert material libraries to external references, prompt you to save the scene and quit Softimage.

Restart Softimage, open the scene you saved previously and run Application.MatLibFixStep2() which will reconvert the material libraries to internal storage.

Jean-Sebastien’s workaround is also worth investigating if the above doesn’t work for you (see the Softimage mailing list thread linked above).

Popularity: 10% [?]

Simulated Shapes in Momentum 2.0

March 21st, 2011 by Helge Mathee - Viewed 4513 times - Popularity: 15% [?]

Momentum 2.0,  Exocortex’s new multi-physics system, an integration of the well-known Bullet physics engine for Autodesk’s Softimage, provides a bunch of features that are not totally obvious at first.

One of the clients showed me a pretty cool use of the geometry stack in conjunction with Momentum’s DeformRigidBody operator. This operator is able to treat every polygon-island inside a polygonmesh as a separate rigid body, and, since it is connected to the geometry stack, is able to keep the shape of the rigid bodies in sync with the deformation happening below. This way you can create animated shapes, and have them influence the rigid body simulation in Bullet.

Read the rest of this entry »

Popularity: 15% [?]

Scene Based Event Plugins

March 18th, 2011 by Patrick Boucher - Viewed 2056 times - Popularity: 9% [?]

Those of you who are long time readers of Softimage Blog (or XSIBlog way back when) might remember a 2006 article by Homam Bahnassi. In the article Homam describes a method to run code stored in annotations in the scene at arbitrary moments by selecting an object and manually invoking code execution.

Recently we had an issue where a single scene was acting wonky and for it to render we needed to coax it a bit into cooperating with a pre-render script. The production guys fixed their issue but it got me thinking and I decided it might be good to revisit Homam’s ideas but make it work with the siOnBeginSequence event… Or maybe even any event.

The idea is to have a single plugin that is extremely simple and that registers into the requested events. When the event is triggered, the plugin will inspect the scene and find any relevant annotation and execute it’s code. The plugin will find annotations who’s name matches the name of the event prefixed with run, runOnEndSceneSave for example.

The scene root is inspected for annotations as well as any other model no matter how deeply nested. Annotations’ code is executed depth first so if you had a scene who’s assets’ code needs to be run before scene code, you’re good to go. Finally, if any annotation’s execution fails, execution of all remaining annotations is halted; please debug your code.

The explorer screenshot shows an example where the scene contains code that will run when the scene is saved. The Model annotations that allows the runOnEndFileImport code to be run only once on initial model import. Let’s break that second example down a bit starting with the runOnEndFileImport code:

The flag1 parameter of the runOnEndFileImport is used to know if the code has already run once. The problem though, is that if you export the asset, it will export with the flag on and thus would not run on subsequent import. You could rely on the user to remove the flag on export but you could also implement two other event annotations: runOnBeginFileExport to unset the flag and runOnEndFileExport to switch it back on.

Have you noticed the Annotation object? Well, I figured that to add some context to the code in the annotation, on top of the standard Softimage objects (like Application), we could probably provide the actual annotation object that is being executed so you can then start rummaging in your scene at the appropriate location if needed.

Finally here is the Gist that implements the actual plugin that does the event registrations and annotation finding and execution. If you need this functionality on more or fewer events, just add or remove the appropriate ones in the ACTIVE_EVENTS list.

There are most certainly performance limitations to this that I haven’t investigated or measured. For instance, activating the siOnValueChange event and having tons of annotations in a large scene might not be a good idea.

Finally, if you’ve got a smarter way to find annotations under an X3DObject, please share!

Popularity: 9% [?]

Work-Around to Problems with Tablets and Softimage

March 11th, 2011 by Luc-Eric - Viewed 3175 times - Popularity: 12% [?]

[Note: this problem no longer applies to Softimage 2011 SP1 and later version]

There is a strange user interface lag that affects Softimage XSI when you use a Wacom tablet. With heavy scenes or simulation, you may never be able to stop playback. Other users have reported problems with the render region.

The best work-around is to disable tablet support in Softimage (any version).   This will not affect any other program.

To do this, start a  “Command Prompt” using the link in the Autodesk Softimage Start menu group.  If you are running under Vista or Windows 7, it’s best to run it as an administrator.

A command prompt will will start in the ‘bin’ directory of the application.  Type this command:

C:\Program Files\Autodesk\Softimage 2011\Application\bin> copy xsi.bat wintab32.dll

And re-launch the Softimage.  You should now be fine.

The only place Softimage uses the tablet is for pen pressure in Weight Painting and in the compositor, and it doesn’t work very well anyway. To restore tablet support, simply delete wintab32.dll from the bin directory from that command prompt.

Softimage 2011 SP1 and Later

Table pressure support is now disabled by default in new versions of Softimage, eliminating this problem.  If you want to renable it, you need to set the environment variable

XSI_ENABLE_WINTAB_SUPPORT=1

There are few  benefits to doing this; the pen pressure is only used in Weight Painting (where it is a bit  hard to control) and painting in the paint node compositor. You pen tablet will probably work better if you don’t mess around with this.

Linux

There is no support in Softimage for pen tablet on Linux and therefore no known problems with it.

 

Popularity: 12% [?]

A SetValue decorator

January 19th, 2011 by Patrick Boucher - Viewed 2290 times - Popularity: 11% [?]

In a recent post on the Softimage mailing list people were wondering how to temporarily change user preferences. There are many cases where that might be fun to do, think command logging, undo stack or PPG pop ups.

So here is a quick revisit of my past post on decorators but this one is very generalized.

And some example usage…

This version of the decorator is fun (Yeah!… I said fun.) because you can change any value in Softimage temporarily, as long as the value can be changed via a Application.SetValue() call.

I think you get the Gist of it.

Popularity: 11% [?]