primvars
output varying color matte_name;
sl
extern color matte_name = v1; result = 0;
To specify per object mattes would be to use attribute() and match() functions to assign colors to groups or single objects. For example,
sl
string xxoo; attribute("identifier:name", xxoo); if (match("cubeShape10",xxoo)) extern color matte_cubes = color(r,0,0); else if (match("cubeShape20", xxoo)) extern color matte_cubes = color(0,g,0); else if (match("coneShape30",xxoo)) extern color matte_cones = color(r,0,0);
So, the above code writes to two mattes, cubes and cones, in which cubeShape10 will be red and cubeShape20 will be green in matte_cubes.
0 comments:
Post a Comment