Texture to Color

I am wondering is there an easy way to take a Material with a Texture create a plastic material matching the Average of the bitmap? I have a fabric material that will have a platic part right next to it and i would like to use the bitmap of the fabric to drive the color of the platic part without having to use the eye dropper everytime. I am wondering if there is some type of tool with Vray or Max to do this

Thanks

sometimes it is enough to just blur the map (if you are on cpu that is)

I don’t think there’s an Average blur (as in Photoshop, which does exactly what you want) in 3ds Max. Using a Blur value of 100 with very high tiling should give you a single color, though I think the PS workflow is cleaner.

I’ve prepared two mini scripts to help with this.
One is a plugin of the vrayBitmap, it adds one rollout, but the class name is changed to “AverageColor”.
I’d avoid this, as then the script needs to be present on any installation that opens a file containing the extended bitmap.
I also prepared the same function as a separate tool (the script has “Tool” in the name), it will calculate the average color of the *top level vraybitmap* currently selected in the compact material editor (slate is off-limits.).
Simply drag any bitmap into a material slot as top node, and then with the slot selected press “calculate” on the script, and *wait*: maxscript is slow with bitmaps.
The color will change from black to the average color, or to full red if an error (f.e. not a vrayBitmap) was encountered.
It won’t work with HDR images, as the color picker UI control itself won’t be able to accept the correct range.

It should be able to auto-detect linear images and return the linear data.
If in doubt, use photoshop or nuke or fusion. :slight_smile:
AverageColor.zip (1.34 KB)