Getting the shader connected to a material

In previous versions of Softimage, you could use Parameter.Source to get the shader/texture connected to a material parameter such as the diffuse port.

As of 2011, Source returns a ShaderParameter. To get the connected shader, use ShaderParameter.Parent (in C++, GetSource().GetParent()).

var m = Dictionary.GetObject( "Sources.Materials.DefaultLib.Material.Blinn" );
var p = m.Parameters("diffuse");
LogMessage( p.Source );
// INFO : Sources.Materials.DefaultLib.Material.Image.out

LogMessage( ClassName( p.Source ) );
// INFO : ShaderParameter

LogMessage( p.Source.Parent );
// INFO : Sources.Materials.DefaultLib.Material.Image

LogMessage( ClassName( p.Source.Parent ) );
// INFO : Texture

Motion blur on non-simulated ICE trees

In a recent case, a customer was using an ICE tree in the Modeling stack to create a fixed number of particles. Then, he used an animated scalar value in the ICE tree to drive changes in the particle positions. Basically, it was a bunch of “spokes” rotating in a circle.

The problem was that there was no motion blur when he rendered with mental ray (but there was motion blur with 3Delight).

To get motion blur in this type of scene, you have to set the PointVelocity attribute to a value that indicates the direction and distance/second of travel.

Unlike 3Delight, mental ray only takes the motion from the velocity attribute. There’s no delta comparison done.