Disconnecting Shaders

March 24th, 2011 by Patrick Boucher - Viewed 12791 times -

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).

Simulated Shapes in Momentum 2.0

March 21st, 2011 by Helge Mathee - Viewed 15389 times -

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 »

Scene Based Event Plugins

March 18th, 2011 by Patrick Boucher - Viewed 7731 times -

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!

A SetValue decorator

January 19th, 2011 by Patrick Boucher - Viewed 10635 times -

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.

Vintage Softimage – A tribute to Phoenix Tools and Arete

June 4th, 2010 by Stefano Jannuzzo - Viewed 30871 times -

The middle-aged of you will probably remember those names from the 90s.

Phoenix Tools was a plugin company for Softimage 3D, and I was one of the founders. We did good and bad, and we eventually closed down in 2002.

Arete had an excellent reputation for their ocean and atmospheric library, called Digital Nature Tools. I think their main business was in military simulation, however they had a part in every cg-generated ocean in the movies of the 90s.

In 2001 we joined forces to port their software under XSI (I think it was 2.0). Unfortunately, after the first version came out, both companies shut down.

8 years later, I am working on a feature animation with a few shots in water, and I realized I still had on some cd the arete psunami libraries. So, I decided to give it a try. I removed the license check from the shaders and I compiled them with good old Visual Studio 6, linking against the oldest mental ray library I could find (3.3), and in the end it worked. I was kind of touched when I finally saw the displaced grid rendering in Softimage 2010.

I think I will do no harm to anybody releasing these shaders. Both companies are dead since long, and this is my little tribute to them and the talented people who worked there.

The addon is only available for win32, and no, no chances for other platforms. That Arete library is the only one I have. If you do, use it at your own risk (and fun, i would say. There are probably better ways to do oceans nowadays).

And, you know what, I don’t even know how the full package works. I don’t have anymore the documentation, nor the scripts we provided. If my old companions will find them, I will post them later.

The basic usage however is easy. You have to connect a DNT_Ocean_Sh and DNT_Time to a DNT_Ocean_Evolver. What come out is the ocean instance, that can then go into the other nodes. Also, you want to apply DNT_Air as environment to have nice reflection and the atmosphere.