Colors and LWF

I’m helping a friend out with a file of his. He isn’t using LWF, but I want to make his scene look more professional by adding it. Nearly all of his materials are colored only by the material color slot. When I apply LWF all his deep rich colors get blown out.

Is there a script that I can run that will convert his colors back to what they are without LWF? I tried un-checking “Apply to color selectors” but that didn’t do it.

Thanks.

This will apply an inverse 2.2 gamma to all diffuse colours in all vray materials in the scene that don’t have a texture in the diffuse slot.

(
	fn applyGamma col gam =
	(
		local r = 255*(col.r/255)^gam
		local g = 255*(col.g/255)^gam
		local b = 255*(col.b/255)^gam
		color r g b
	)
	for m in getClassInstances vrayMtl where m.texmap_diffuse == undefined do m.diffuse = applyGamma m.diffuse 2.2
)
```It's a bit indiscriminate so make sure you save a copy of the scene first.

Thank you! It works beautifully!

Also new versions of Vray have a “color gamma” slot in the VrayColor now. Not as easy to batch setup but an option for future people who poke in.

SO how would I translate say an RGB value of a customer for his company logo color with that VRayColor Map? Put it in there just as that said RGB then what?

If you’re converting to linear workflow then I’d say put a value like 2.2 in there for color gamma. My understanding is that isn’t 100% sRGB accurate but it’s as close as we can get.

in truth you will never get the exact colours right for the logos as the environment and lighting affect it quite a bit just like in reality. I usually take a sample in photoshop and take the RGB values in to max and tweek them till they are correct visually.

Nah, of course lighting will influence it, I’m talking about the pure correct diffuse color.

AColorManager – Aviz Studio Ltd. this is a scripted way of converting to LWF. I use it sometimes to convert old evermotion scenes in a fast way.

It’s a difficult one but if I’m trying to convert a colour reference given as an RGB I try to consider the white value of the scene as well as gamma. For example if I ask a paint company for an RGB for ‘Pure Brilliant White’ they will inevitably give 255,255,255. However in my scenes I generally use 180,180,180 for white paint. So I would treat other colours the same way, multiplying by 180/255 before trying to correct the gamma.

Another script http://www.scriptspot.com/3ds-max/scripts/massgammacolor
that lets you go back and forward from 1.0 and 2.2 gamma color space. I use it to convert old scene to gamma 2.2 Works great!
Link seams to be dead but a google seach will do 8)

You can find it here…