Passing arrays of values and indices to Set in Array


When I’m not sure how a node processes its input, I’ll build a little test tree to find out. For example, if I connected arrays to the Index and Value ports of Set in Array, I wasn’t sure if I would get this:

Result[ Index[i] ] = Value[ Index[i] ]
or this:
Result[ i ] = Value[ Index[i] ]
or this:
Result[ Index[i] ] = Value[ i ]

So, I used Build Array from Constant to build an array with a given size, then, for convenience, I use String to Array to build a Index array and a Value array. Then I connected the output to a Set Value, and Show Values showed me that Given these two arrays, Set in Array does this:

Result[ Index[i] ] = Value[ Index[i] ]

In practice, you’re probably more likely to use an Index array like [0,1,2,…], so you’ll effectively have this:

Result[ i ] = Value[ i ]

ICE Modeling: Building a faster duplicator compound


On the XSI mailing list, Guillaume Laforge posted some interesting information about how to build an efficient duplicator compound. He also posted a new version of Create Copies from Polygon Mesh.

Basically, if you want to lots of duplicates, then you’ll find Create Copies from Polygon Mesh to be a bit slow. That’s because it uses Merge Topo Array, which is designed to handle the merging of meshes with different topologies. To duplicate an object, it’s better to use Create Topo.

To use Create Topo, you need two arrays:

Guillaume goes through all this in his post, but here’s my take, starting with the vertex position array.

To build this array, we start by getting an array of the point positions for the original mesh, and then building a new array that contains a copy of the point positions for each duplicate. So if the original mesh has M vertices, and we want to create N duplicates, the array will contain M*N elements.

To build this vertex position array, we use the modulo trick to repeatedly select elements from the array. There are two reasons for doing it this way: we can allocate the array size just once, and we don’t use any repeat nodes.

I find it helpful to visualize this with a simple case. So here’s a screenshot for a single polygon mesh. Note the array created with the modulo operator. By feeding this into the Select in Array node, we end up duplicating the original point position array once for each duplicate.

Note also the use of Build Array from Set, to build a singleton array out of the per-point PointPosition data set.

Tips for searching the new online help


Wildcards
You can use the wildcards * and ?.
* matches one or more characters, and ? matches a single character.

Special Characters Ignored
The following special characters are ignored and treated as white-space:
[ ] ^ $ . | + ( ) ` ~ ! # % & – = { } ; ‘” ,

Stop words
Common words like “a”, “an”, “the”, and “get” and “set” are filtered out of searches, even if you do a phrase search.

Note that searches like “g?t s?t sum” won’t find the ICE node “Get Set Sum”.

Running Softimage on other distros like Ubuntu, Kubuntu, Pardus, and Gentoo


Here’s a workaround for running Softimage on other distros like Ubuntu, Kubuntu, Pardus, and Gentoo.
On these distros, some users have noticed problems with images (cannot browse for images, or even create noicon clips). Or Softimage can create and even save scenes, but crashes when you open a scene.

One of the Softimage developers believes he may have tracked down the source of this problem. The Softimage library libdsprsr.so has a dependency on libtiff and libjpeg. If either of these is missing, then the Softimage library fails to register correctly (during the install), but unfortunately no error is reported.

As a workaround you can try the following steps:

  1. Open your Softimage shell and source the .xsi file
  2. cd to the “Application\bin” folder
  3. Run cmdreg libdsprsr.so
  4. If you get an error, then you have this problem, so we can try to fix it. Now run ldd libdsprsr.so
  5. You should see that 1 (or more) libraries are missing – most likely libtiff and/or libjpeg.
  6. Install the required package(s) to get the missing libraries and then run the cmdreg again: cmdreg libdsprsr.so
  7. It should register now and all the problems with image nodes will be gone.
  8. If you have other strange problem you can ensure that all the Softimage libraries are registered correctly, by re-registering them all by running cmdreg -f XSICOMDLLs.lst
  9. If you have any errors, run the steps above checking the failing library with ldd to see which libraries are missing.

Hat tip: Sean Donnelly

Emitting particles from polygon clusters


Here’s an ICE tree that emits a particle from each polygon in a cluster.
In Emit from Position, I’ve set the Rate Type to Total Number of Particles, and the Rate to 1, so I get a single particle per polygon.

I exploded the Align to Emit Location compound and modified it to use the PolygonNormal to align the particles (which I’ve set to “cones”).

Hat tip: Sebastian Kowalski on the XSI mailing list