needed - material assigning for custom clown

Started by andy.engelkemier, September 29, 2016, 07:51:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

andy.engelkemier

I'm not an expert script creator At All. But I know enough scripting to know what's possible mostly. Some max script, expressions in AfterEffects, JS, autohotkey, etc. Just really basic stuff.

I'd like to duplicate my object, then run a script on the second object (I suppose the script could handle that first action as well.
For each parent containing no parents as children (meaning, the last set of parents in a chain)
Assign a material as emissive, both sides.
For the color, count the parents, divide by 360. (it gets more complicated if there are more than 360 objects here, but for now lets keep it at that).
The color should be HSV. If there are 23 layers the first value would be 15, then 30 (give or take one for rounding), then 45, etc. Brightess would be maxed out, and saturation.
For more than 360, we could also start dividing by value as well, then saturation.
The idea here is each object group of objects gets it's own color, as far as possible from any other object, while still being selectable (that's why you don't adjust saturation and value each time as well). That's why you divide it evenly. 

Name the material Clown:RRR:GGG:BBB or something like that. Might be nice to allow for a user selected name in case someone wants to force all these to the beginning or end of the materials alphabetically.

Next step: this is Less important, but would be nice as an option.
Render an image based on the current size, and location, but change the environment brightness to zero, and background color to black, turn off ground shadows and ground reflections. And turn off GI, and self shadows.
That should render out Really quickly. I often do this manually.

Now, WHY? Because the current clown masks are based on material color. But having them split up to object is Too much. If surfaces aren't joined, then you have some big issues as well. So if you limit the material changes to the last group in a tree, you get them based on layer instead. So even though you've got 8 layers as your "white plastic" material, you still might want a clown mask for each part. If someone then says, "Shoot, that part was supposed to be a medium grey" then it only takes a minute to change in Photoshop. You won't be able to change rubber to chrome, but color changes should be no problem. The current clown mask also ends up often being too close together. If you only have 8 colors, there's no reason 4 of them should all be yellows close to each other. I'm not sure how they are currently being chosen. I'm sure it's something that makes sense for some things, but that's not what I'm after.

So that's what I'm after. Are there any people out there scripting right now that could accomplish something like that?