Ok, I’ve pretty much got the unique ColorID part working. The modification to the function addOutLineIDsToMaterialsProperties looks like this:
...
oColorIDProp.setPath( "Outline" );
var iColor = i*19+16;
var jColor = j*19+16;
var kColor = k*19+16;
if (iColor > 255) {iColor -= 255;}
if (jColor > 255) {jColor -= 255;}
if (kColor > 255) {kColor -= 255;}
var TheColor = Color(iColor, jColor, kColor); // where r, g, and b are defined integers 0-255
oColorIDProp.setColorValue(TheColor);
...
I’ve attached sample images of the default 3Delight render, the render produced by the Scripted Renderer, which creates an image of flat colors using the ColorIDs, the outline file using ColorIDs, and the outline file using Normals. I still don’t know if using the ColorIDs would be all that helpful, but it might add some enhancement over just Normals. Anyway, I’m happy to have figured out how to get this working, whether or not I end up using it.
One thing that still confuses me is that the cube, a DS primitive, doesn’t seem to get a ColorID other than (0,0,0), even though I’ve deliberately set the starting point of all ColorID components above 0. Is a DS primitive not a regular node/shape in the scene tree?