Another Rotate Vector example. This time, I rotate the points of a mesh around the global X axis. In short, the point positions are treated as vectors, and then rotated about the specified axis. Of course, this requires some conversion between coord systems, which is always fun🙂
The bottom part of the tree is just for visualization.
Not sure how Rotate Vector works? Is that 26 words (including five “the”s) of documentations not doing it for you?
Fortunately, it’s not hard to rig up an ICE tree to help visualize what Rotate Vector does.
Compound is here if you want it.
Here’s a couple of examples to illustrate how to use Sort Array with Key.
This ICE tree sorts points by their Y position.
And this tree sorts points by their brightness.
If you have a group of N different objects, and N points in a point cloud, then here’s a simple way to instance a different shape at each point.
The line of shapes in the background is the group.
Note the use of Get Point ID, which works even if the points don’t have their ID attribute set.
A couple of basic examples, because I didn’t see any screenshots in the docs.
When you’re using Get Closest Locations, positions are local. That is, they are relative to the local coordinate system of the object that “owns” the ICE tree. The input Position is in local coordinates, so in most cases, (0, 0, 0) will do fine. And if you use the output locations to get positions, those positions will be in the local coordinate system of the ICE tree owner.
Hat tip: Gray, who has posted this several (many?) times over the years.
With Arnold, it’s all in the ICE tree. SItoA looks for attribute names like ArnoldLight_intensity and automatically uses those attributes to set the corresponding parameter values on the point_light nodes it exports to Arnold.
With mental ray, you use the Attribute shaders:
Dividing an integer N by itself doesn’t always give you 1.
I think it’s a problem in the Divide by Scalar node (the division is probably returning a scalar like 0.99999999, and then that is truncated to zero when it is converted to an integer).
A workaround is to do all your division with scalars, and then use modulo to determine whether you Round or Floor the result. Here’s an example compound by Guillaume Laforge:
I’ve noticed this a handful of times, where a node like Get Data isn’t found in the preset manager. Clicking the Update button always fixes it for me.
The last time this happened, instead of clicking Update, I started Process Monitor and did a few more searches in the preset manager. In my case, Softimage searching only the compounds, not the presets in %XSI_HOME%\Data\DSPresets\ICENodes. That’s why nodes like Get Data weren’t found.
Clicking Update forced Softimage to search both the compounds and presets.
A weightmap is per-point, but it’s per-point on the emitting geometry, not the point cloud. So you can’t just do a plain “get weights” if you want to use the weightmap to control particle values like Velocity or Speed.
Instead, you use get a location, like the particle emit location, and then get the weightmap value at that location. Then you’ll have a particle per-point context to work with.
When you get the weight at a location, you get an interpolated weight value.